]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Create: Allow to create two volumes of different sizes within one container
authorLukasz Orlowski <lukasz.orlowski@intel.com>
Mon, 19 Sep 2011 16:52:31 +0000 (18:52 +0200)
committerNeilBrown <neilb@suse.de>
Wed, 21 Sep 2011 03:24:34 +0000 (13:24 +1000)
Allows to create RAID 5 volume on 3 disks and then RAID 1 volume on 2
disks withing the same container.

Signed-off-by: Lukasz Orlowski <lukasz.orlowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index f1c924f094b903755ccb4a3b196ba280f81852c2..e57d18fe2d5b15c307fda3460fa58fe0fad564b4 100644 (file)
@@ -5070,6 +5070,12 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
        if (!super)
                return 0;
 
+       if (mpb->num_raid_devs > 0 && mpb->num_disks != raiddisks) {
+               fprintf(stderr, Name ": the option-rom requires all "
+                       "member disks to be a member of all volumes.\n");
+               return 0;
+       }
+
        if (!validate_geometry_imsm_orom(super, level, layout, raiddisks, chunk, verbose)) {
                fprintf(stderr, Name ": RAID gemetry validation failed. "
                        "Cannot proceed with the action(s).\n");