]> sourceware.org Git - lvm2.git/commitdiff
tests: readonly snapshot thick origin can't be merged
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 17 Feb 2021 10:38:28 +0000 (11:38 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 17 Feb 2021 10:53:19 +0000 (11:53 +0100)
When user sets snapshot thick origin as read-only - lvconvert --merge refuses
to merge until user swiches origin to 'read-write'.

test/shell/snapshot-merge.sh

index a50ffdcd8400b4b02fd898306d65e68c8dc3ea11..ff9de96f85d83257641f819ce737c99acb617e9c 100644 (file)
@@ -55,6 +55,12 @@ setup_merge_ $vg $lv1
 # make sure lvconvert --merge requires explicit LV listing
 not lvconvert --merge
 
+# check read-only origin is protected from being merge
+lvchange -pr $vg/$lv1
+not lvconvert --merge "$vg/$(snap_lv_name_ "$lv1")" |& tee out
+grep "read-only origin" out
+lvchange -prw $vg/$lv1
+
 # check exclusive lock is preserved after merge
 check lv_field "$vg/$lv1" lv_active_exclusively "active exclusively"
 lvconvert --merge "$vg/$(snap_lv_name_ "$lv1")"
This page took 0.041956 seconds and 5 git commands to generate.