]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Improve the message when mdadm detects similar superblocks
authorNeil Brown <neilb@suse.de>
Mon, 9 Oct 2006 21:06:24 +0000 (07:06 +1000)
committerNeil Brown <neilb@suse.de>
Mon, 9 Oct 2006 21:06:24 +0000 (07:06 +1000)
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.

Assemble.c

index 3c00c9116cbd19d5f9f8b29e0aac8b40b1c022a1..5acb076caf01cec617d31a2d71f095f0583fe650 100644 (file)
@@ -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;
                        }