[linux-lvm] how to convert a disk containing a snapshot to a snapshot lv?

Tomas Dalebjörk tomas.dalebjork at gmail.com
Tue Dec 28 06:40:45 UTC 2021

Yes, it is an incremental backup based of the cow device
no worries about the backup, that works fine, and now by just creating a lv snapshot on it, works too
sent you an example before
# extend vg with new bu disk
vgextend xxx newdisk
# create lv structure on disk
lvcreate -s -L wholedisksize -n s1 xxx/lv newdisk
# merge has to be started offline?
lvchange -a n xxx/lv
# start merge
lvconvert -merge -b xxx/s1
# online the lv
lvchange -a y xxx/s1

The backup is provisioned through the disk, and makes the data available immediately

But, I guess I can skip some steps?

Restoring data in just a matter of minutes, regardless of size, or will say, making the data available anywhere in just a few minutes, regardless of size

Also working with writes, without destroying the backup

are there a way to get a signal when a merge has completed?
or do I have to implement a monitor 
dmsetup xxx
or lvs
to check when merge has completed

Reference Tomas

Sent from my iPhone

> On 28 Dec 2021, at 06:32, Stuart D Gathman <stuart at gathman.org> wrote:
>> If you want to give it a try, just create a snapshot on a specific device
>> And change all the blocks on the origin, there you are, you now have a cow
>> device containing all data needed.
>> How to move this snapshot device to another server, reattach it to an empty
>> lv volume as a snapshot.
>> lvconvert -s, command requires an argument of an existing snapshot volume
>> name.
>> But there is no snapshot on the new server, so it can't re-attach the
>> volume.
>> So what procedures should be invoked to create just the detached references
>> in LVM, so that the lvconver -s command can work?
> Just copy the snapshot to another server, by whatever method you would
> use to copy the COW and Data volumes (I prefer partclone for supported
> filesystems).  No need for lvconvert.  You are trying WAY WAY too hard.
> Are you by any chance trying to create an incremental backup system
> based on lvm snapshot COW?  If so, say so.
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://listman.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

More information about the linux-lvm mailing list