public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jagane Sundar <jagane@sundar.org>
To: Fred van Zwieten <fvzwieten@gmail.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Jes Sorensen <Jes.Sorensen@redhat.com>,
	Badari Pulavarty <pbadari@us.ibm.com>,
	Dor Laor <dlaor@redhat.com>
Subject: Re: snapmirror functionality using qcow2 and rsync?
Date: Sun, 15 May 2011 10:16:07 -0700	[thread overview]
Message-ID: <4DD00A57.70004@sundar.org> (raw)
In-Reply-To: <BANLkTikyKg=CVz3PCT1CMc2vNk6xT3rW-w@mail.gmail.com>

Hello Fred,

As Stefan points out, there is a lot of interest in such functionality.

I am the author of a feature called Livebackup - which is aimed at
solving exactly this problem - backup of live virtual machines. The
additional constraint I place is that backup of the VM should be
enabled regardless of the type of storage in use - file on local disk,
file on NAS, LVM logical volume on local disk, LVM volume on an
iSCSI volume.

More information is at:
http://wiki.qemu.org/Features/Livebackup

I investigated the approach that you outline below - LVM snapshot
followed by transfer of the blocks out of the VM host. The problem
I ran into was that there was no easy way to identify the blocks that
were modified since the last backup was taken. To the best of my
knowledge, rsync uses checksums of entire files to determine whether
a file was modified or not - in our use case the whole virtual disk
is one single file, do rsync will not work well.

One of the 'features' of Livebackup is that I chose to invent my own
rudimentary protocol for transferring the blocks out of the VM
host. iSCSI seems like a standard protocol that would suit the
purpose; however it does not fit well with the architecture of
Livebackup - I would probably need to implement an iSCSI target
function inside Livebackup.

Thanks,
Jagane

On 5/15/2011 7:11 AM, Stefan Hajnoczi wrote:
> On Sun, May 15, 2011 at 1:16 PM, Fred van Zwieten<fvzwieten@gmail.com>  wrote:
>> Background:
>> NetApp Snashot functionality gives you application consistent
>> snapshots of data. Just inform the app a snapshot is about to be made,
>> depending on the app, it needs to go in to some sort of backup mode,
>> of just stop and flush outstanding I/O. Next, a snapshot is made and
>> everything just runs on. Because of the underlying WAFL filesystem
>> design, the snapshot always points to the blocks at the time of the
>> creation without needing to do any COW.
>>
>> Layered on top op this functionality is SnapMirror, where the delta
>> between this snapshot and a previous snapshot (both being static in
>> nature), is asynchronously replicated to a second system. There, this
>> delta is applied to a copy of the disk as a local snapshot.
>>
>> This setup gives you application consistent data disks on a remote
>> location as a form of disaster tolerancy. The RPO is the
>> snapshot/snapmirror frequency.
>>
>> KVM:
>> My question is rather simple. Could something like this be implemented
>> with kvm-img and rsync and/or lvm? I've played with the backing_file
>> option, but this means I have to shutdown the vm a boot is on the new
>> file to let this work.
> This recent thread might interest you:
> http://lists.gnu.org/archive/html/qemu-devel/2011-05/msg00733.html
>
> Basically you have to cobble it together yourself at the moment but
> there is activity around live snapshots and dirty block tracking, so
> hopefully they will be available as APIs in the future.
>
> Stefan


  reply	other threads:[~2011-05-15 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BANLkTik7_4cHdO2Latt3GZi8B9qKC4cnMw@mail.gmail.com>
2011-05-15 12:16 ` snapmirror functionality using qcow2 and rsync? Fred van Zwieten
2011-05-15 14:11   ` Stefan Hajnoczi
2011-05-15 17:16     ` Jagane Sundar [this message]
2011-05-15 19:18       ` Fred van Zwieten
2011-05-15 21:11         ` Dor Laor

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=4DD00A57.70004@sundar.org \
    --to=jagane@sundar.org \
    --cc=Jes.Sorensen@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=fvzwieten@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    --cc=stefanha@gmail.com \
    /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