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

Phillip Susi phill at thesusis.net
Tue Dec 21 19:23:11 UTC 2021

Tomas Dalebjörk <tomas.dalebjork at gmail.com> writes:

> hi
> I think I didn’t explain this clear enough 
> Allthe lvm data is present in the snapshot that I provision from our backup system 
> I can guarantee that!
> If I just mount that snapshot from our backup system, it works perfectly well
> so we don’t need the origin volumes in other way than copying back to it
> we just need to reanimate it as a cow volume
> mentioning that all data has been changed
> the cow is just referencing to the origin location, so no problem there
> All our data is in the cow volume, not just the changes

Ok, so you have thrown out the snapshot relationship when you made your
backup, and backed up both the origin and the snapshot as two separate
backups?  Thus your backup requires much more space than the original
system did since all of the common data has now been duplicated in both
backups.  Now it seems you want to restore both backups, but NOT pay the
storage penalty for duplicating the common parts.  I don't think there
is really a good way of doing that.

I'd say that you can restore the origin volume, then create a snapshot
of that, then run some sort of binary diff between the origin and the
backup of the snapshot and write that diff to the new snapshot.

More information about the linux-lvm mailing list