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 814777 - Ensure lvrename handles all types of thin LVs sensibly
Summary: Ensure lvrename handles all types of thin LVs sensibly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.4
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 6.4
Assignee: Zdenek Kabelac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 814732
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-20 16:03 UTC by Alasdair Kergon
Modified: 2013-02-21 08:09 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.98-1.el6
Doc Type: Bug Fix
Doc Text:
Rename of thin snapshot volumes have not been working. This has been fixed also with full support for stacked devices.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:09:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0501 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2013-02-20 21:30:45 UTC

Description Alasdair Kergon 2012-04-20 16:03:30 UTC
Check all uses of lvrename with thin pools/LVs/snapshots work as expected.

Comment 1 Zdenek Kabelac 2012-04-25 09:09:44 UTC
New set of tests will be created once we start to support lvconvert.

Comment 2 Corey Marthaler 2012-07-26 19:47:57 UTC
QE reviewed this BZ for QA_ACK but was unable to ack due to a lack of
requirements or description of how the new feature is supposed to work or be
tested.

What are all the uses of lvrename?

Please see
https://wiki.test.redhat.com/ClusterStorage/WhyNoAck

Comment 3 Alasdair Kergon 2012-07-30 19:22:27 UTC
Well if you need my short-hand spelling out:
Create every possible type of LV involved with thin provisioning (pool/metadata/snapshots), in every possible state (active/inactive, undergoing any conversions/moves that might be permitted), then run lvrename against every distinct type of LV name present (incl. hidden ones) and check the behaviour is sensible (i.e. it either refuses the rename if it wouldn't work, or it permits it and does the rename correctly and completely, incl all associated LVs that share the main part of the name be they active or inactive).

Comment 5 Corey Marthaler 2012-07-30 21:59:45 UTC
Adding QA ack for 6.4. 

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.

Comment 7 Corey Marthaler 2012-08-29 20:49:51 UTC
FWIW, the current 6.3 rpms do not support rename of thin snaps.

[root@taft-01 ~]# lvs -a -o +devices
  LV           VG            Attr     LSize   Pool Origin Data%  Devices
  POOL         snapper_thinp twi-a-tz 300.00m               0.00 POOL_tdata(0)
  [POOL_tdata] snapper_thinp Twi-aot- 300.00m                    /dev/sdh1(0)
  [POOL_tmeta] snapper_thinp ewi-aot-   4.00m                    /dev/sdg1(0)
  origin       snapper_thinp Vwi-a-tz   1.00g POOL          0.00
  rename_snapA snapper_thinp Vwi-a-tz   1.00g POOL origin   0.00

[root@taft-01 ~]# lvrename /dev/snapper_thinp/rename_snapA /dev/snapper_thinp/rename_snapB
  Cannot rename "rename_snapA": name format not recognized for internal LV "POOL"

Comment 8 Zdenek Kabelac 2012-10-09 12:25:24 UTC
Insert layer has been updated to support thin provisioning rename of stacked devices:

https://www.redhat.com/archives/lvm-devel/2012-October/msg00013.html

and should be usable with release 2.02.98.

Comment 10 Corey Marthaler 2012-12-05 20:10:45 UTC
Verified in the latest rpms.

2.6.32-343.el6.x86_64

lvm2-2.02.98-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
lvm2-libs-2.02.98-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
lvm2-cluster-2.02.98-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
udev-147-2.43.el6    BUILT: Thu Oct 11 05:59:38 CDT 2012
device-mapper-1.02.77-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
device-mapper-libs-1.02.77-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
device-mapper-event-1.02.77-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
device-mapper-event-libs-1.02.77-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012
cmirror-2.02.98-3.el6    BUILT: Mon Nov  5 06:45:48 CST 2012

SCENARIO - [snap_rename_active]
Create and attempt to rename the following volumes associated with thinprovising while ACTIVE:
pool volume, pool_tdata, pool_tmeta, virt origin volume, thinp snapshot volume
Making origin volume
Creating thinpool and corresponding thin virtual volumes (one to be used as an origin)
lvcreate --thinpool POOLA -L 1G snapper_thinp
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n origin
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other1
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other2
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other3
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other4
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other5
Create a snap and then rename it
lvcreate -s /dev/snapper_thinp/origin -n rename_snapA
taft-01: lvrename /dev/snapper_thinp/POOLA /dev/snapper_thinp/POOLB
taft-01: lvrename /dev/snapper_thinp/POOLB_tmeta /dev/snapper_thinp/POOLC_tmeta
  Names including "_tmeta" are reserved. Please choose a different LV name.
taft-01: lvrename /dev/snapper_thinp/POOLB_tdata /dev/snapper_thinp/POOLC_tdata
  Names including "_tdata" are reserved. Please choose a different LV name.
taft-01: lvrename /dev/snapper_thinp/origin /dev/snapper_thinp/originB
taft-01: lvrename /dev/snapper_thinp/rename_snapA /dev/snapper_thinp/rename_snapB
Removing volume snapper_thinp/rename_snapB
Removing thin origin and other virtual thin volumes
Removing thinpool snapper_thinp/POOLB


SCENARIO - [snap_rename_inactive]
Create and attempt to rename the following volumes associated with thinprovising while INACTIVE:
pool volume, pool_tdata, pool_tmeta, virt origin volume, thinp snapshot volume
Making origin volume
Creating thinpool and corresponding thin virtual volumes (one to be used as an origin)
lvcreate --thinpool POOLA -L 1G snapper_thinp
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n origin
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other1
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other2
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other3
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other4
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOLA -n other5
Create a snap and then rename it
lvcreate -s /dev/snapper_thinp/origin -n rename_snapA
Deactivate the volume group
taft-01: lvrename /dev/snapper_thinp/POOLA /dev/snapper_thinp/POOLB
taft-01: lvrename /dev/snapper_thinp/POOLB_tmeta /dev/snapper_thinp/POOLC_tmeta
  Names including "_tmeta" are reserved. Please choose a different LV name.
taft-01: lvrename /dev/snapper_thinp/POOLB_tdata /dev/snapper_thinp/POOLC_tdata
  Names including "_tdata" are reserved. Please choose a different LV name.
taft-01: lvrename /dev/snapper_thinp/origin /dev/snapper_thinp/originB
taft-01: lvrename /dev/snapper_thinp/rename_snapA /dev/snapper_thinp/rename_snapB
Removing volume snapper_thinp/rename_snapB
Removing thin origin and other virtual thin volumes
Removing thinpool snapper_thinp/POOLB

Comment 11 errata-xmlrpc 2013-02-21 08:09:29 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-2013-0501.html


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