]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Assemble: improve messages when restarting a reshape.
[thirdparty/mdadm.git] / Assemble.c
index afe5b05004af78287b370dcdf39bc4c44cac2736..294c9926b98078484dab6b5713b647fd1f4f23b5 100644 (file)
@@ -1007,6 +1007,15 @@ static int start_array(int mdfd,
                if (content->reshape_active &&
                    !(content->reshape_active & RESHAPE_NO_BACKUP) &&
                    content->delta_disks <= 0) {
+                       if (!c->backup_file) {
+                               pr_err("%s: Need a backup file to complete reshape of this array.\n",
+                                      mddev);
+                               pr_err("Please provided one with \"--backup-file=...\"\n");
+                               if (c->update &&
+                                   strcmp(c->update, "revert-reshape") == 0)
+                                       pr_err("(Don't specify --update=revert-reshape again, that part succeeded.)\n");
+                               return 1;
+                       }
                        rv = sysfs_set_str(content, NULL,
                                           "array_state", "readonly");
                        if (rv == 0)