[Top][All Lists]
[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: |
Tue, 28 Feb 2012 12:15:44 -0500 (EST) |
----- Original Message -----
> From: "Stefan Hajnoczi" <address@hidden>
> To: "Federico Simoncelli" <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Sent: Tuesday, February 28, 2012 4:47:48 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
> >
> > (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)
>
> At this stage we have dst/hd0snap1 opened with BDRV_O_NO_BACKING. If
> it has no backing file and the guest issues a write request that is
> smaller than a cluster in the image file, the untouched areas of that
> cluster will be populated with zeroes.
>
> Once dst/hd0snap1 is reopened with dst/hd0base in place there will be
> zeros in clusters where the guest wrote only a few sectors. We will
> not "see" the backing file data in those clusters.
>
> Have you hit this problem or did I miss something?
Thank you for getting this. Being able to have a bogus backing file was
a bonus but it's not really required for the mirrored live block migration.
We can add the support for switching the backing file in the drive-reopen
part.
I'll remove the BDRV_O_NO_BACKING flag from the blkmirror patch.
--
Federico
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), (continued)
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Paolo Bonzini, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Federico Simoncelli, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Paolo Bonzini, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Anthony Liguori, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Federico Simoncelli, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Anthony Liguori, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Paolo Bonzini, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Anthony Liguori, 2012/02/27
- Re: [Qemu-devel] drive transactions (was Re: [PATCH 2/2 v2] Add the blockdev-reopen and blockdev-migrate commands), Luiz Capitulino, 2012/02/27
Re: [Qemu-devel] Live Block Migration using Mirroring, Stefan Hajnoczi, 2012/02/28
- Re: [Qemu-devel] Live Block Migration using Mirroring,
Federico Simoncelli <=
Re: [Qemu-devel] Live Block Migration using Mirroring, Paolo Bonzini, 2012/02/28
[Qemu-devel] [PATCHv3] Add blkmirror block driver, Federico Simoncelli, 2012/02/29
[Qemu-devel] [PATCHv4] Add blkmirror block driver, Federico Simoncelli, 2012/02/29