[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistenc
From: |
Walid Nouri |
Subject: |
Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency |
Date: |
Thu, 25 Sep 2014 18:06:31 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Am 24.09.2014 10:47, schrieb Stefan Hajnoczi:
I think the assumption with drive-mirror is that you throw away the
destination image if something fails. That's the exact opposite of MC
where we want to fail over to the destination :).
This was not obivous for me...
Here is one example of a mechanism like this:
QEMU has a block job called drive-backup which copies sectors that are
about to be overwritten to an external file. Once the data has been
copied into the external file, the sectors in the original image file
can be overwritten safely.
The Secondary runs drive-backup so that writes coming from the Primary
stash rollback data into an external qcow2 file. When the Primary
wishes to commit we drop the qcow2 rollback file since we no longer need
the ability to roll back - this is cheap and not a lot of I/O needs to
be performed for the commit operation.
If the Secondary needs to take over it can use the rollback qcow2 file
as its disk image and the guest will see the state of the disk at the
last commit point. The sectors that were modified since commit in the
original image file are covered by the data in the rollback qcow2 file.
There are a bunch of details on making this efficient but in principle
this approach makes both commit and rollback fairly lightweight.
Until yesterday I’ve seen backup as mechanism that makes a point in time
snapshot of a block device and saves the contents of that snapshot to an
other block device. Your proposal is a new interpretation of backup :-)
I must admit that I had to think twice to get an idea what your point is.
I don’t know if I have understood all aspects of your proposal as my
mental model of a possible architecture is not quite clear yet.
I will try to summarize in “MC-words” what I have understood:
The general Idea is to use drive-backup to get a consistent snapshot of
a mirrored block device on the secondary for a given period of time I
will call it epoch(n) and snapshot(n).
As a starting point we need to block-devices with exact the same state
on primary and secondary. In other word there must be an exact copy of
the primary image on the secondary.
In epoche(n) the primary mirror its writes to the image file of
secondary. This leads to a continuous stream of updated blocks to the
image of the secondary.
In parallel the secondary use drive-backup to get a rollback-snapshot(n)
its own image file for each running epoche.
At the beginning of epoche(n+1) we start a (new) rollback-snapshot(n+1)
and keep rollback-snapshot(n).
When in normal operation we drop rollback-snapshot(n) when epoche(n+1)
is successfully completed.
In case of a failure in epoche(n+1) we make a fail over and use
rollback-snapshot(n) to get back the consistent block device state of
epoche(n)
Is this your idea?
Does this procedure guaranty the block-device semantics of the primary?
Walid
- Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency, (continued)