RFE: Convert standard LV to Thin and vice versa

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux