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

cleanup: add missing WARNING into log_warn

This commit is contained in:
Zdenek Kabelac 2016-11-25 14:17:56 +01:00
parent 1a4f13eb6e
commit c10028dd8e
2 changed files with 7 additions and 5 deletions

View File

@ -578,18 +578,18 @@ static int _create_pv_entry(struct dm_pool *mem, struct pv_list *pvl,
pvname = pv_dev_name(pvl->pv); pvname = pv_dev_name(pvl->pv);
if (allocatable_only && !(pvl->pv->status & ALLOCATABLE_PV)) { if (allocatable_only && !(pvl->pv->status & ALLOCATABLE_PV)) {
log_warn("Physical volume %s not allocatable.", pvname); log_warn("WARNING: Physical volume %s not allocatable.", pvname);
return 1; return 1;
} }
if (allocatable_only && is_missing_pv(pvl->pv)) { if (allocatable_only && is_missing_pv(pvl->pv)) {
log_warn("Physical volume %s is missing.", pvname); log_warn("WARNING: Physical volume %s is missing.", pvname);
return 1; return 1;
} }
if (allocatable_only && if (allocatable_only &&
(pvl->pv->pe_count == pvl->pv->pe_alloc_count)) { (pvl->pv->pe_count == pvl->pv->pe_alloc_count)) {
log_warn("No free extents on physical volume \"%s\".", pvname); log_warn("WARNING: No free extents on physical volume \"%s\".", pvname);
return 1; return 1;
} }

View File

@ -67,7 +67,7 @@ static int _consolidate_vg(struct cmd_context *cmd, struct volume_group *vg)
cmd->handles_missing_pvs = 1; cmd->handles_missing_pvs = 1;
log_error("There are still partial LVs in VG %s.", vg->name); log_error("There are still partial LVs in VG %s.", vg->name);
log_error("To remove them unconditionally use: vgreduce --removemissing --force."); log_error("To remove them unconditionally use: vgreduce --removemissing --force.");
log_warn("Proceeding to remove empty missing PVs."); log_warn("WARNING: Proceeding to remove empty missing PVs.");
} }
dm_list_iterate_items(pvl, &vg->pvs) { dm_list_iterate_items(pvl, &vg->pvs) {
@ -114,7 +114,9 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
if (!lv_is_visible(lv)) if (!lv_is_visible(lv))
continue; continue;
log_warn("Removing partial LV %s.", lv->name);
log_warn("WARNING: Removing partial LV %s.", display_lvname(lv));
if (!lv_remove_with_dependencies(cmd, lv, DONT_PROMPT, 0)) if (!lv_remove_with_dependencies(cmd, lv, DONT_PROMPT, 0))
return_0; return_0;
goto restart; goto restart;