aux prepare_pvs 4
# 'vgmerge normal operation'
+# ensure ordering does not matter
vgcreate $vg1 $dev1 $dev2
vgcreate $vg2 $dev3 $dev4
vgmerge $vg1 $vg2
vgremove $vg1
+vgcreate $vg2 $dev1 $dev2
+vgcreate $vg1 $dev3 $dev4
+vgmerge $vg2 $vg1
+vgremove $vg2
# 'vgmerge rejects duplicate vg name'
vgcreate $vg1 $dev1 $dev2
pvcreate --metadatacopies 0 $dev3 $dev4
# vgrename normal operation - rename vg1 to vg2
+# vgrename normal operation - rename vg2 to vg1
+# ensure name ordering does not matter
vgcreate $vg1 $dev1 $dev2
vgrename $vg1 $vg2
check_vg_field_ $vg2 vg_name $vg2
-vgremove $vg2
+vgrename $vg2 $vg1
+check_vg_field_ $vg1 vg_name $vg1
+vgremove $vg1
# vgrename by uuid (bz231187)
vgcreate $vg1 $dev1 $dev3
aux prepare_devs 5
-# FIXME: paramaterize lvm1 vs lvm2 metadata; most of these tests should run
-# fine with lvm1 metadata as well; for now, just add disks 5 and 6 as lvm1
-# metadata
-
for mdatype in 1 2
do
pvcreate -M$mdatype $devs
+# ensure name order does not matter
+vgcreate -M$mdatype $vg1 $devs
+vgsplit $vg1 $vg2 $dev1
+vgremove $vg1
+vgremove $vg2
+vgcreate -M$mdatype $vg2 $devs
+vgsplit $vg2 $vg1 $dev1
+vgremove $vg1
+vgremove $vg2
+
# vgsplit accepts new vg as destination of split
# lvm1 -- bz244792
vgcreate -M$mdatype $vg1 $devs