From: Lukasz Orlowski Date: Mon, 19 Sep 2011 16:52:31 +0000 (+0200) Subject: Create: Allow to create two volumes of different sizes within one container X-Git-Tag: mdadm-3.2.3~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7cb06c84548c9924a41c48f7d0e0c8a29b0996d;p=thirdparty%2Fmdadm.git Create: Allow to create two volumes of different sizes within one container 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 Signed-off-by: NeilBrown --- diff --git a/super-intel.c b/super-intel.c index f1c924f0..e57d18fe 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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");