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

thin: more forced ignoring of pool failure

Support also 'vgremove -ff' to properly remove even inactive/broken thin pools.
Update messages to use 'print_unless_silent' for the forced case.
This commit is contained in:
Zdenek Kabelac 2014-08-26 11:53:56 +02:00
parent f4e56b2829
commit 1ee5e18a7b
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.110 -
==================================
Support lv/vgremove -ff to remove thin vols from broken/inactive thin pools.
Fix typo breaking configure --with-lvm1=shared.
Modify lvresize code to handle raid/mirrors and physical extents.
Allow conversion of raid1 LV into a snapshot LV or snapshot origin LV.

View File

@ -5522,11 +5522,11 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
if (pool_lv && !pool_has_message(first_seg(pool_lv), lv, 0) &&
!update_pool_lv(pool_lv, 1)) {
if (force < DONT_PROMPT_OVERRIDE) {
log_error("Failed to update thin pool %s.", pool_lv->name);
log_error("Failed to update pool %s.", display_lvname(pool_lv));
return 0;
}
log_warn("WARNING: Forced to ignoring failure of pool metadata update %s.",
pool_lv->name);
log_print_unless_silent("Ignoring update failure of pool %s.",
display_lvname(pool_lv));
pool_lv = NULL; /* Do not retry */
}
@ -5565,8 +5565,12 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
/* Release unneeded blocks in thin pool */
/* TODO: defer when multiple LVs relased at once */
if (pool_lv && !update_pool_lv(pool_lv, 1)) {
log_error("Failed to update thin pool %s.", pool_lv->name);
return 0;
if (force < DONT_PROMPT_OVERRIDE) {
log_error("Failed to update pool %s.", display_lvname(pool_lv));
return 0;
}
log_print_unless_silent("Ignoring update failure of pool %s.",
display_lvname(pool_lv));
}
backup(vg);