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

cleanup: enhance warning message

Add WARNING: for log_warn.
Show device name which is marked missing.
This commit is contained in:
Zdenek Kabelac 2016-05-05 21:13:41 +02:00
parent f6575ec824
commit ed9162cd88

View File

@ -691,7 +691,7 @@ static int _check_pv_dev_sizes(struct volume_group *vg)
size = pv_size(pvl->pv); size = pv_size(pvl->pv);
if (dev_size < size) { if (dev_size < size) {
log_warn("Device %s has size of %" PRIu64 " sectors which " log_warn("WARNING: Device %s has size of %" PRIu64 " sectors which "
"is smaller than corresponding PV size of %" PRIu64 "is smaller than corresponding PV size of %" PRIu64
" sectors. Was device resized?", " sectors. Was device resized?",
pv_dev_name(pvl->pv), dev_size, size); pv_dev_name(pvl->pv), dev_size, size);
@ -3890,7 +3890,7 @@ static int _check_reappeared_pv(struct volume_group *correct_vg,
dm_list_iterate_items(pvl, &correct_vg->pvs) dm_list_iterate_items(pvl, &correct_vg->pvs)
if (pv->dev == pvl->pv->dev && is_missing_pv(pvl->pv)) { if (pv->dev == pvl->pv->dev && is_missing_pv(pvl->pv)) {
if (act) if (act)
log_warn("Missing device %s reappeared, updating " log_warn("WARNING: Missing device %s reappeared, updating "
"metadata for VG %s to version %u.", "metadata for VG %s to version %u.",
pv_dev_name(pvl->pv), pv_vg_name(pvl->pv), pv_dev_name(pvl->pv), pv_vg_name(pvl->pv),
correct_vg->seqno); correct_vg->seqno);
@ -3901,9 +3901,11 @@ static int _check_reappeared_pv(struct volume_group *correct_vg,
} }
++ rv; ++ rv;
} else if (act) } else if (act)
log_warn("Device still marked missing because of allocated data " log_warn("WARNING: Device %s still marked missing because of allocated data "
"on it, remove volumes and consider vgreduce --removemissing."); "on it, remove volumes and consider vgreduce --removemissing.",
pv_dev_name(pvl->pv));
} }
return rv; return rv;
} }