qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Wolfgang Richter <wolf@cs.cmu.edu>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection
Date: Tue, 14 May 2013 10:40:54 +0200	[thread overview]
Message-ID: <20130514084054.GD8739@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CACO=3k5EkFNEzFMc4DrdHMK7=fg-K1FMqoT5tDEc28vioEpj9g@mail.gmail.com>

On Mon, May 13, 2013 at 05:21:54PM -0400, Wolfgang Richter wrote:
> I'm working on a new patch series which will add a new QMP command,
> block-trace, which turns on tracing of writes for a specified block device
> and
> sends the stream unmodified to another block device.  The 'trace' is meant
> to
> be precise meaning that writes are not lost, which differentiates this
> command
> from others.  It can be turned on and off depending on when it is needed.
> 
> 
> 
> How is this different from block-backup or drive-mirror?
> --------------------------------------------------------
> 
> block-backup is designed to create point-in-time snapshots and not clone the
> entire write stream of a VM to a particular device.  It implements
> copy-on-write to create a snapshot.  Thus whenever a write occurs,
> block-backup
> is designed to send the original data and not the contents of the new write.
> 
> drive-mirror is designed to mirror a disk to another location.  It operates
> by
> periodically scanning a dirty bitmap and cloning blocks when dirtied.  This
> is
> efficient as it allows for batching of writes, but it does not maintain the
> order in which guest writes occurred and it can miss intermediate writes
> when
> they go to the same location on disk.
> 
> 
> 
> How can block-trace be used?
> ----------------------------
> 
> (1) Disk introspection - systems which analyze the writes going to a disk
> for
> introspection require a perfect clone of the write stream to an original
> disk
> to stay in-sync with updates to guest file systems.
> 
> (2) Replicated block device - two block devices could be maintained as exact
> copies of each other up to a point in the disk write stream that has
> successfully been written to the destination block device.

CCed Benoit Canet, who implemented the quorum block driver to mirror I/O
to multiple images and verify data integrity.

QEMU is accumulating many different approaches to snapshots and
mirroring.  They all have their pros and cons so it's not possible to
support only one approach for all use cases.

The suggested approach is writing a BlockDriver which mirrors I/O to two
BlockDriverStates.  There has been discussion around breaking
BlockDriver into smaller interfaces, including a BlockFilter for
intercepting I/O, but this has not been implemented.  blkverify is an
example of a BlockDriver that manages two child BlockDriverStates and
may be a good starting point.

  reply	other threads:[~2013-05-14  8:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 21:21 [Qemu-devel] [RFC] block-trace Low Level Command Supporting Disk Introspection Wolfgang Richter
2013-05-14  8:40 ` Stefan Hajnoczi [this message]
2013-05-14 15:42   ` Wolfgang Richter
2013-05-14  8:50 ` Kevin Wolf
2013-05-14 10:04   ` Paolo Bonzini
2013-05-14 15:48     ` Wolfgang Richter
2013-05-14 16:45       ` Paolo Bonzini
2013-05-14 19:30         ` Wolfgang Richter
2013-05-15  7:59         ` Kevin Wolf
2013-05-15  8:25           ` Paolo Bonzini
2013-05-15  8:53             ` Kevin Wolf
2013-05-15  9:16               ` Paolo Bonzini
2013-05-15  9:46                 ` Kevin Wolf
2013-05-15 11:54                   ` Paolo Bonzini
2013-05-22 15:46                     ` Wolfgang Richter
2013-05-14 15:45   ` Wolfgang Richter
2013-05-16 13:44 ` Richard W.M. Jones
2013-05-22 15:51   ` Wolfgang Richter
2013-05-22 16:11     ` Paolo Bonzini
2013-05-22 16:29       ` Wolfgang Richter
2013-05-22 16:42     ` Richard W.M. Jones
2013-05-22 18:32       ` Wolfgang Richter
2013-05-22 19:26         ` Richard W.M. Jones
2013-05-22 19:38           ` Wolfgang Richter
2013-05-22 20:47             ` Richard W.M. Jones
2013-05-22 21:46               ` Paolo Bonzini
2013-05-23  7:50                 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130514084054.GD8739@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wolf@cs.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).