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] Re: 100% safe way to backup domU: (was Yet another backu

On Fri, 2007-01-12 at 17:01 +0530, Ligesh wrote:
> On Fri, Jan 12, 2007 at 12:02:58PM +0100, Ulrich Windl wrote:
> > On 12 Jan 2007 at 15:41, Ligesh wrote:
> > [...]
> > Is there a way to get a complete image out of an LVM?
> > [...]
> > 
> > The logical volume _is_ the image, even for a snapshot.
> > 
> 
>  Oh ok, I can just open('logical_volumepath', O_RDONLY), and read the 
> contents and save it into another file. I think that will suffice for the 
> present.
> 
>  Thanks.
> 

I figured I'd chirp in. 

You guys are trying to make an exact science out of something really
dynamic, but I agree an application educated enough to pull this off is
sorely needed.

Lets look at a small paravirtualized domain running AMP, supporting 3 -
5 virtual hosts, each of those vhosts is a blog, forum, wiki, something
database driven.

2 Of them are just wordpress blogs, MyISAM tables. 3 of them use innodb
tables (row level locking).

On top of this, lets assume some sort of ad-hoc session manager is at
work that is helping to tie in a centralized login to bring it all
together into an intranet portal.

If you pause the VM, you run a ... 30/70 chance of pausing it close to
the exact time MySQL is about to write to 2 of the MyISAM db's .. and
the forum is saving some post and session data in its innodb tables.

'sync' isn't going to fix this. 

The session manager has 150 active sessions going. 

Creating a snapshot at this point in time is very ill advised. Upon
trying to restore it, you have ghost sessions to deal with, a need to
recover the MyISAM tables and (hopefully) just a few lost rows in the
innodb tables which aren't so easy to recover.

The best scenario is, dom-0 has some kind of interaction with the guests
that either :

1 - Dump / copy their files and databases to a second VBD, then pause
and make the snapshot 

Or, 

2 - Each VM gets a second VBD that is a cluster FS (ocfs2 comes to mind)
enabling it to write to a common backup volume and snapshot thereafter
if desired

Or,

3 - The guests use NFS and the files are collected on dom-0.

If each guest had a 100 GB file system, snapshots become impractical.
Likewise, backups with corrupt DB's are impractical.

The best bet is a dance between dom-0 and the dom-u's. Dom-0 signals its
time for a backup, the dom-u does it , and signals back to dom-0 "Ok,
pause me and snapshot /dev/volgroup/backup-guest1, I already synced.."

Likewise, /home /var and others can be on entirely separate VBDs. 

A scheduler to help accomplish this, written with Xen in mind would be
nice (and not too terribly difficult).

As I said, you can't make an exact science out of this because needs are
going to vary so much depending on just what exactly the guests are
doing. What is needed the most is a utility to help orchestrate it all,
which comes bundled with examples for the more common scenarios. 

Best,
--Tim

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


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

<Prev in Thread] Current Thread [Next in Thread>