Bug 1561108

Summary: Can not use thin volume as ext.origin
Product: [Community] LVM and device-mapper Reporter: Marian Csontos <mcsontos>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: POST --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 2.02.171Keywords: Regression
Target Milestone: ---Flags: rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Marian Csontos 2018-03-27 15:45:52 UTC
Description of problem:
Can not use thin-volume as ext.origin.

Version-Release number of selected component (if applicable):
lvm2-2.02.171 - this is broken in RHEL-7.4 onward.

How reproducible:
100%

Steps to Reproduce:
- $VG/$LV is a thin-volume in $POOL1
- I have a thin pool $POOL2
- run `lvconvert --type=thin --thinpool=$VG/$POOL2 --yes --originname=${LV}_origin $VG/$LV`

Actual results:
# @718 > lvconvert --type=thin --thinpool=vg/tpool_VQbf --yes --originname=lv1_origin vg/lv1
  Command on LV vg/lv1 does not accept LV type thin.
  Command not permitted on LV vg/lv1. 

Expected results:
# @518 > lvconvert --type=thin --thinpool=vg/tpool_xS6h --yes --originname=lv1_origin vg/lv1
  Logical volume "lv1_origin" created.
  Converted vg/lv1 to thin volume with external origin vg/lv1_origin.

Additional info:

# @718 > lvs -av vg                                                   
  WARNING: Not using lvmetad because a repair command was run.        
  LV                 VG #Seg Attr       LSize Maj Min KMaj KMin Pool       Origin Data%  Meta%  
  lv1                vg    1 Vwi-a-tz-- 1.00m  -1  -1  253    5 tpool_2TZX        0.00          
  [lvol0_pmspare]    vg    1 ewi------- 2.00m  -1  -1   -1   -1                                 
  tpool_2TZX         vg    1 twi-aotz-- 1.00m  -1  -1  253    3                   0.00   1.95   
  [tpool_2TZX_tdata] vg    1 Twi-ao---- 1.00m  -1  -1  253    2                                 
  [tpool_2TZX_tmeta] vg    1 ewi-ao---- 2.00m  -1  -1  253    1                                 
  tpool_VQbf         vg    1 twi-a-tz-- 1.00m  -1  -1  253    8                   0.00   1.76   
  [tpool_VQbf_tdata] vg    1 Twi-ao---- 1.00m  -1  -1  253    7                                 
  [tpool_VQbf_tmeta] vg    1 ewi-ao---- 2.00m  -1  -1  253    6

Comment 1 Marian Csontos 2018-03-27 15:47:13 UTC
This used to work in RHEL-7.2

Comment 2 Zdenek Kabelac 2019-08-28 14:24:30 UTC
Fixed already in version 2.02.178-rc1