qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Live Block Migration using Mirroring


From: Federico Simoncelli
Subject: Re: [Qemu-devel] Live Block Migration using Mirroring
Date: Thu, 23 Feb 2012 11:10:52 -0500 (EST)

----- Original Message -----
> From: "Stefan Hajnoczi" <address@hidden>
> To: "Federico Simoncelli" <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Sent: Thursday, February 23, 2012 4:47:38 PM
> Subject: Re: [Qemu-devel] Live Block Migration using Mirroring
>
> On Wed, Feb 22, 2012 at 5:13 PM, Federico Simoncelli
> <address@hidden> wrote:
> > Step 3 - Mirrored Live Snapshot
> > ===============================
> > A mirrored live snapshot is issued using src/hd0snap1 and
> > dst/hd0snap1 as
> > image files. (Where "<-" stands for "has backing file")
> >
> > [src/hd0base] <- [src/hd0snap1] <= VM1(read-write)
> >     ...      <- [dst/hd0snap1] <= VM1(write-only)
> >
> > $ qemu-img create -f qcow2 \
> >           -b /tmp/src/hd0base.qcow2 /tmp/src/hd0snap1.qcow2 20G
> > Formatting '/tmp/src/hd0snap1.qcow2', fmt=qcow2 size=21474836480
> > backing_file='/tmp/src/hd0base.qcow2' encryption=off
> > cluster_size=65536
> >
> > $ qemu-img create -f qcow2 \
> >           -b /tmp/dst/hd0base.qcow2 /tmp/dst/hd0snap1.qcow2 20G
> > Formatting '/tmp/dst/hd0snap1.qcow2', fmt=qcow2 size=21474836480
> > backing_file='/tmp/src/hd0base.qcow2' encryption=off
> > cluster_size=65536
>
> At this stage /tmp/dst/hd0base.qcow2 does not exist yet.  The
> qemu-img
> output you pasted shows /tmp/src/hd0base.qcow2 was actually used.
> Typo?

No that's part of the flag used in [PATCH 2/3] (Update the blkmirror
block driver): BDRV_O_NO_BACKING

It's also documented in the design:

http://www.ovirt.org/wiki/File:StorageLiveMigration2.png

> > (qemu) snapshot_blkdev -n ide0-hd0 \
> >         blkmirror:/tmp/src/hd0snap1.qcow2:/tmp/dst/hd0snap1.qcow2
> >         blkmirror
> >
> > Step 4 - Backing File Copy
> > ==========================
> > An external manager copies src/hd0base to the destination
> > dst/hd0base.
> >
> > [src/hd0base] <- [src/hd0snap1] <= VM1(read-write)
> > [dst/hd0base] <- [dst/hd0snap1] <= VM1(write-only)
> >
> > $ cp -a /tmp/src/hd0base.qcow2 /tmp/dst/hd0base.qcow2
>
> Are we missing a fixup step that changes backing_file in
> dst/hd0snap1.qcow2 to point at dst/hd0base.qcow2?

See above.

--
Federico



reply via email to

[Prev in Thread] Current Thread [Next in Thread]