mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
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.
This commit is contained in:
parent
d8923457b8
commit
f36080a05d
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user