[linux-lvm] RFE: Convert standard LV to Thin and vice versa
Johannes Nieß
linux at johannes-niess.de
Sun Jan 24 19:43:42 UTC 2021
Hi,
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20210124/1a19319c/attachment.htm>
More information about the linux-lvm
mailing list