]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
Specify nodes number when updating cluster nodes
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index 13dc24e4426923c1ba450fc68e47cfdf33498c5c..1b3467fd47792d8f98da0c822c1e611ce1065b93 100644 (file)
--- 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);