1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

test: Avoid a race in pvmove-restart.sh.

This commit is contained in:
Petr Rockai 2015-02-18 12:27:47 +01:00
parent 733e3f6f98
commit 88411fb6f9

View File

@ -15,7 +15,9 @@
aux prepare_pvs 3 60 aux prepare_pvs 3 60
vgcreate -s 128k $vg "$dev1" "$dev2" "$dev3" vgcreate -s 128k $vg "$dev1" "$dev2"
pvcreate --metadatacopies 0 "$dev3"
vgextend $vg "$dev3"
for mode in "--atomic" "" for mode in "--atomic" ""
do do
@ -32,7 +34,7 @@ aux delay_dev "$dev3" 0 100
pvmove -i0 -n $vg/$lv1 "$dev1" "$dev3" & pvmove -i0 -n $vg/$lv1 "$dev1" "$dev3" &
PVMOVE=$! PVMOVE=$!
# Let's wait a bit till pvmove starts and kill it # Let's wait a bit till pvmove starts and kill it
sleep 1 while not dmsetup status "$vg-pvmove0"; do sleep .1; done
kill -9 $PVMOVE kill -9 $PVMOVE
wait wait