Improve error message when mdadm fails to stop an array.
Signed-off-by: Neil Brown <neilb@suse.de>
This commit is contained in:
parent
0ee4da9850
commit
d927f3c4db
7
Manage.c
7
Manage.c
|
@ -112,9 +112,14 @@ int Manage_runstop(char *devname, int fd, int runstop, int quiet)
|
||||||
struct map_ent *map = NULL;
|
struct map_ent *map = NULL;
|
||||||
struct stat stb;
|
struct stat stb;
|
||||||
if (ioctl(fd, STOP_ARRAY, NULL)) {
|
if (ioctl(fd, STOP_ARRAY, NULL)) {
|
||||||
if (quiet==0)
|
if (quiet==0) {
|
||||||
fprintf(stderr, Name ": fail to stop array %s: %s\n",
|
fprintf(stderr, Name ": fail to stop array %s: %s\n",
|
||||||
devname, strerror(errno));
|
devname, strerror(errno));
|
||||||
|
if (errno == EBUSY)
|
||||||
|
fprintf(stderr, "Perhaps a running "
|
||||||
|
"process, mounted filesystem "
|
||||||
|
"or active volume group?\n");
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (quiet <= 0)
|
if (quiet <= 0)
|
||||||
|
|
Loading…
Reference in New Issue