mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-29 01:49:28 +03:00
tests: tune extend test
For proper checking of extension progress require version 1.15 It looks with older versoin extension happens during very slow resume within lvm command - although speed is still somewhat slow with latest version.
This commit is contained in:
@ -41,10 +41,14 @@ lvcreate -l1 $vg "$dev1"
|
||||
lvcreate -l1 $vg "$dev2"
|
||||
|
||||
sector=$(( $(get first_extent_sector "$dev2") + 2048 ))
|
||||
aux delayzero_dev "$dev2" 0 50 "${sector}:"
|
||||
aux zero_dev "$dev1" "${sector}:"
|
||||
aux delayzero_dev "$dev2" 0 30 "${sector}:"
|
||||
|
||||
# Create raid1 LV consuming 1 MD bitmap page
|
||||
lvcreate --yes --type raid1 --regionsize ${regionsize}K -L$(($lvsz-$lvext))M -n $lv1 $vg
|
||||
|
||||
lvs -a $vg
|
||||
|
||||
not check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
check lv_field $vg/$lv1 size "$(($lvsz-$lvext)).00m" $vg/$lv1
|
||||
aux wait_for_sync $vg $lv1
|
||||
@ -52,16 +56,16 @@ check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
check lv_field $vg/$lv1 region_size "4.00k"
|
||||
|
||||
# to slow down extension - slowdown readings
|
||||
aux delayzero_dev "$dev1" 50 0 "${sector}:"
|
||||
aux delayzero_dev "$dev1" 100 0 "${sector}:"
|
||||
aux delayzero_dev "$dev2" 0 100 "${sector}:"
|
||||
|
||||
dmsetup table
|
||||
dmsetup info -c
|
||||
dmsetup status
|
||||
# Extend so that full MD bitmap page is consumed
|
||||
lvextend -vvvv -y -L+${lvext}M $vg/$lv1
|
||||
lvextend -y -L+${lvext}M $vg/$lv1
|
||||
if [ $v1_15_0 -eq 1 ]
|
||||
then
|
||||
not check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
check lv_field $vg/$lv1 size "$(($lvsz)).00m" $vg/$lv1
|
||||
lvs -a $vg
|
||||
fi
|
||||
aux wait_for_sync $vg $lv1
|
||||
check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
|
||||
@ -73,11 +77,12 @@ then
|
||||
else
|
||||
check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
fi
|
||||
aux wait_for_sync $vg $lv1
|
||||
check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
check lv_field $vg/$lv1 size "$(($lvsz+$lvext)).00m" $vg/$lv1
|
||||
|
||||
aux enable_dev "$dev1"
|
||||
aux enable_dev "$dev2"
|
||||
|
||||
aux wait_for_sync $vg $lv1
|
||||
check lv_field $vg/$lv1 sync_percent "100.00"
|
||||
check lv_field $vg/$lv1 size "$(($lvsz+$lvext)).00m" $vg/$lv1
|
||||
|
||||
vgremove -ff $vg
|
||||
|
Reference in New Issue
Block a user