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

Re: [linux-lvm] efficiently copying snapshot data.



On Fri, 9 Jul 2010, Ray Morris wrote:

> >How can I efficiently copy only the snapshot?
> 
> rsync.  Mount the snapshot, mount the copy of the source LV
> on the other machine, and rsync from the snapshot to the copy.
> You'll probably need to use "kpartx" to make the partitions
> with the LVs visible.

That doesn't do what he wants.  He wants to copy only the COW blocks.
He has physical servers with the same master LV for VMs on each,
and he wants to migrate a VM by copying only the blocks that have 
changed from the master LV.

The COW table is an LV, so it is probably doable with dmsetup: needs
to deactivate snapshot, turn COW table into a regular LV, and activate that.
Copy to a regular LV on the target system, and then do some dmsetup 
and metadata magic to turn the LV (which is a copy of a COW table) into a
snapshot of the master LV with the COW already populated.

I don't think such a utility exists.  Sounds like a good bounty project.

However, there are other projects designed to sync LVs remotely by
copying only changed blocks.  I believe that the ZumaStor extension
to LVM does what he wants.  ZumaStor will also make the multiple
snapshots of the master LV more efficient, especially when updating the master.
It keeps one shared COW for all snapshots.  Standard snapshots keep
a COW for each snapshot.

-- 
	      Stuart D. Gathman <stuart bmsi com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.


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