[dm-devel] access to snapshot deltas

Frederick Grose fgrose at gmail.com
Fri Jun 8 21:54:37 UTC 2012


On Fri, Jun 8, 2012 at 10:56 AM, Benjamin S. Scarlet
<scarlet at alum.mit.edu>wrote:

> Is there or could there be support for writing to a snapshot
> copy-on-write device from userspace? Are the bits contained therein
> portable between two snapshot instances with the same sizes of origin
> and copy-on-write devices?
>
> I tried a simple experiment and caused Very Bad Things to happen (a
> kernel error claiming "BUG: Bad page state in process ..."), but I may
> have done something bogus. Before I proceeded with further experiments,
> I thought I'd ask what, if anything, ought to work.
>
> My ultimate goal is to reduce downtime while migrating a virtual guest
> with its storage from one host to another. To that end what I'd like to
> do is:
> *) take a snapshot
> *) transfer the frozen view of the snapshot while the guest continues to
> run
> *) stop the guest on the original host
> *) transfer the deltas that have been written since the snapshot
> *) start the guest on the new host
> *) merge the deltas (assuming they weren't already merged during the
> transfer, depending on how that was done)
>
> So please consider the following experiment, expressed mostly in terms
> of lvm tools rather than dmsetup, just because this way I think I'm
> giving myself fewer chances to mess up:
>
> 1) create an LVM volume A to play the role of the original volume. Fill
> it up with some data.
> 2) create an LVM snapshot of A, A-snap.
> 3) create an LVM volume B to play the role of the destination volume,
> the same size as A.
> 4) copy (e.g. dd) from A into B, and simultaneously write some changes
> into A-snap.
> 5) create an LVM snapshot of B, B-snap.
> 5.5) cross your fingers 'cause here I'm heading into the unknown (for
> me)
> 6) dmsetup suspend something (if any variant would work, could someone
> tell me what?)
> 7) copy bits from A-snap-cow to B-snap-cow
> 8) dmsetup resume
> 9) diff A-snap and B-snap and observe they're the same! (or so I would
> like)
> 10) proceed to use lvm to merge B-snap into B
>

Would mirroring A to B work for this?

       --Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20120608/e54ffa24/attachment.htm>


More information about the dm-devel mailing list