summaryrefslogtreecommitdiff
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-07-02 13:09:07 +1000
committerNeilBrown <neilb@suse.de>2013-07-02 13:09:07 +1000
commitbe7c26b48cccfa9897fcbfc127d8bb2313ccb9c4 (patch)
tree6a9278d8f22eefdbe98b19308fa24ed734a20a05 /Assemble.c
parentc39b2e633fd6eb82a8a8e822ef01339806b05bfa (diff)
Assemble: improve messages when restarting a reshape.
If the restarted reshape needs a backup file and we don't have one, that should be reported before we try to start the array. Also we shouldn't say the "Cannot grow" but "cannot complete". Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Assemble.c b/Assemble.c
index afe5b050..294c9926 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -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)