From c93e0932e8d3005d2b0f6e1e66f7fba72f3ac950 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 8 Jun 2018 12:46:47 +0200 Subject: [PATCH] tests: check proper support of fmt2 with cleaner policy --- test/shell/cache-metadata2.sh | 10 ++++++++++ test/shell/lvconvert-cache.sh | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/test/shell/cache-metadata2.sh b/test/shell/cache-metadata2.sh index 684ae670a..57c6e2387 100644 --- a/test/shell/cache-metadata2.sh +++ b/test/shell/cache-metadata2.sh @@ -51,6 +51,11 @@ lvs -a -o+cachemetadataformat $vg lvremove -f $vg +lvcreate --type cache-pool --cachepolicy cleaner --cachemetadataformat 1 -L1 $vg/cpool +lvcreate -H -L10 -n $lv1 --cachepool $vg/cpool +check lv_field $vg/$lv1 cachemetadataformat "1" +lvremove -f $vg + if [ -z "$META2" ]; then # for these test we need kernel with metadata2 support @@ -78,6 +83,11 @@ lvconvert --config 'allocation/cache_metadata_format=1' -y -H --cachepool $vg/cp check lv_field $vg/$lv1 cachemetadataformat "1" lvremove -f $vg +lvcreate --type cache-pool --cachepolicy cleaner -L1 $vg/cpool +lvcreate -H -L10 -n $lv1 --cachepool $vg/cpool +check lv_field $vg/$lv1 cachemetadataformat "2" +lvremove -f $vg + fi #lvs -a -o name,cachemetadataformat,kernelmetadataformat,chunksize,cachepolicy,cachemode $vg diff --git a/test/shell/lvconvert-cache.sh b/test/shell/lvconvert-cache.sh index c3742af1d..b2a2920d8 100644 --- a/test/shell/lvconvert-cache.sh +++ b/test/shell/lvconvert-cache.sh @@ -106,6 +106,11 @@ fail lvconvert --type cache --cachepool $vg/pool $vg/corigin lvconvert --yes --cache --cachepool $vg/pool $vg/corigin lvremove -ff $vg +# Check we also support conversion that uses 'cleaner' cache policy +lvcreate -n corigin -l 10 $vg +lvcreate -n pool -l 10 $vg +lvconvert --yes --cache --cachepool $vg/pool $vg/corigin --cachepolicy cleaner +lvremove -ff $vg ####################### # Invalid conversions #