Bug 814732

Summary: Extend lvconvert to construct thin pools from pre-formatted LVs
Product: Red Hat Enterprise Linux 6 Reporter: Alasdair Kergon <agk>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: agk, cmarthal, dwysocha, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, xiaoli, zkabelac
Target Milestone: rcKeywords: FutureFeature
Target Release: 6.4   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.98-1.el6 Doc Type: Enhancement
Doc Text:
Feature: lvconvert has been enhanced to support conversion or pre-formatted LVs into a thin pool volume. With options --thinpool data_lv_name --poolmetadata metadata_lv_name user may use any pre-formatted LV to construct thin pool just like with lvcreate command. Reason: With lvcreate user could not have specify i.e. mirrored LV for metadata volume and it has been also complex, to guide allocation mechanism to use proper PVs for data and metadata LV. The lvconvert is easier to use for these cases.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:09:23 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: 812734, 814777    

Description Alasdair Kergon 2012-04-20 14:51:10 UTC
Given an LV that contains data already in pool format, using lvconvert you can tell LVM to treat it as a pool and create LVs for any thin devices it contains.

Comment 1 Zdenek Kabelac 2012-04-27 14:20:00 UTC
We may support here probably several ways:

Initialy we may add this support:


lvconvert   [-T|--thinpool     thinpool_lv] [--poolmetadatasize size | thinmetadata_lv] [--zero {y|n} |  --provisioned ] [--chunksize size]

User should be able to specify the LV that is should be used for the pool.

He may specify the size of the poolmetadata device, or it might be a second given LV (i.e. some mirrored LV), or it could be deduced with the same logic used in lvcreate (estimated from size of pool and chunksize and should fit 100MB)

Chunksize is either deduced to fit 100MB metadata size or given.

Zero means zeroing of provisioned blocks

Provisioned (or any better name?)  would create metadata with provisioned mapping of all blocks -  i.e.  user gives normal LV - and turns this LV in thin volume. Then he may extend the pool to add some snapshots for such LV...

Comment 2 Corey Marthaler 2012-07-26 20:46:15 UTC
QE reviewed this BZ for QA_ACK but was unable to ack due to a lack of
requirements or description of how the new feature is supposed to work or be
tested.

Too many uncertainties in comment #1. Please add a more concrete definition of this feature as well as release criteria.

Please see
https://wiki.test.redhat.com/ClusterStorage/WhyNoAck

Comment 3 Corey Marthaler 2012-08-09 17:51:49 UTC
QA planning phase ends Aug 10th (tomorrow), without more information this feature will likely be nacked by QA.

https://engineering.redhat.com/program/rhel/rhel-6-4-0/

Comment 4 Zdenek Kabelac 2012-08-10 08:40:07 UTC
This feature should allow user to create thin pool data and metadata devices from already existing ones.

Thus user should be able to create  mirror/raid type LV and then use the command lvconvert to make it  thin data device or metadata device.

API from comment 1 might be slightly different.

Test should cover various scenarios - where mirror LVs are being turned into thin devices.

Key idea here is - user should be able to use mirrored  metadata device since the damage of metadata has serious impact on the stability of whole thinprovisiong - so using mirrored LVs  for metadata device is important for users.

Comment 5 Corey Marthaler 2012-08-15 22:11:52 UTC
Adding QA ack for 6.4.

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.

Comment 6 Zdenek Kabelac 2012-10-09 12:29:15 UTC
lvconvert functionality has been updated upstream.

https://www.redhat.com/archives/lvm-devel/2012-October/msg00015.html

(see Bug 858874 for related problems)

Pre-formatted LVs should be convertible to thin pools with version 2.02.98

Comment 8 Nenad Peric 2012-10-31 11:40:11 UTC
Based on tests for Bug 858874 and a thinp sanity test I am marking this BZ verified with same versions as the mentioned BZ.

Comment 9 errata-xmlrpc 2013-02-21 08:09:23 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.

http://rhn.redhat.com/errata/RHBA-2013-0501.html