summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2023-01-05 14:47:49 -0600
committerDavid Teigland <teigland@redhat.com>2023-01-05 14:47:49 -0600
commit789904bd57442f783d50f7076c7f9ee188dbd33b (patch)
tree10f8fa9e35f5afcc8088e9e01255ce9d7d89c280
parentc4b898a53eec39bc28b5451e7fde87945303a644 (diff)
downloadlvm2-789904bd57442f783d50f7076c7f9ee188dbd33b.tar.gz
tests: vgimportclone with incomplete pv list and nomda pv
-rw-r--r--test/shell/vgimportclone.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/shell/vgimportclone.sh b/test/shell/vgimportclone.sh
index 97d146b9e..e1b9d3832 100644
--- a/test/shell/vgimportclone.sh
+++ b/test/shell/vgimportclone.sh
@@ -14,7 +14,7 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
-aux prepare_devs 2
+aux prepare_devs 3
vgcreate $SHARED --metadatasize 128k $vg1 "$dev1"
lvcreate -l100%FREE -n $lv1 $vg1
@@ -85,6 +85,25 @@ vgchange -an $vg1 $vg2
vgremove -ff $vg1 $vg2
+pvremove "$dev1"
+pvremove "$dev2"
+
+# Test vgimportclone with incomplete list of devs, and with nomda PV.
+vgcreate $SHARED --vgmetadatacopies 2 $vg1 "$dev1" "$dev2" "$dev3"
+lvcreate -l1 -an $vg1
+not vgimportclone -n newvgname "$dev1"
+not vgimportclone -n newvgname "$dev2"
+not vgimportclone -n newvgname "$dev3"
+not vgimportclone -n newvgname "$dev1" "$dev2"
+not vgimportclone -n newvgname "$dev1" "$dev3"
+not vgimportclone -n newvgname "$dev2" "$dev3"
+vgimportclone -n ${vg1}new "$dev1" "$dev2" "$dev3"
+lvs ${vg1}new
+vgremove -y ${vg1}new
+pvremove "$dev1"
+pvremove "$dev2"
+pvremove "$dev3"
+
# Verify that if we provide the -n|--basevgname,
# the number suffix is not added unnecessarily.
vgcreate $SHARED --metadatasize 128k A${vg1}B "$dev1"