[PATCH] Partitions could be meaningful on single-drive RAID0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 Create.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Create.c b/Create.c
index 1cadbcc..bbd25e5 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

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux