1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: enhance messages

Add extra info about failing local exlusive activation
(as in cluster the LV can be active on some other nodes).
This commit is contained in:
Zdenek Kabelac 2018-01-11 10:46:04 +01:00
parent a8bcdef4fd
commit 38b81e6537
2 changed files with 16 additions and 14 deletions

View File

@ -406,7 +406,8 @@ int activate_lvs(struct cmd_context *cmd, struct dm_list *lvs)
dm_list_iterate_items(lvl, lvs) {
if (!activate_lv_excl_local(cmd, lvl->lv)) {
log_error("Failed to activate %s", display_lvname(lvl->lv));
log_error("Failed to locally exclusively activate %s.",
display_lvname(lvl->lv));
dm_list_uniterate(lvh, lvs, &lvl->list) {
lvl = dm_list_item(lvh, struct lv_list);
if (!deactivate_lv(cmd, lvl->lv))

View File

@ -375,9 +375,9 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
continue;
if (lv_is_converting(lv) || lv_is_merging(lv)) {
log_error("Unable to pvmove when %s volumes are present.",
lv_is_converting(lv) ?
"converting" : "merging");
log_error("Unable to pvmove when %s volume %s is present.",
lv_is_converting(lv) ? "converting" : "merging",
display_lvname(lv));
return NULL;
}
@ -389,13 +389,13 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
return_NULL;
/*
* Remove any PVs holding SubLV siblings to allow
* for collocation (e.g. *rmeta_0 -> *rimage_0).
*
* Callee checks for lv_name and valid raid segment type.
*
* FIXME: don't rely on namespace
*/
* Remove any PVs holding SubLV siblings to allow
* for collocation (e.g. *rmeta_0 -> *rimage_0).
*
* Callee checks for lv_name and valid raid segment type.
*
* FIXME: don't rely on namespace
*/
if (!_remove_sibling_pvs_from_trim_list(lv, lv_name, &trim_list))
return_NULL;
@ -436,7 +436,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
if (lv_is_locked(lv)) {
lv_skipped = 1;
log_print_unless_silent("Skipping locked LV %s.", lv->name);
log_print_unless_silent("Skipping locked LV %s.", display_lvname(lv));
continue;
}
@ -445,8 +445,9 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
lv_is_active(lv) &&
!lv_is_active_exclusive_locally(lv)) {
lv_skipped = 1;
log_print_unless_silent("Skipping LV %s which is activated "
"exclusively on remote node.", lv->name);
log_print_unless_silent("Skipping LV %s which is active, "
"but not locally exclusively.",
display_lvname(lv));
continue;
}