Bug 503205 - lvremove -f vg/origin removes snapshots too
lvremove -f vg/origin removes snapshots too
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Rajnoha
Cluster QE
: Regression
: 513306 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2009-05-29 11:43 EDT by Nate Straz
Modified: 2011-01-24 18:56 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-01 04:40:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nate Straz 2009-05-29 11:43:33 EDT
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)

How reproducible:
Every time

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
Actual results:
snapper/remove_origin_under_snap is removed

Expected results:
Neither LV should be removed.

Additional info:
Comment 1 Peter Rajnoha 2009-05-30 08:15:17 EDT
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)
Comment 2 Nate Straz 2009-08-20 10:29:20 EDT
*** Bug 513306 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.