From ee6b9b78ece389813895e3ecf79e5bbcbafee871 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 17 Sep 2019 11:27:13 +0200 Subject: [PATCH] tests: pool conversion Test conversion of cached LV. --- test/shell/lvconvert-cache-thin.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/shell/lvconvert-cache-thin.sh b/test/shell/lvconvert-cache-thin.sh index e1d38b866..7dda6e6ff 100644 --- a/test/shell/lvconvert-cache-thin.sh +++ b/test/shell/lvconvert-cache-thin.sh @@ -51,4 +51,20 @@ check lv_field $vg/$lv1 segtype "thin" lvconvert --uncache $vg/tpool lvs -a $vg +lvremove -f $vg + +# Check conversion of cached LV works as thin-pool +lvcreate -L10 -n $lv $vg +lvcreate -L10 -n $lv1 $vg +lvcreate -H -L10 $vg/$lv + +# Stack of cache over cache is unsupported ATM +fail lvconvert --yes --cachepool $vg/$lv + +# Thin-pool cannot use cached metaddata LV (meta should be on FAST device) +fail lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv + +# Thin-pool CAN use cached data LV +lvconvert --yes --thinpool $vg/$lv + vgremove -f $vg