From: Krzysztof Wojcik Date: Fri, 25 Feb 2011 06:30:51 +0000 (+0100) Subject: Partitions could be meaningful on single-drive RAID0 X-Git-Tag: mdadm-3.2.1~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ac3f649307280651f5f190101fa77ac61d5e4ea;p=thirdparty%2Fmdadm.git Partitions could be meaningful on single-drive RAID0 If we create a single-drive RAID0 array on partitioned drive, we do not lose information about disk structure after operation (partitions are visible on created array) Warning message: mdadm: partition table exists on /dev/sdX but will be lost or meaningless after creating array" is not necessary during creation single-drive RAID0 array. This patch removes the message. Signed-off-by: Krzysztof Wojcik Signed-off-by: NeilBrown --- diff --git a/Create.c b/Create.c index 1cadbcc3..bbd25e55 100644 --- a/Create.c +++ b/Create.c @@ -381,7 +381,8 @@ int Create(struct supertype *st, char *mddev, st->minor_version >= 1) /* metadata at front */ warn |= check_partitions(fd, dname, 0); - else if (level == 1 || level == LEVEL_CONTAINER) + else if (level == 1 || level == LEVEL_CONTAINER + || (level == 0 && raiddisks == 1)) /* partitions could be meaningful */ warn |= check_partitions(fd, dname, freesize*2); else