|
|
ffcdab |
test/shell/vgmerge-operation.sh | 42 +++++++++++++++++++++++++++++++++++++++++
|
|
|
ffcdab |
1 file changed, 42 insertions(+)
|
|
|
ffcdab |
|
|
|
ffcdab |
diff --git a/test/shell/vgmerge-operation.sh b/test/shell/vgmerge-operation.sh
|
|
|
ffcdab |
index 21889e9..0bf517d 100644
|
|
|
ffcdab |
--- a/test/shell/vgmerge-operation.sh
|
|
|
ffcdab |
+++ b/test/shell/vgmerge-operation.sh
|
|
|
ffcdab |
@@ -80,3 +80,45 @@ grep "Duplicate logical volume name \"$lv1\" in \"$vg2\" and \"$vg1" err
|
|
|
ffcdab |
check pvlv_counts $vg1 2 1 0
|
|
|
ffcdab |
check pvlv_counts $vg2 2 1 0
|
|
|
ffcdab |
vgremove -f $vg1 $vg2
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+# 'vgmerge' handle pmspare for merged VG
|
|
|
ffcdab |
+if aux have_thin 1 5 0; then
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+# With disabled pmspare nothing is created
|
|
|
ffcdab |
+vgcreate $vg1 "$dev1" "$dev2"
|
|
|
ffcdab |
+vgcreate $vg2 "$dev3" "$dev4"
|
|
|
ffcdab |
+lvcreate -T -L8M $vg1/pool1 --poolmetadatasize 8M --poolmetadataspare n
|
|
|
ffcdab |
+lvcreate -T -L8M $vg2/pool2 --poolmetadatasize 4M --poolmetadataspare n
|
|
|
ffcdab |
+vgchange -an $vg1 $vg2
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+vgmerge --poolmetadataspare n $vg1 $vg2
|
|
|
ffcdab |
+check lv_not_exists $vg/lvol0_pmspare
|
|
|
ffcdab |
+vgremove -ff $vg1
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+# With pmspare handling there are one created
|
|
|
ffcdab |
+vgcreate $vg1 "$dev1" "$dev2"
|
|
|
ffcdab |
+vgcreate $vg2 "$dev3" "$dev4"
|
|
|
ffcdab |
+lvcreate -T -L8M $vg1/pool1 --poolmetadatasize 8M --poolmetadataspare n
|
|
|
ffcdab |
+lvcreate -T -L8M $vg2/pool2 --poolmetadatasize 4M --poolmetadataspare n
|
|
|
ffcdab |
+vgchange -an $vg1 $vg2
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+vgmerge $vg1 $vg2
|
|
|
ffcdab |
+check lv_field $vg1/lvol0_pmspare size "8.00m"
|
|
|
ffcdab |
+vgremove -ff $vg1
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+# When merged, bigger pmspare is preserved
|
|
|
ffcdab |
+vgcreate $vg1 "$dev1" "$dev2"
|
|
|
ffcdab |
+vgcreate $vg2 "$dev3" "$dev4"
|
|
|
ffcdab |
+lvcreate -T -L8M $vg1/pool1 --poolmetadatasize 8M
|
|
|
ffcdab |
+lvcreate -T -L8M $vg2/pool2 --poolmetadatasize 4M
|
|
|
ffcdab |
+vgchange -an $vg1 $vg2
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+vgmerge $vg1 $vg2
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+check lv_field $vg1/lvol0_pmspare size "8.00m"
|
|
|
ffcdab |
+vgremove -ff $vg1
|
|
|
ffcdab |
+
|
|
|
ffcdab |
+fi
|