summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2020-02-04 10:20:19 -0600
committerDavid Teigland <teigland@redhat.com>2020-02-04 10:20:19 -0600
commitc0de37ab1888a53cce97007c3f4fdfb6f85ab5bf (patch)
treea763a83db491a4252cfc82adec74759e08ce535b
parentc1ee6f0eef24a44cc02ec941f560bc17ac61b3d8 (diff)
downloadlvm2-c0de37ab1888a53cce97007c3f4fdfb6f85ab5bf.tar.gz
tests: move vgsplit writecache
to a different file
-rw-r--r--test/shell/vgsplit-cache.sh10
-rw-r--r--test/shell/writecache-split.sh14
2 files changed, 15 insertions, 9 deletions
diff --git a/test/shell/vgsplit-cache.sh b/test/shell/vgsplit-cache.sh
index 200f0a9c9..eba85befe 100644
--- a/test/shell/vgsplit-cache.sh
+++ b/test/shell/vgsplit-cache.sh
@@ -70,8 +70,7 @@ test 3 -eq "$(get vg_field $vg1 pv_count)"
lvremove -y $vg
-# dm-cache or dm-writecache with cachevol must not
-# separated main LV and cachevol
+# dm-cache with cachevol must not separated main LV and cachevol
vgremove -ff $vg
vgremove -ff $vg1
@@ -85,11 +84,4 @@ fail vgsplit $vg $vg1 "$dev2"
fail vgsplit $vg $vg1 "$dev3"
lvremove $vg/$lv1
-lvcreate -L6 -n $lv1 -an $vg "$dev2"
-lvcreate -L6 -n $lv2 -an $vg "$dev3"
-lvconvert -y --type writecache --cachevol $lv2 $vg/$lv1
-fail vgsplit $vg $vg1 "$dev2"
-fail vgsplit $vg $vg1 "$dev3"
-lvremove $vg/$lv1
-
vgremove -ff $vg
diff --git a/test/shell/writecache-split.sh b/test/shell/writecache-split.sh
index 6a7a2cdd1..7168d023c 100644
--- a/test/shell/writecache-split.sh
+++ b/test/shell/writecache-split.sh
@@ -126,3 +126,17 @@ vgchange -an $vg
vgextend --restoremissing $vg "$dev3"
vgremove -ff $vg
+
+#
+# vgsplit should not separate cachevol from main lv
+#
+
+vgcreate $vg "$dev1" "$dev2" "$dev3" "$dev4"
+lvcreate -L6 -n $lv1 -an $vg "$dev2"
+lvcreate -L6 -n $lv2 -an $vg "$dev3"
+lvconvert -y --type writecache --cachevol $lv2 $vg/$lv1
+fail vgsplit $vg $vg1 "$dev2"
+fail vgsplit $vg $vg1 "$dev3"
+lvremove $vg/$lv1
+
+vgremove -ff $vg