fail vgchange -s 4k $vg
fail vgchange --uuid $vg
fail vgchange --alloc anywhere $vg
-fail vgchange -c y $vg
vgimport $vg
# unsupported combinations of options...
fail vgchange -x n $vg
fail vgextend $vg "$dev4"
vgremove -ff $vg
-
-# skip cluster tests with lvmlockd
-test -n "$LVM_TEST_LVMLOCKD" && exit 0
-
-# set cluster bit
-vgcreate $vg "$dev1" "$dev2" "$dev3"
-# check prompt to change cluster bit without giving explicit vg name
-fail vgchange -cy 2>&1 | tee out
-grep "y/n" out
-check vg_attr_bit cluster $vg "-"
-
-lvcreate -l1 -n $lv1 $vg
-
-# check on cluster
-# either skipped as clustered (non-cluster), or already clustered (on cluster)
-if test -e LOCAL_CLVMD ; then
- # can switch with active LV
- vgchange -cy $vg
- fail vgchange -cy $vg
- # check volume is active locally exclusively
- check lv_field $vg/$lv1 lv_active "local exclusive"
- check vg_attr_bit cluster $vg "c"
- # check we do not support conversion of just locally active LVs
- lvchange -an $vg
- lvchange -ay $vg
- not vgchange $vg
- lvchange -an $vg
- lvchange -aey $vg
- vgchange $vg
-else
- # no clvmd is running
- fail vgchange -cy $vg
- # can't switch with active LV
- vgchange --yes -cy $vg
- fail vgchange --yes -cy $vg
- fail vgs $vg 2>&1 | tee out
- grep "Skipping clustered volume group" out
- vgs --ignoreskippedcluster $vg 2>&1 | tee out
- not grep "Skipping clustered volume group" out
- # reset back to non-clustered VG with disabled locking
- vgchange $vg --config 'global{locking_type=0}' $vg
-fi
-check vg_attr_bit cluster $vg "-"
-
-vgremove -ff $vg