diff options
author | Xiao Ni <xni@redhat.com> | 2018-01-26 09:42:16 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-01-26 19:51:01 +0100 |
commit | 1db0376585e3aa49f004e5b6475a07d5728a63f9 (patch) | |
tree | 2169b5d596acb5141b8c98246caca25e7b08bcc2 | |
parent | Grow.c: Block any level migration with chunk size change (diff) | |
download | mdadm-1db0376585e3aa49f004e5b6475a07d5728a63f9.tar.xz mdadm-1db0376585e3aa49f004e5b6475a07d5728a63f9.zip |
Subdevs can't be all missing when create raid device
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r-- | Create.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -475,6 +475,10 @@ int Create(struct supertype *st, char *mddev, close(fd); } } + if (missing_disks == dnum) { + pr_err("Subdevs can't be all missing\n"); + return 1; + } if (s->raiddisks + s->sparedisks > st->max_devs) { pr_err("Too many devices: %s metadata only supports %d\n", st->ss->name, st->max_devs); |