diff --git a/mdadm.c b/mdadm.c index 13dc24e4..1b3467fd 100644 --- a/mdadm.c +++ b/mdadm.c @@ -1433,6 +1433,11 @@ int main(int argc, char *argv[]) } } + if (c.update && strcmp(c.update, "nodes") == 0 && c.nodes == 0) { + pr_err("Please specify nodes number with --nodes\n"); + exit(1); + } + if (c.backup_file && data_offset != INVALID_SECTORS) { pr_err("--backup-file and --data-offset are incompatible\n"); exit(2);