Bug 983743 - external origin conversion attempt with reversed "-T" and "--thinpool" flag causes issues
external origin conversion attempt with reversed "-T" and "--thinpool" flag c...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Zdenek Kabelac
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 16:40 EDT by Corey Marthaler
Modified: 2014-06-17 21:18 EDT (History)
8 users (show)

See Also:
Fixed In Version: lvm2-2.02.102-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 07:22:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2013-07-11 16:40:18 EDT
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Corey Marthaler 2013-07-11 16:43:01 EDT
While playing with all the possible flag scenarios, I ran across this issue:

# Proper way to convert an external origin volume
[root@qalvm-01 ~]# lvconvert --thinpool VG/POOL --originname extorigin1 -T origin1
  Logical volume "extorigin1" created

# Improper way to convert
[root@qalvm-01 ~]# lvconvert -T VG/POOL --originname extorigin3 --thinpool origin3
  Logical volume "origin3_tmeta" created
  origin3_tdata is expected to have only one segment using it, while it has 3
  Failed to find pool_seg for origin3_tdata
  LV origin3_tdata: segment 1 pool data LV does not point back to same LV
  Internal error: LV segments corrupted in origin3_tdata.
  origin3_tdata is expected to have only one segment using it, while it has 3
  Failed to find pool_seg for origin3_tdata
  LV POOL: thin pool segment 1 data LV does not refer back to pool LV
  Internal error: LV segments corrupted in POOL.


3.10.0-0.rc5.61.el7.x86_64

lvm2-2.02.99-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
lvm2-libs-2.02.99-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
lvm2-cluster-2.02.99-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
device-mapper-1.02.78-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
device-mapper-libs-1.02.78-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
device-mapper-event-1.02.78-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
device-mapper-event-libs-1.02.78-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
cmirror-2.02.99-0.79.el7    BUILT: Mon Jul  8 08:28:24 CDT 2013
Comment 3 Corey Marthaler 2013-07-15 17:01:27 EDT
same issue w/ reversed --thin and --thinpool:

lvconvert --thin snapper_thinp/POOL --originname extorigin5 --thinpool origin5  origin5_tdata is expected to have only one segment using it, while it has 3
  Failed to find pool_seg for origin5_tdata
  LV origin5_tdata: segment 1 pool data LV does not point back to same LV
  Internal error: LV segments corrupted in origin5_tdata.
  origin5_tdata is expected to have only one segment using it, while it has 3
  Failed to find pool_seg for origin5_tdata
  LV POOL: thin pool segment 1 data LV does not refer back to pool LV
  Internal error: LV segments corrupted in POOL.
Comment 4 Zdenek Kabelac 2013-08-08 06:10:40 EDT
Yep internal error is a bug a needs fix - tool needs to report it doesn't support thinpool to be read-only external origin.

But just clarifying here --thin  and  -T   are equal  (T is shortcut for thin)
So comment 3 and comment 1 are the same issue.
Comment 5 Zdenek Kabelac 2013-08-09 17:22:05 EDT
Prohibited conversion of thin pool to external origin:

https://www.redhat.com/archives/lvm-devel/2013-August/msg00036.html
Comment 8 Corey Marthaler 2014-01-27 13:35:10 EST
Fix verified in the latest rhel7 rpms.

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


[root@host-050 ~]# lvconvert -T snapper_thinp/POOL --originname extorigin4 --thinpool origin4
  Can't convert pool "snapper_thinp/origin4" to external origin.
[root@host-050 ~]# lvconvert --thin snapper_thinp/POOL --originname extorigin5 --thinpool origin5
  Can't convert pool "snapper_thinp/origin5" to external origin.
Comment 9 Ludek Smid 2014-06-13 07:22:32 EDT
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.

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