Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 973432

Summary: if deactivation is needed before a _tmeta swap, the swap cmd should mention that and exit
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Default / Unclassified QA Contact: cluster-qe <cluster-qe>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: medium    
Priority: medium CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac
Version: 7.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1006065 (view as bug list) Environment:
Last Closed: 2014-06-13 09:57:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1006065    

Description Corey Marthaler 2013-06-11 23:04:30 UTC
Description of problem:
This is similar to 973419, but w/o deactivating the pool device before making the swap.

[root@qalvm-01 ~]# lvs -a -o +devices
  LV           VG            Attr      LSize  Pool Origin Data%  Devices
  POOL         snapper_thinp twi---tz-  1.00g               0.00 POOL_tdata(0)
  [POOL_tdata] snapper_thinp Twi-aot--  1.00g                    /dev/vdh1(0)
  [POOL_tmeta] snapper_thinp ewi---t--  8.00m                    /dev/vdh1(256)
  newtmeta     snapper_thinp -wi-ao---  4.00m                    /dev/vdd1(0)
  origin       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other1       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other2       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other3       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other4       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  other5       snapper_thinp Vwi-a-tz-  1.00g POOL          0.00
  tmeta_swap   snapper_thinp Vwi-a-tz-  1.00g POOL origin   0.00

[root@qalvm-01 ~]# lvconvert --poolmetadata snapper_thinp/newtmeta --thinpool snapper_thinp/POOL
Do you want to swap metadata of snapper_thinp/POOL pool with volume snapper_thinp/newtmeta? [y/n]: y
  device-mapper: create ioctl on snapper_thinp-POOL_tmeta failed: Device or resource busy
  Failed to activate pool logical volume snapper_thinp/POOL.
  Device snapper_thinp-POOL_tdata (253:3) is used by another device.
  Failed to deactivate pool data logical volume.


Version-Release number of selected component (if applicable):
3.8.0-0.40.el7.x86_64

lvm2-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
lvm2-libs-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
lvm2-cluster-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-libs-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-event-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
device-mapper-event-libs-1.02.78-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013
cmirror-2.02.99-0.46.el7    BUILT: Tue Jun  4 19:27:58 CDT 2013

Comment 2 Corey Marthaler 2014-01-24 22:58:34 UTC
This is fixed in the latest rpms and should be added to the errata.

[root@host-050 ~]# lvconvert --yes --poolmetadata snapper_thinp/newtmeta --thinpool snapper_thinp/POOL
  Cannot convert pool snapper_thinp/POOL with active thin volumes.

lvm2-2.02.105-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
lvm2-libs-2.02.105-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
lvm2-cluster-2.02.105-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
device-mapper-1.02.84-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
device-mapper-libs-1.02.84-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
device-mapper-event-1.02.84-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
device-mapper-event-libs-1.02.84-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014
device-mapper-persistent-data-0.2.8-3.el7    BUILT: Fri Dec 27 13:40:56 CST 2013
cmirror-2.02.105-1.el7    BUILT: Wed Jan 22 07:34:15 CST 2014

Comment 4 Ludek Smid 2014-06-13 09:57:13 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.