Bug 743976 - timing issue causing snapshot and origin removals to fail
Summary: timing issue causing snapshot and origin removals to fail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-06 16:07 UTC by Corey Marthaler
Modified: 2011-12-06 17:03 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.87-6.el6
Doc Type: Bug Fix
Doc Text:
Do not document.
Clone Of:
Environment:
Last Closed: 2011-12-06 17:03:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1522 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-12-06 00:50:10 UTC

Description Corey Marthaler 2011-10-06 16:07:32 UTC
Description of problem:

SCENARIO - [remove_snap_during_origin_io]
Create a snapshot and then attempt to remove it during origin IO
Making origin volume
Making snapshots of origin volume

 LV                        VG       Attr   LSize  Origin Snap%  Devices
 origin                    snapper  owi-ao  1.00g               /dev/sdc1(0)
 remove_during_origin_io_1 snapper  swi-a-  1.00g origin  0.04  /dev/sdc1(256)
 remove_during_origin_io_2 snapper  swi-a-  1.00g origin  0.04  /dev/sdc1(512)

Starting io to origin
dd if=/dev/zero of=/dev/snapper/origin count=3000000

Removing volume snapper/remove_during_origin_io_1
[root@grant-01 ~]# lvremove -f /dev/snapper/remove_during_origin_io_1
  LV snapper/remove_during_origin_io_1 in use: not deactivating
  Unable to deactivate logical volume "remove_during_origin_io_1"
# Note: if tried again right away, it usually works
[root@grant-01 ~]# lvremove -f /dev/snapper/remove_during_origin_io_1
  Logical volume "remove_during_origin_io_1" successfully removed


Version-Release number of selected component (if applicable):
2.6.32-203.el6.x86_64

lvm2-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
lvm2-libs-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
lvm2-cluster-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
device-mapper-libs-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
device-mapper-event-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
device-mapper-event-libs-1.02.66-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011
cmirror-2.02.87-3.el6    BUILT: Wed Sep 21 09:54:55 CDT 2011


How reproducible:
About 80% of the time

Comment 1 Corey Marthaler 2011-10-06 19:33:16 UTC
This appears to be a more general snapshot/origin removal issue. I've seen this now with quite a few snap test cases.

SCENARIO - [remove_origin_under_snap]
Create a snapshot and then attempt to remove it's origin
Making origin volume
Making snapshot of origin volume
sleeping for a bit
Attempt to remove origin volume
hayes-01: lvremove -f /dev/snapper/origin
  LV snapper/remove_origin_under_snap in use: not deactivating
  Unable to deactivate logical volume "remove_origin_under_snap"
should have been able to remove origin


SCENARIO - [stacked_snaps]
Stack snapshots on top of existing snapshots
Setting up base level origin/snapshot
Creating stacked level PV/VG
  Writing physical volume data to disk "/dev/snapper/origin"
Creating stacked level origin/snapshot
Removing stacked level origin/snapshot
  Unable to deactivate open snapper_stack-snap_level2 (253:8)
  Unable to deactivate logical volume "snap_level2"
couldn't remove snapshot snap_level2

Comment 2 Corey Marthaler 2011-10-06 19:48:42 UTC
Another regression is that you can now remove the origin volume, and the snapshot volume may remain.

Comment 3 Zdenek Kabelac 2011-10-18 14:46:45 UTC
I think, it's most probably related to my upstream fix:

https://www.redhat.com/archives/lvm-devel/2011-October/msg00082.html

Comment 4 Peter Rajnoha 2011-10-19 15:45:04 UTC
Corey tested a scratch with this patch and he was not able to hit this issue anymore.

Comment 7 Corey Marthaler 2011-10-20 14:41:35 UTC
Current snapshot regression tests now pass. Marking this bug verified in the latest rpms.

2.6.32-209.el6.x86_64

lvm2-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
lvm2-libs-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
lvm2-cluster-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
device-mapper-libs-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
device-mapper-event-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
device-mapper-event-libs-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
cmirror-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011

Comment 8 Peter Rajnoha 2011-10-26 13:05:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Do not document.

Comment 9 errata-xmlrpc 2011-12-06 17:03:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1522.html


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