archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] RFE: Convert standard LV to Thin and vice versa
@ 2021-01-24 19:43 Johannes Nieß
  0 siblings, 0 replies; only message in thread
From: Johannes Nieß @ 2021-01-24 19:43 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1.1: Type: text/plain, Size: 1541 bytes --]


Currently we can convert a standard LV to a thin LV with an external, 
read only origin as per man lvmthin. Unwritten portions of the thin LV 
are read from the external LV. I assume that new portions are written to 
a thin snapshot, but the man page is silent about this.

lvconvert --type thin --thinpool VG/ThinPoolLV --originname 
NewExternalOriginLV VG/ExampleLV

This means the external LV is needed forever, even if all of its extents 
are outdated and replaced by thin extents. I'd like to get a full 
conversion to a ThinLV by modifying only meta data.

Within lvconvert:
0) Use external thin LV as above as the starting point
1) Create new ThinLV stub
2) Assign extents of external LV to thin pool in a 'used', read only state.
3) Assign extents of external LV to new ThinLV .
4) Switch link of the thin snapshot to the new ThinLV
5) Make ThinLV read only
6) Remove external LV stub

To release the outdated ThinLV extents, we just need to merge the 
initial thin snapshot with it.

One great use case is instant bare metal recovery: Create an empty 
ThinPool on proper HW and just activate the external volumes (on USB 
Disks). Redundancy is then restored in the background by converting to a 
Thin LV as above and 'pvmove'ing.

Creating these backups would also need a way to 'unthin' an LV snapshot 
to a 'thick' LV with an independent copy of all extents. Can we already 
to this by e. g. creating and splitting a mirror? Or by merging with an 
empty 'thick' LV? Or do we need the above steps in the opposite direction?

[-- Attachment #1.2: Type: text/html, Size: 2030 bytes --]

[-- Attachment #2: Type: text/plain, Size: 197 bytes --]

linux-lvm mailing list
read the LVM HOW-TO at

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-25  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 19:43 [linux-lvm] RFE: Convert standard LV to Thin and vice versa Johannes Nieß

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).