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

tests: check resize of cached vdopool

This commit is contained in:
Zdenek Kabelac 2021-02-17 11:50:27 +01:00
parent 5bf1dba9eb
commit 19e1373580

View File

@ -17,6 +17,10 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
percent_() {
get lv_field $vg/vpool data_percent | cut -d. -f1
}
aux have_vdo 6 2 0 || skip
aux have_cache 1 3 0 || skip
@ -41,9 +45,15 @@ lvchange -ay $vg
check dev_md5sum $vg $lv1
lvconvert --yes --cache --cachepool cpool $vg/vpool
lvconvert --splitcache $vg/vpool
VDODATA="$(percent_)"
# Check resize of cached VDO pool
lvextend -L+1G $vg/vpool
lvs -a $vg
# Check after resize usage is reduced
test "$(percent_)" -lt $VDODATA
lvconvert --splitcache $vg/vpool
lvconvert --yes --cache --cachepool cpool $vg/$lv1
check dev_md5sum $vg $lv1