Bug 1020413

Summary: lvconvert validation is missing when same LV name is used for thinpool and originname
Product: [Fedora] Fedora Reporter: Zdenek Kabelac <zkabelac>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, bmarzins, bmr, dwysocha, heinzm, jonathan, lvm-team, msnitzer, prajnoha, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.106-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1045625 1133079 (view as bug list) Environment:
Last Closed: 2014-04-11 16:01:52 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: 1045625, 1133079, 1153306    

Description Zdenek Kabelac 2013-10-17 15:43:26 UTC
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:

Comment 1 Zdenek Kabelac 2014-01-28 12:27:29 UTC
Upstream commit adds more validation to lvconvert to cover this case:

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