1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: more snaps

Check lvs reports 'origin' not openned.
This commit is contained in:
Zdenek Kabelac 2016-12-04 22:27:57 +01:00
parent 3f6ade4b0d
commit 0ce9ae3cda

View File

@ -37,14 +37,17 @@ snap_and_merge() {
lvconvert -b --merge $vg/$lv2 lvconvert -b --merge $vg/$lv2
lvs -a -o+lv_merging,lv_merge_failed $vg lvs -a -o+lv_merging,lv_merge_failed $vg
get lv_field $vg/$lv1 lv_attr | grep "Owi-ao"
get lv_field $vg/$lv2 lv_attr | grep "Swi-a-s---"
kill $SLEEP_PID kill $SLEEP_PID
aux delay_dev "$dev1" 0 200 $(get first_extent_sector "$dev1"): aux delay_dev "$dev1" 0 200 $(get first_extent_sector "$dev1"):
lvchange --poll n --refresh $vg/$lv1 lvchange --poll n --refresh $vg/$lv1
dmsetup table dmsetup table
lvs -a -o+lv_merging,lv_merge_failed $vg lvs -av -o+lv_merging,lv_merge_failed $vg
# Origin is closed and snapshot merge could run
get lv_field $vg/$lv1 lv_attr | grep "Owi-a-"
sleep 1 sleep 1
check lv_attr_bit state $vg/$lv1 "a"
check lv_attr_bit state $vg/$lv2 "a" check lv_attr_bit state $vg/$lv2 "a"
aux error_dev "$dev2" $(get first_extent_sector "$dev2"): aux error_dev "$dev2" $(get first_extent_sector "$dev2"):
aux enable_dev "$dev1" aux enable_dev "$dev1"