diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-17 11:50:27 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-17 11:53:18 +0100 |
commit | 19e137358008ce0a73c980d10cfdeaad7f9a5045 (patch) | |
tree | 61551acfbc8c2b45093e9cde90f5173da4a574f5 | |
parent | 5bf1dba9eb8a8b77410e386e59dadeb27801b14e (diff) | |
download | lvm2-19e137358008ce0a73c980d10cfdeaad7f9a5045.tar.gz |
tests: check resize of cached vdopool
-rw-r--r-- | test/shell/lvconvert-cache-vdo.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/shell/lvconvert-cache-vdo.sh b/test/shell/lvconvert-cache-vdo.sh index 8e2894877..39caf5e03 100644 --- a/test/shell/lvconvert-cache-vdo.sh +++ b/test/shell/lvconvert-cache-vdo.sh @@ -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 |