mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
test: vgsplit-usage
Restart clvmd between testing each mdatype to avoid a problem with dev state being kept from one test to the next.
This commit is contained in:
parent
29a8012724
commit
4c5ad5a04c
@ -152,8 +152,22 @@ lvcreate -l 4 -n $lv2 $vg1
|
|||||||
vgchange -an $vg1
|
vgchange -an $vg1
|
||||||
not vgsplit $vg1 $vg2 "$dev3" 2>err;
|
not vgsplit $vg1 $vg2 "$dev3" 2>err;
|
||||||
vgremove -f $vg2 $vg1
|
vgremove -f $vg2 $vg1
|
||||||
|
|
||||||
|
# Restart clvm because using the same
|
||||||
|
# devs as lvm1 and then lvm2 causes problems.
|
||||||
|
if test -e LOCAL_CLVMD ; then
|
||||||
|
kill $(< LOCAL_CLVMD)
|
||||||
|
for i in $(seq 1 100) ; do
|
||||||
|
test $i -eq 100 && die "Shutdown of clvmd is too slow."
|
||||||
|
pgrep clvmd || break
|
||||||
|
sleep .1
|
||||||
|
done # wait for the pid removal
|
||||||
|
aux prepare_clvmd
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test -z "$LVM_TEST_LVM1" ; then
|
||||||
# ONLY LVM2 metadata
|
# ONLY LVM2 metadata
|
||||||
# setup PVs" '
|
# setup PVs" '
|
||||||
pvcreate --metadatacopies 0 "$dev5"
|
pvcreate --metadatacopies 0 "$dev5"
|
||||||
@ -168,7 +182,6 @@ check pvlv_counts $vg1 2 1 0
|
|||||||
vgremove -f $vg1
|
vgremove -f $vg1
|
||||||
|
|
||||||
# vgsplit rejects split because metadata types differ
|
# vgsplit rejects split because metadata types differ
|
||||||
if test -n "$LVM_TEST_LVM1" ; then
|
|
||||||
pvcreate -ff -M1 "$dev3" "$dev4"
|
pvcreate -ff -M1 "$dev3" "$dev4"
|
||||||
pvcreate -ff "$dev1" "$dev2"
|
pvcreate -ff "$dev1" "$dev2"
|
||||||
vgcreate -M1 $vg1 "$dev3" "$dev4"
|
vgcreate -M1 $vg1 "$dev3" "$dev4"
|
||||||
|
Loading…
Reference in New Issue
Block a user