From f5da325d701082edab568160824c9c8c7289cf15 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 7 May 2018 11:45:11 +0200 Subject: [PATCH] tests: use throttle_dm_mirror In this case it's better to use throttling of mirror sync, that delay everything with dm_delay. --- test/shell/lvconvert-mirror.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh index a45e6e722..72a397838 100644 --- a/test/shell/lvconvert-mirror.sh +++ b/test/shell/lvconvert-mirror.sh @@ -17,7 +17,7 @@ export LVM_TEST_LVMETAD_DEBUG_OPTS=${LVM_TEST_LVMETAD_DEBUG_OPTS-} . lib/inittest -aux prepare_pvs 5 100 +aux prepare_pvs 5 get_devs # proper DEVRANGE needs to be set according to extent size @@ -319,10 +319,12 @@ fi # aux zero_dev "$dev2" $(get first_extent_sector "$dev2"): aux zero_dev "$dev4" $(get first_extent_sector "$dev4"): +aux throttle_dm_mirror # Use large enough mirror that takes time to sychronize with small regionsize -lvcreate -aey -L80 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE" +lvcreate -aey -L20 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE" not lvconvert -m-1 $vg/$lv1 "$dev1" 2>&1 | tee out +aux restore_dm_mirror grep "not in-sync" out lvconvert $vg/$lv1 # wait @@ -334,9 +336,11 @@ check linear $vg $lv1 check lv_on $vg $lv1 "$dev4" lvremove -ff $vg + +aux throttle_dm_mirror # No parallel lvconverts on a single LV please # Use big enough mirror size and small regionsize to run on all test machines succesfully -lvcreate -aey -Zn -Wn -L80 --type mirror --regionsize 16k -m1 -n $lv1 $vg "$dev1" "$dev2" "$dev3:0-8" +lvcreate -aey -Zn -Wn -L20 --type mirror --regionsize 16k -m1 -n $lv1 $vg "$dev1" "$dev2" "$dev3:0-8" check mirror $vg $lv1 check mirror_legs $vg $lv1 2 @@ -345,6 +349,7 @@ LVM_TEST_TAG="kill_me_$PREFIX" lvconvert -m+1 -b $vg/$lv1 "$dev4" # Next convert should fail b/c we can't have 2 at once not lvconvert -m+1 $vg/$lv1 "$dev5" 2>&1 | tee out +aux restore_dm_mirror grep "is already being converted" out lvconvert $vg/$lv1 # wait -- 2.43.5