Skip to content

Commit

Permalink
Better error messages for broken reshape
Browse files Browse the repository at this point in the history
mdadm --grow --continue has no functionality to restore critical sectors
if reshape was stopped during operation. This functionality belongs to
assemble or incremental.

This patch adds hints to error messages, to try to reassemble array in
case of reshape failure to restore critical sector, so assemble can
handle restoration.

Signed-off-by: Mateusz Kusiak <[email protected]>
  • Loading branch information
dancesWithMachines authored and mtkaczyk committed Jan 13, 2025
1 parent 8a0d3fe commit 70cba6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Grow.c
Original file line number Diff line number Diff line change
Expand Up @@ -2387,6 +2387,7 @@ static int verify_reshape_position(struct mdinfo *info, int level)
} else if (info->reshape_progress > position) {
pr_err("Fatal error: array reshape was not properly frozen (expected reshape position is %llu, but reshape progress is %llu.\n",
position, info->reshape_progress);
pr_err("Reassemble array to try to restore critical sector.\n");
ret_val = -1;
} else {
dprintf("Reshape position in md and metadata are the same;");
Expand Down
3 changes: 2 additions & 1 deletion super-intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -12596,7 +12596,8 @@ static int imsm_manage_reshape(
init_migr_record_imsm(st, dev, sra);
else {
if (__le32_to_cpu(migr_rec->rec_status) != UNIT_SRC_NORMAL) {
dprintf("imsm: cannot restart migration when data are present in copy area.\n");
pr_err("imsm: Cannot restart migration when data are present in copy area.\n"
" Reassemble array to try to restore critical sector.\n");
goto abort;
}
/* Save checkpoint to update migration record for current
Expand Down

0 comments on commit 70cba6b

Please sign in to comment.