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

vdo: resize requires active vdopool volume

ATM kernel VDO target does not handle resize of inactive VDO LVs
so prevent users corrupting such LVs and require active such LVs.
This commit is contained in:
Zdenek Kabelac 2023-01-15 21:27:57 +01:00
parent 2451bc568f
commit c20f01a0cb

View File

@ -5954,6 +5954,16 @@ static int _lv_resize_check_used(struct logical_volume *lv)
return 0;
}
if (lv_is_vdo(lv) && !lv_is_active(lv)) {
log_error("Cannot resize inactive VDO logical volume %s.", display_lvname(lv));
return 0;
}
if (lv_is_vdo_pool(lv) && !lv_is_active(lv_lock_holder(lv))) {
log_error("Cannot resize inactive VDO POOL volume %s.", display_lvname(lv));
return 0;
}
if (lv_is_external_origin(lv)) {
/*
* Since external-origin can be activated read-only,