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:
parent
fa130722cb
commit
e2d823eced
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user