WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] consistent LVM snapshot of domUs from dom0

To: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] consistent LVM snapshot of domUs from dom0
From: "Mike Sun" <msun@xxxxxxxxxx>
Date: Sat, 8 Dec 2007 16:01:11 -0500
Cc: nikola.ciprich@xxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Nikola Ciprich <extmaillist@xxxxxxxxxxx>
Delivery-date: Sat, 08 Dec 2007 13:01:49 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=ZpDN1SCd5xAL/TlAw1fef9BgfAOzyxktcBoch19n5Ww=; b=EJUsn64QaKioGQSzkbNwFGNjowMRiMAI2nDX+I5bfD3ZM2PXD/X3jPgd+BG2tn+t6GDNJ9knQmLIUpt4JadqFR+3f1wt6k9p/MhhBuvlXeZsaFPsP0qegMfNENjto4ycUN3xtg92lQIdPed+59E4ysXBaXstwEBoTVKaub3+SA4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Q5/kls4q+yUT/N2WTqC23V3KIAk7M9A8L9L2y3BAbDB30eH+qcp7a67sHw/zFfGhz0ejQRT+qEqSbx9XWhfvpLZRdAFg4oZtRTD2MQX6pVUxJJraFIqF1W4z+Iqs/HbXvAolTipCApI051jpOwcmd0F66QspbrWlEvagPaIiYWc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200712081826.23257.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.LRH.0.9999.0712070833080.11416@xxxxxxxxxxxxxxxxxxxx> <200712081826.23257.mark.williamson@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for the question Nikola and the answer Mark, I was wondering
the same thing.

Here's another scenario.  What if dom0 has a mounted LVM filesystem,
and a file-backed VBD located on that filesystem is used as the root
filesystem by a domU.  Would LVM snapshots of the mounted LVM
filesystem provide consistent checkpoints?

In looking at how xm suspend works, it seems that only memory state is
saved and nothing is done to ensure the guest domain puts its
filesystem into a consistent state, though I'm not completely certain
about that.

Mike

On Dec 8, 2007 1:26 PM, Mark Williamson <mark.williamson@xxxxxxxxxxxx> wrote:
> > I'd like to ask a question regarding LVM snapshots:
> > normally if You make a snapshot of mounted LVM partition, DM
> > infrastructure handles putting fs into consistent state using VFS
> > infrastructure. BUT, does it work even if I make snapshot of LV used by
> > XEN?
>
> If your LVM is running in dom0 and you snapshot the storage used by a domU
> then, no, it won't snapshot the domU's filesystem automatically.
>
> > If not, I guess it should not be that hard to fix, I guess we just need to
> > notify domU kernel to call needed VFS function to put fs into consistent
> > state prior to creating snapshot.
>
> Yep.
>
> > Can somebody comment on it, eventually correct me if I'm wrong?
>
> You're quite right.  I've just had a look at it and it looks quite feasible to
> do this.  The obvious simple way to implement it would be to add an xm
> command that causes a domain to freeze its filesystems into a consistent
> state and then return when that is done.
>
> e.g.
>
> xm create mydomain
> xm fs_freeze mydomain
> <do backup>
> xm fs_unfreeze mydomain
>
> Ideally the backup operation would just take a snapshot e.g. using LVM or
> qcow.  With a bit more tools / storage integration we could have an "xm
> safesnapshot" command that would create a coherent snapshot of the disk.
>
> It would be awesome.
>
> Cheers,
> Mark
>
> --
> Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
> Mark: To answer a question with a question: What use is a skateboard?
> Dave: Skateboards have wheels.
> Mark: My wheel has a wheel!
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel