summaryrefslogtreecommitdiff
path: root/Create.c
diff options
context:
space:
mode:
authorKrzysztof Wojcik <krzysztof.wojcik@intel.com>2011-02-25 07:30:51 +0100
committerNeilBrown <neilb@suse.de>2011-02-27 17:13:10 +1100
commit0ac3f649307280651f5f190101fa77ac61d5e4ea (patch)
treea6f9dbcbee1d1da172fe4525771275fd9a97cf7b /Create.c
parent1a2487c2cbb3a575ca26c4350d15dd9761fa02c1 (diff)
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 <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c3
1 files changed, 2 insertions, 1 deletions
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