1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Add additional test to start the snapshot merge (which had just failed

because an FS was mounted -- origin was still open).
This commit is contained in:
Mike Snitzer 2010-04-19 22:44:42 +00:00
parent 2b707b6806
commit d9933eaf1b

View File

@ -55,19 +55,24 @@ lvconvert --merge $vg/$(snap_lv_name_ $lv1)
lvremove -f $vg/$lv1
# "onactivate merge" test -- refresh LV while FS is still mounted;
# verify snapshot-origin target is still being used
# "onactivate merge" test
setup_merge $vg $lv1
lvs -a
mkdir test_mnt
mount $(lvdev_ $vg $lv1) test_mnt
lvconvert --merge $vg/$(snap_lv_name_ $lv1)
# -- refresh LV while FS is still mounted (merge must not start),
# verify 'snapshot-origin' target is still being used
lvchange --refresh $vg/$lv1
umount test_mnt
rm -r test_mnt
# an active merge uses the "snapshot-merge" target
dmsetup table ${vg}-${lv1} | grep -q " snapshot-origin "
test $? = 0
# -- refresh LV to start merge (now that FS is unmounted),
# an active merge uses the 'snapshot-merge' target
lvchange --refresh $vg/$lv1
dmsetup table ${vg}-${lv1} | grep -q " snapshot-merge "
# -- don't care if merge is still active; lvremove at this point
# may test stopping an active merge
lvremove -f $vg/$lv1