Improve error message when mdadm fails to stop an array.

Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
Neil Brown 2008-06-26 09:27:15 +10:00
parent 0ee4da9850
commit d927f3c4db
1 changed files with 6 additions and 1 deletions

View File

@ -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)