]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Manage.c
Improve error message when mdadm fails to stop an array.
[thirdparty/mdadm.git] / Manage.c
index 1fb8468981886342d76f9786a8ff90a203f27c47..8297708dc39b9a885ea88ee67b52178d1fc07e6a 100644 (file)
--- a/Manage.c
+++ b/Manage.c
@@ -112,9 +112,14 @@ int Manage_runstop(char *devname, int fd, int runstop, int quiet)
                struct map_ent *map = NULL;
                struct stat stb;
                if (ioctl(fd, STOP_ARRAY, NULL)) {
-                       if (quiet==0)
+                       if (quiet==0) {
                                fprintf(stderr, Name ": fail to stop array %s: %s\n",
                                        devname, strerror(errno));
+                               if (errno == EBUSY)
+                                       fprintf(stderr, "Perhaps a running "
+                                               "process, mounted filesystem "
+                                               "or active volume group?\n");
+                       }
                        return 1;
                }
                if (quiet <= 0)