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

vgremove: remove forgotten pmspare

As pmspare is an invisible LV it's not getting automatically removed
since vgremove removes only visible LVs and it depending LVs.
If there was no other thin/cache pool volume, such pmspare stayed
undeleted and caused command failure.

So handle explicitelly such forgotten pmspare and remove it.
This commit is contained in:
Zdenek Kabelac 2021-07-20 22:28:13 +02:00
parent d38fdb25e4
commit 5042463c50

View File

@ -65,6 +65,10 @@ static int _vgremove_single(struct cmd_context *cmd, const char *vg_name,
}
}
if (vg->pool_metadata_spare_lv &&
!lvremove_single(cmd, vg->pool_metadata_spare_lv, &void_handle))
return_ECMD_FAILED;
if (!lockd_free_vg_before(cmd, vg, 0))
return_ECMD_FAILED;