1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-08 01:49:30 +03:00

debug: update message for pvmove

Add some more consistency to message printed for pvmove.
This commit is contained in:
Zdenek Kabelac
2025-02-08 22:37:47 +01:00
parent 7858c25427
commit 87a4e7bb68
2 changed files with 10 additions and 9 deletions

View File

@ -1077,7 +1077,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
/* Mirror with only 1 area is 'in sync'. */
if (new_area_count == 1 && is_temporary_mirror_layer(lv)) {
if (!(detached_log_lv = detach_mirror_log(mirrored_seg))) {
log_error("Cannot detach mirror log from %s..",
log_error("Cannot detach mirror log from %s.",
display_lvname(mirrored_seg->lv));
return 0;
}

View File

@ -92,7 +92,8 @@ int pvmove_finish(struct cmd_context *cmd, struct volume_group *vg,
if (!dm_list_empty(lvs_changed) &&
(!_detach_pvmove_mirror(cmd, lv_mirr) ||
!replace_lv_with_error_segment(lv_mirr))) {
log_error("ABORTING: Removal of temporary mirror failed");
log_error("ABORTING: Removal of temporary pvmove mirror %s failed.",
display_lvname(lv_mirr));
return 0;
}
@ -106,22 +107,22 @@ int pvmove_finish(struct cmd_context *cmd, struct volume_group *vg,
/* Deactivate mirror LV */
if (!deactivate_lv(cmd, lv_mirr)) {
log_error("ABORTING: Unable to deactivate temporary logical "
"volume %s.", display_lvname(lv_mirr));
log_error("ABORTING: Unable to deactivate temporary volume %s.",
display_lvname(lv_mirr));
return 0;
}
log_verbose("Removing temporary pvmove LV");
log_verbose("Removing temporary pvmove LV.");
if (!lv_remove(lv_mirr)) {
log_error("ABORTING: Removal of temporary pvmove LV failed");
log_error("ABORTING: Removal of temporary volume %s failed.",
display_lvname(lv_mirr));
return 0;
}
/* Store it on disks */
log_verbose("Writing out final volume group after pvmove");
log_verbose("Writing out final volume group after pvmove.");
if (!vg_write(vg) || !vg_commit(vg)) {
log_error("ABORTING: Failed to write new data locations "
"to disk.");
log_error("ABORTING: Failed to write new data locations to disk.");
return 0;
}