RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1136925 - LVM hangs when removing snapshot in clustered volume group
Summary: LVM hangs when removing snapshot in clustered volume group
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-03 15:30 UTC by Patrik Hagara
Modified: 2015-07-22 07:35 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.117-1.el6
Doc Type: Bug Fix
Doc Text:
lvm2 tool has incorrectly used LV locks for snapshot volumes and as a result it may have tried to access incorrect devices for locking. Tool has been fixed to always manipulate with snapshot origin volume lock.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:35:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
lvremove debug output (27.85 KB, text/plain)
2014-09-03 15:30 UTC, Patrik Hagara
no flags Details
more defailed logs (5.35 KB, application/octet-stream)
2014-09-04 10:46 UTC, Peter Rajnoha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1411 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-07-20 18:06:52 UTC

Description Patrik Hagara 2014-09-03 15:30:29 UTC
Created attachment 934136 [details]
lvremove debug output

Description of problem:
After a certain sequence of LVM commands (listed in "steps to reproduce" below), the lvremove on an exclusively activated snapshot LV in clustered VG fails with the following error message:

# lvremove testvg/temp
Do you really want to remove active clustered logical volume temp? [y/n]: y
  Error locking on node virt-136: Unable to deactivate open testvg-template-real (253:4)
  Failed to resume template.

However, executing the same command again seems to fix the issue.


Version-Release number of selected component (if applicable):
# uname -r
2.6.32-431.23.3.el6.x86_64
# rpm -qv lvm2 lvm2-libs lvm2-cluster udev device-mapper device-mapper-libs device-mapper-event device-mapper-event-libs
lvm2-2.02.100-8.el6.x86_64
lvm2-libs-2.02.100-8.el6.x86_64
lvm2-cluster-2.02.100-8.el6.x86_64
udev-147-2.51.el6.x86_64
device-mapper-1.02.79-8.el6.x86_64
device-mapper-libs-1.02.79-8.el6.x86_64
device-mapper-event-1.02.79-8.el6.x86_64
device-mapper-event-libs-1.02.79-8.el6.x86_64


How reproducible:
always


Steps to Reproduce:
# all commands executed on a single cluster node
# 1) setup clustered vg
pvcreate /dev/sda -ffy
vgcreate -cy testvg /dev/sda
# 2) create template
lvcreate -aey -n disk -L 64m testvg
lvrename /dev/testvg/disk /dev/testvg/template
lvcreate -aey -n disk -L64m testvg
# 3) basic workflow
lvrename /dev/testvg/disk /dev/testvg/temp
lvcreate -s /dev/testvg/template -n disk -aey -L64m
lvremove -f /dev/testvg/temp
lvrename /dev/testvg/disk /dev/testvg/temp
lvcreate -aey -n disk -L 64m testvg
# 4) try to remove temp snapshot
lvremove -f /dev/testvg/temp
# Issuing `lvs` now would hang lvm (uninterruptible sleep,
# kernel task hang timer expiring, can't even reboot gracefully).
# Other machines automatically activate the temp LV (non-exlc).
# However, second call to lvremove succeeds. (Why?)
lvremove -f /dev/testvg/temp
# And lvm seems to work as usual now
lvs


Actual results:
error and hang


Expected results:
lvremove should work on the first try


Additional info:
Running a quorate 3-node cman/corosync cluster with fencing and clvmd.
Also tested on RHEL-6.6 and 7.0 with the same results.

Comment 2 Peter Rajnoha 2014-09-04 10:46:38 UTC
Created attachment 934368 [details]
more defailed logs

Logs from first and second lvremove with dmsetup logs showing there's suspended LV after first lvremove.

Comment 3 Zdenek Kabelac 2014-09-04 14:56:41 UTC
Yep easily reproducible on a singlenode cluster as well - working on patch...

Comment 9 Corey Marthaler 2015-05-06 21:36:29 UTC
Marking verified in the latest rpms.

2.6.32-554.el6.x86_64
lvm2-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
lvm2-libs-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
lvm2-cluster-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
udev-147-2.61.el6    BUILT: Mon Mar  2 05:08:11 CST 2015
device-mapper-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-libs-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-event-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-event-libs-1.02.95-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.118-2.el6    BUILT: Wed Apr 15 06:34:08 CDT 2015


[root@host-122 ~]# cman_tool nodes
Node  Sts   Inc   Joined               Name
   1   M    104   2015-05-06 16:13:45  host-122
   2   M    108   2015-05-06 16:13:45  host-123
   3   M    112   2015-05-06 16:13:45  host-124

[root@host-122 ~]#  pvcreate /dev/sda1 -ffy
  Physical volume "/dev/sda1" successfully created
[root@host-122 ~]# vgcreate -cy testvg /dev/sda1
  Clustered volume group "testvg" successfully created
[root@host-122 ~]# lvcreate -aey -n disk -L 64m testvg
  Logical volume "disk" created.
[root@host-122 ~]# lvrename /dev/testvg/disk /dev/testvg/template
  Renamed "disk" to "template" in volume group "testvg"
[root@host-122 ~]# lvcreate -aey -n disk -L64m testvg
  Logical volume "disk" created.
[root@host-122 ~]# lvrename /dev/testvg/disk /dev/testvg/temp
  Renamed "disk" to "temp" in volume group "testvg"
[root@host-122 ~]# lvcreate -s /dev/testvg/template -n disk -aey -L64m
  Logical volume "disk" created.
[root@host-122 ~]# lvremove -f /dev/testvg/temp
  Logical volume "temp" successfully removed
[root@host-122 ~]# lvrename /dev/testvg/disk /dev/testvg/temp
  Renamed "disk" to "temp" in volume group "testvg"
[root@host-122 ~]# lvcreate -aey -n disk -L 64m testvg
  Logical volume "disk" created.
[root@host-122 ~]# lvremove -f /dev/testvg/temp
  Logical volume "temp" successfully removed
[root@host-122 ~]# lvs -a -o +devices
  LV       VG         Attr       LSize    Devices
  disk     testvg     -wi-a-----  64.00m  /dev/sda1(16)
  template testvg     -wi-a-----  64.00m  /dev/sda1(0)

Comment 10 errata-xmlrpc 2015-07-22 07:35:26 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.

https://rhn.redhat.com/errata/RHBA-2015-1411.html


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