summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorBlazej Kucman <blazej.kucman@intel.com>2020-01-17 15:24:04 +0100
committerJes Sorensen <jsorensen@fb.com>2020-01-21 19:41:14 +0100
commit1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da (patch)
tree9721d13ef7c4211d40adbb08c6131f5bbdcf9b9a /mdadm.c
parentAdd support for Tebibytes (diff)
downloadmdadm-1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da.tar.xz
mdadm-1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da.zip
imsm: fill working_disks according to metadata.
Imsm tracks as "working_disk" each visible drive. Assemble routine expects that the value will return count of active member drives recorded in metadata. As a side effect "--no-degraded" doesn't work correctly for imsm. Align this field to others. Added check, if the option --no-degraded is called with --scan. Signed-off-by: Blazej Kucman <blazej.kucman@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mdadm.c b/mdadm.c
index 256a97ef..13dc24e4 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1485,9 +1485,12 @@ int main(int argc, char *argv[])
rv = Manage_stop(devlist->devname, mdfd, c.verbose, 0);
break;
case ASSEMBLE:
- if (devs_found == 1 && ident.uuid_set == 0 &&
- ident.super_minor == UnSet && ident.name[0] == 0 &&
- !c.scan ) {
+ if (!c.scan && c.runstop == -1) {
+ pr_err("--no-degraded not meaningful without a --scan assembly.\n");
+ exit(1);
+ } else if (devs_found == 1 && ident.uuid_set == 0 &&
+ ident.super_minor == UnSet && ident.name[0] == 0 &&
+ !c.scan) {
/* Only a device has been given, so get details from config file */
struct mddev_ident *array_ident = conf_get_ident(devlist->devname);
if (array_ident == NULL) {