Red Hat Bugzilla – Bug 503205
lvremove -f vg/origin removes snapshots too
Last modified: 2011-01-24 18:56:22 EST
Description of problem:
Our regression test is now failing:
SCENARIO - [remove_origin_under_snap]
Create a snapshot and then attempt to remove it's origin
Making origin volume
Making snapshot of origin volume
Attempt to remove origin volume
shouldn't have been able to remove origin
Version-Release number of selected component (if applicable):
lvm2-2.02.46-2.el5 (worked on lvm2-2.02.40-6.el5)
Steps to Reproduce:
1. lvcreate -L 4G snapper -n origin
2. lvcreate -s /dev/snapper/origin -c 32 -n remove_origin_under_snap -L 3.5G
3. lvremove -f snapper/origin
snapper/remove_origin_under_snap is removed
Neither LV should be removed.
This is intentional and the behavior has changed here (since 2.02.44 I think). There was a problem with dependencies when removing the whole VG with snapshots before (e.g. "lvremove -f VG" could fail in this situation because of the ordering of particular lvremove actions for LVs in that VG).
Now, we check for dependencies and remove automatically all snapshots first and then the origin if "lvremove VG/origin" is called. So this is not a bug, just a change in the way snapshot/origin LVs are handled when removing.
(...maybe we should add a line or two in the man about this)
*** Bug 513306 has been marked as a duplicate of this bug. ***