From: Neil Brown Date: Mon, 9 Oct 2006 21:06:24 +0000 (+1000) Subject: Improve the message when mdadm detects similar superblocks X-Git-Tag: mdadm-2.5.4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2df86e0a79c1e3d86c19d6ecb14e6f303c5d50d;p=thirdparty%2Fmdadm.git Improve the message when mdadm detects similar superblocks If they are for a partition and a whole device (common case) they old message doesn't really cover the situation. So add the "overlap" option to the text. Also detect whether the device list was in mdadm.conf and act accordingly. --- diff --git a/Assemble.c b/Assemble.c index 3c00c911..5acb076c 100644 --- a/Assemble.c +++ b/Assemble.c @@ -531,9 +531,12 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, " to have very similar superblocks.\n" " If they are really different, " "please --zero the superblock on one\n" - " If they are the same, please remove " - "one from the list.\n", - devices[best[i]].devname, devname); + " If they are the same or overlap," + " please remove one from %s.\n", + devices[best[i]].devname, devname, + inargv ? "the list" : + "the\n DEVICE list in mdadm.conf" + ); if (must_close) close(mdfd); return 1; }