From mboxrd@z Thu Jan 1 00:00:00 1970 From: tgh Subject: Re: consistent LVM snapshot of domUs from dom0 Date: Sat, 15 Dec 2007 17:13:28 +0800 Message-ID: <47639AB8.1060209@ncic.ac.cn> References: <200712081826.23257.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200712081826.23257.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson , andy@cs.ubc.ca Cc: nikola.ciprich@linuxbox.cz, xen-devel@lists.xensource.com, Nikola Ciprich List-Id: xen-devel@lists.xenproject.org hi if we use the ParallaxFS to do the filesystem snapshot, does it have the=20 similar problem ,or not? could you clear me? Thanks in advance Mark Williamson =E5=86=99=E9=81=93: >> 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 b= y >> XEN? >> =20 > > If your LVM is running in dom0 and you snapshot the storage used by a d= omU=20 > then, no, it won't snapshot the domU's filesystem automatically. > > =20 >> If not, I guess it should not be that hard to fix, I guess we just nee= d to >> notify domU kernel to call needed VFS function to put fs into consiste= nt >> state prior to creating snapshot. >> =20 > > Yep. > > =20 >> Can somebody comment on it, eventually correct me if I'm wrong? >> =20 > > You're quite right. I've just had a look at it and it looks quite feas= ible to=20 > do this. The obvious simple way to implement it would be to add an xm=20 > command that causes a domain to freeze its filesystems into a consisten= t=20 > state and then return when that is done. > > e.g. > > xm create mydomain > xm fs_freeze mydomain > > xm fs_unfreeze mydomain > > Ideally the backup operation would just take a snapshot e.g. using LVM = or=20 > qcow. With a bit more tools / storage integration we could have an "xm= =20 > safesnapshot" command that would create a coherent snapshot of the disk= . > > It would be awesome. > > Cheers, > Mark > > =20