]> sourceware.org Git - lvm2.git/commitdiff
test: check writecache profile support
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 24 Jan 2022 13:49:53 +0000 (14:49 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 26 Jan 2022 14:09:58 +0000 (15:09 +0100)
FIXME

test/shell/profiles-cache.sh
test/shell/writecache-misc.sh

index 9e17ebf605e85dc885b23864f4bbca3dfc6ffcad..47a5cdf2f5e16420d7531d2f8a765607edb202b1 100644 (file)
@@ -43,6 +43,9 @@ allocation {
                        sequential_threshold = 100
                        random_threshold = 200
                }
+               writecache {
+                       high_watermark = 60
+               }
        }
 }
 EOF
@@ -58,6 +61,13 @@ EOF
 
 aux prepare_vg 2 1000000
 
+# Check writecache read data from profile
+lvcreate -n $lv1 -l 4 -an $vg "$dev1"
+lvcreate -y --type writecache -l 4 --cachevol $lv1 -n $lv2 --metadataprofile $PFILE $vg "$dev2"
+check lv_field $vg/$lv2 cachesettings "high_watermark=60"
+lvremove -y $vg
+exit
+
 # Check chunk_size is grabbed from configuration
 lvcreate -L1G --config 'allocation/cache_pool_chunk_size=512' --type cache-pool $vg/cpool
 check lv_field $vg/cpool chunksize "512.00k"
index 80b793256aabfebb6e9595510131f27b0936236d..f62974c54a7b108bed603420332a8ecb550a475e 100644 (file)
@@ -52,6 +52,12 @@ aux prepare_devs 4
 vgcreate $vg "$dev1" "$dev2" "$dev3" "$dev4"
 
 
+# Create writecache without a specified name so it gets automatic name
+lvcreate -n $lv1 -l 4 -an $vg "$dev1"
+lvcreate -y --type writecache -l 4 --cachevol $lv1 $vg "$dev2"
+check lv_exists $vg lvol0
+lvremove -y $vg
+
 #
 # Test pvmove with writecache
 #
This page took 0.036344 seconds and 5 git commands to generate.