Bug 503205 - lvremove -f vg/origin removes snapshots too
Summary: lvremove -f vg/origin removes snapshots too
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: Cluster QE
URL:
Whiteboard:
: 513306 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-29 15:43 UTC by Nate Straz
Modified: 2018-10-19 18:41 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-01 08:40:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nate Straz 2009-05-29 15:43:33 UTC
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 12:15:17 UTC
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 14:29:20 UTC
*** 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.