summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-05-05 12:47:29 -0500
committerDavid Teigland <teigland@redhat.com>2016-05-06 09:00:00 -0500
commite2d823eced26b97874399670a59c1d5b9c1fb54d (patch)
tree9b8db7af6017f00d398fa736d000c8efd059b5c2
parentfa130722cbe3f7ac7f80fce4bcd3c3dc12d6897e (diff)
downloadlvm2-e2d823eced26b97874399670a59c1d5b9c1fb54d.tar.gz
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.
-rw-r--r--lib/metadata/metadata.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index dbe443e3f..8adcbbd99 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -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