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 1133079 - lvconvert validation is missing when same LV name is used for thinpool and originname
Summary: lvconvert validation is missing when same LV name is used for thinpool and or...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.6
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1020413
Blocks: 1119323 1153306
TreeView+ depends on / blocked
 
Reported: 2014-08-22 15:59 UTC by Corey Marthaler
Modified: 2015-07-22 07:35 UTC (History)
16 users (show)

Fixed In Version: lvm2-2.02.117-1.el6
Doc Type: Bug Fix
Doc Text:
lvconvert command missed to early validate --originame argument to be different from --thinpool. This has been detected later during actual command processing and showing internal error message to a user. Tool has been fixed and arguments are validated before conversion begins.
Clone Of: 1020413
Environment:
Last Closed: 2015-07-22 07:35:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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 Corey Marthaler 2014-08-22 15:59:37 UTC
+++ This bug was initially created as a clone of Bug #1020413 +++

Description of problem:

Conversion command to convert LV into a thin LV and making the given LV to be an  external origin for this LV is missing validation:

lvconvert --thinpool mvg/lvol1  --originname ext  -T mvg/lvol1

Command aborts too late, when some part of conversion already changed lvm2 metadata and change the table line.

  Logical volume "lvol1_tmeta" created
  Converted mvg/lvol1 to thin pool.
  Logical volume "ext" created
  Cannot rename internal LV "lvol1_tdata".
  Internal error: Referenced LV lvol1_tdata not listed in VG mvg.

As a consequence if the user wanted to convert lvol1 just to some real pool - he now already lost lvol1 (and has to use immediately deactive pool and vgcfgrestore lvm2 metadata).


Version-Release number of selected component (if applicable):
2.02.102

How reproducible:


Steps to Reproduce:
1. lvcreate -L10 -n lvol1
2. lvconvert --thinpool mvg/lvol1  --originname ext  -T mvg/lvol1
3.

Actual results:


Expected results:
Report incorrect parameters being passed in.

Additional info:

--- Additional comment from Zdenek Kabelac on 2014-01-28 07:27:29 EST ---

Upstream commit adds more validation to lvconvert to cover this case:

https://www.redhat.com/archives/lvm-devel/2014-January/msg00064.html

Comment 2 Corey Marthaler 2014-08-22 16:04:07 UTC
This never made it into rhel6.6.

[root@host-076 ~]# lvs -a -o +devices
  LV              Attr       LSize   Pool Origin     Data%  Meta% Devices
  POOL            twi-a-tz-- 100.00m                 0.00   1.07  POOL_tdata(0)
  [POOL_tdata]    Twi-ao---- 100.00m                              /dev/sdh1(1)
  [POOL_tmeta]    ewi-ao----   4.00m                              /dev/sde1(0)
  extorigin1      ori------- 100.00m                              /dev/sdh1(26)
  extorigin2      ori------- 100.00m                              /dev/sdh1(51)
  [lvol0_pmspare] ewi-------   4.00m                              /dev/sdh1(0)
  origin1         Vwi-a-tz-- 100.00m POOL extorigin1 0.00
  origin2         Vwi-a-tz-- 100.00m POOL extorigin2 0.00
  origin3         -wi-a----- 100.00m                              /dev/sdh1(76)
  origin4         twi-a-tz-- 100.00m                 0.00   0.88  origin4_tdata(0)
  [origin4_tdata] Twi-ao---- 100.00m                              /dev/sdh1(101)
  [origin4_tmeta] ewi-ao----   4.00m                              /dev/sdh1(176)
  origin5         twi-a-tz-- 100.00m                 0.00   0.88  origin5_tdata(0)
  [origin5_tdata] Twi-ao---- 100.00m                              /dev/sdh1(126)
  [origin5_tmeta] ewi-ao----   4.00m                              /dev/sdh1(177)
  origin6         -wi-a----- 100.00m                              /dev/sdh1(151)

[root@host-076 ~]# lvconvert --thinpool snapper_thinp/origin6 --originname extorigin6 -T snapper_thinp/origin6
  WARNING: Converting logical volume snapper_thinp/origin6 to pool's data volume.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert snapper_thinp/origin6? [y/n]: y
  Logical volume "lvol1" created
  Converted snapper_thinp/origin6 to thin pool.
  Logical volume "extorigin6" created
  Cannot rename internal LV "origin6_tdata".
  Internal error: Referenced LV origin6_tdata not listed in VG snapper_thinp.
  Manual intervention may be required to remove abandoned LV(s) before retrying.


2.6.32-494.el6.x86_64
lvm2-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
lvm2-libs-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
lvm2-cluster-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-libs-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-event-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-event-libs-1.02.88-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.109-2.el6    BUILT: Tue Aug 19 09:32:25 CDT 2014

Comment 3 Zdenek Kabelac 2014-11-25 14:08:47 UTC
Fixed with upstream commit (in version 2.02.113):

https://www.redhat.com/archives/lvm-devel/2014-November/msg00187.html

# lvcreate -L10 -n lvol1 vg
  Logical volume "lvol1" created.
# lvconvert --thinpool vg/lvol1 --originname ext -T vg/lvol1
  Can't use same name lvol1 for converted and pool volume.
  Run `lvconvert --help' for more information.

Comment 6 Corey Marthaler 2015-04-09 21:37:19 UTC
Fix verified in the latest rpms.

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


[root@host-080 ~]# lvconvert --thinpool snapper_thinp/origin6 --originname extorigin6 -T snapper_thinp/origin6
  Can't use same name origin6 for converted and pool volume.
  Run `lvconvert --help' for more information.

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