. lib/inittest
-aux prepare_pvs 5 100
+aux prepare_pvs 5
get_devs
# proper DEVRANGE needs to be set according to extent size
#
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
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
# 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