I read What does an LVM2 Snapshot contain? and LVM Snapshot confusion.
What I'm trying to figure out is if there is a way to create a copy of an LVM snapshot for use with different Xen VMs. I know that it isn't built into LVM (yet), but I was wondering if it might (or might not) work like this:
- Create Logical Volume LV1
- Create Snapshot1 of LV1 (100MB)
- Create Snapshot2 of LV1 (100MB)
- dd if=Snapshot1 of=Snapshot2
- Use Snapshot1 and Snapshot2 both for R/W operations with Xen, use LV1 read-only.
Would it work or would it fail horribly in hard-to-detect ways? Any other suggestions to approach this? I guess that I could also create a second Logical Volume LV2 and copy the content of Snapshot2, but that would take up more space for PEs.
Solution:
In the meantime I found a way to do it using LVM2 thin volumes: https://wiki.gentoo.org/wiki/LVM#LVM2_Thin_Snapshots