Bug 2222951

Summary: RFE: support conversion of LV to thin LV by setting original LV as thin-pool data
Product: Red Hat Enterprise Linux 9 Reporter: Zdenek Kabelac <zkabelac>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: medium    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 9.4Keywords: FutureFeature, Triaged
Target Milestone: rc   
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 Zdenek Kabelac 2023-07-14 15:10:02 UTC
Description of problem:

Users with existing data in i.e. Linear, Raid, VDO LVs may need to use then with thin-provisioning. While lvm2 already supports such user through 'external' origin, there could be cases where a direct conversion to thin-pool is better solutions.

To support this extend the 'lvconvert' with new supported conversion, that makes the original volume basically a 'data' volume for thin-pool and adds a thin volume with fully provisioned  volume mapping this data.

Such conversion should be possible to happen 'online' so user should not need to deactivate such LV.


Expected usage:

lvcreate -L10 -n normalLV  vgname

lvconvert --type thin  vgname/normalLV


Results with thin-pool with normalLV   being represented by thin.

Comment 2 Zdenek Kabelac 2023-07-14 15:12:22 UTC
Upstream code already provides the initial support with some limitation.

Currently user has to manually 'extend' thin-pool if he want to use thin-pool for creation of futher thin LVs in the same pool.

Comment 4 Zdenek Kabelac 2023-07-14 15:15:58 UTC
Also the primary use-case for this conversion can be seen by allowing to create multiple LVs within the single VDOPOOL.

User can convert 'VDOLV' into a thin volume with thin-pool having back-end in compressed deduplicated data volume handled by VDO target.