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: