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

tests: check preserved exclusivness of snapshot merge

Detect if origin remains exclusively activated after merging.
This commit is contained in:
Zdenek Kabelac 2018-01-15 13:29:14 +01:00
parent 8c7ec44bf0
commit 8ebd45fde7
2 changed files with 13 additions and 0 deletions

View File

@ -54,7 +54,11 @@ setup_merge_ $vg $lv1
# make sure lvconvert --merge requires explicit LV listing
not lvconvert --merge
# check exclusive lock is preserved after merge
check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
lvconvert --merge "$vg/$(snap_lv_name_ "$lv1")"
check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
lvremove -f $vg/$lv1
setup_merge_ $vg $lv1

View File

@ -29,6 +29,15 @@ aux have_thin 1 0 0 || skip
aux prepare_vg 2
lvcreate -T -L8M $vg/pool -V10M -n $lv1
lvcreate -s -K -n snap $vg/$lv1
# check exclusive lock is preserved after merge
check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
lvconvert --merge $vg/snap
check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
lvremove -ff $vg
lvcreate -T -L8M $vg/pool -V10M -n $lv1
lvchange --addtag tagL $vg/$lv1