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-users

Re: [Xen-users] Backup; mount domU FS RO?

On Mon, Dec 19, 2005 at 01:18:00PM -0600, Daniel Goertzen wrote:
>  On Mon, Dec 19, 2005 at 08:04:50AM +0100, als@xxxxxxxxxxxxxxx wrote:
> [...]
> > A better approach is to use LVM and snapshots. Use LVM logical volumes 
> > as "disks" for your DomU (if you aren't already doing this), create 
> > snapshots for your backups, mount the snapshots and backup _those_.
> [...]
> > 
> > I'm currently using this to backup our production DomU systems from 
> > the Dom0 and it works very well.
> 
> How do you assure that domU's filesystem is in a consistent state when the
> snapshot is being taken in dom0?

Hmm, reading fs/ext3/super.c turned out to be enlightening. 

> Also, which distro+kernel do you use?

On both Dom0 and DomU I use SLES9 (SUSE Linux Enterprise Server 9) and
kernel 2.6.11 with Xen 2.0.7.

> You won't know, but I bet it works most of the time.  While taking a
> snapshot the LVM system will lock the VFS to assure consistency.

If the VFS is aware of the FS being mounted, which in the Dom0 it isn't.

>  In the
> above scenario the dom0 has no way of locking the domU's VFS, therefore
> consistency is NOT assured.  The LVM user above should be creating the
> snapshot from the same domU that has that logical volume mounted... 

This is hardly possible as the DomU isn't even aware that there is LVM
involved. The Dom0 sees the blockdevice as a LVM logical volume, but the
DomU sees it as a SCSI disk partition - as sda1.

For some of my current virtual systems this is not much of a problem
since the system itself is pretty stable and only some logfiles and
transient files change - those would not matter upon restore anyway. But
there will be other virtuals system where I'm not going to be this lucky.

Time to investigate ...

> At this
> point you're probably better off with another solution.

Seems like I have to take a look at XFS and xfs_freeze.

Regards,
       Alex.
-- 
"Opportunity is missed by most people because it is dressed in overalls and
 looks like work."                                      -- Thomas A. Edison

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