diff options
author | Blazej Kucman <blazej.kucman@intel.com> | 2020-01-17 15:24:04 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2020-01-21 19:41:14 +0100 |
commit | 1e93d0d15913c3fa6d0de5af3fb5e4e3b3f068da (patch) | |
tree | 9721d13ef7c4211d40adbb08c6131f5bbdcf9b9a /mdadm.c | |
parent | Add support for Tebibytes (diff) | |
download | mdadm-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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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) { |