1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

metadata: move warning message about repairing VG

Move the message to just before the repair is going
to happen to avoid printing the message in cases
where repair is skipped.
This commit is contained in:
David Teigland 2016-05-05 12:47:29 -05:00
parent fa130722cb
commit e2d823eced

View File

@ -3942,6 +3942,8 @@ static int _repair_inconsistent_vg(struct volume_group *vg)
return 0;
}
log_warn("WARNING: Inconsistent metadata found for VG %s - updating to use version %u", vg->name, vg->seqno);
vg->cmd->handles_missing_pvs = 1;
if (!vg_write(vg)) {
log_error("Automatic metadata correction failed");
@ -4554,9 +4556,6 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
return correct_vg;
}
log_warn("WARNING: Inconsistent metadata found for VG %s - updating "
"to use version %u", vgname, correct_vg->seqno);
/*
* If PV is marked missing but we found it,
* update metadata and remove MISSING flag