diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-11-14 14:58:20 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-11-14 18:12:35 +0100 |
commit | f36080a05d987d359e1c09e64d1222636dcd96ad (patch) | |
tree | b0f13271b39fef7e50150b462b44ced3d7c4c470 | |
parent | d8923457b82456ebee3e333b3fcc26087483cd01 (diff) | |
download | lvm2-f36080a05d987d359e1c09e64d1222636dcd96ad.tar.gz |
vg_read: correct warning
Use log_warn when we are effectively not creating an error -
we 'allowed' inconsistent read for a reason - so it's just warning
level we process inconsistent VG - it's upto caller later to decide
error level of command return value and in case of error it needs
to use log_error then.
-rw-r--r-- | lib/metadata/metadata.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 601a7660a..0c5b0d6ce 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -3567,8 +3567,8 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, /* Don't touch if vgids didn't match */ if (inconsistent_vgid) { - log_error("Inconsistent metadata UUIDs found for " - "volume group %s", vgname); + log_warn("WARNING: Inconsistent metadata UUIDs found for " + "volume group %s.", vgname); *consistent = 0; _free_pv_list(&all_pvs); return correct_vg; @@ -3600,8 +3600,8 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, release_vg(correct_vg); return_NULL; } - log_error("Removing PV %s (%s) that no longer belongs to VG %s", - pv_dev_name(pvl->pv), uuid, correct_vg->name); + log_warn("WARNING: Removing PV %s (%s) that no longer belongs to VG %s", + pv_dev_name(pvl->pv), uuid, correct_vg->name); if (!pv_write_orphan(cmd, pvl->pv)) { _free_pv_list(&all_pvs); release_vg(correct_vg); @@ -3624,10 +3624,9 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, } if ((correct_vg->status & PVMOVE) && !pvmove_mode()) { - log_error("WARNING: Interrupted pvmove detected in " - "volume group %s", correct_vg->name); - log_error("Please restore the metadata by running " - "vgcfgrestore."); + log_error("Interrupted pvmove detected in volume group %s.", + correct_vg->name); + log_print("Please restore the metadata by running vgcfgrestore."); release_vg(correct_vg); return NULL; } |