linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Johannes Nieß" <linux@johannes-niess.de>
To: linux-lvm@redhat.com
Subject: [linux-lvm] RFE: Convert standard LV to Thin and vice versa
Date: Sun, 24 Jan 2021 20:43:42 +0100	[thread overview]
Message-ID: <c673b13b-8742-d4e6-9249-6cdc9146b8b4@johannes-niess.de> (raw)


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

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?


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

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

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

                 reply	other threads:[~2021-01-25  8:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c673b13b-8742-d4e6-9249-6cdc9146b8b4@johannes-niess.de \
    --to=linux@johannes-niess.de \
    --cc=linux-lvm@redhat.com \
    --subject='Re: [linux-lvm] RFE: Convert standard LV to Thin and vice versa' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).