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>
This commit is contained in:
parent
a3b831c9e1
commit
1db0376585
4
Create.c
4
Create.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue