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

[Xen-users] Re: 100% safe way to backup domU: (was Yet another backup)

On Thu, Jan 11, 2007 at 12:00:57PM +0100, Ulrich Windl wrote:
> On 11 Jan 2007 at 16:14, Ligesh wrote:
> 
> >  In that case we need a command for xm called 'sync-and-pause'. I had
> 
> Be aware that XEN does the pause, but Linux does the sync. I also think that 
> the 
> sync is not synchronous, i.e. when returning from the syscall the OS may 
> still be 
> writing buffers, but I'm not too sure about that.

 I am only talking about paravirtualized guests, and in this case, domU kernel 
should cooperate.

> 
> Anyway a sync does not guarantee that any application does sync it's data to 
> kernel disk buffers, so that backup is never a 100% image.

 Because of the LVM snapshot, we get the files from a single instance of time, 
which would be exactly equivalent to having sent a kill -9 to the process. The 
databases should be able to recover from this. But I don't know if Dbs support 
pulling out their data files over a particular delayed period.

> 
> Backups are safe when you shutdown the VM and then safe the files from Dom0.

  That is obvious, but simply out of question. We have to think of practical 
usage scenarios, and deliver the features accordingly.

> 
> If XEN pauses the domain, you cannot do anything with it AFAIK.

 You can take an LVM snapshot of the harddisk, and if it had been synced just 
prior to the pause, you get a consistent File system, as I said, only as bad as 
sending a kill -9 to the processes, which the Dbs should be able to recover 
from.

> > 
> >  xm sync-and-pause domU
> >  lvm snapshot domU
> >  xm unpause domU
> 
> Don't you need a LVM-sync-and-snapshot instead? I think a device could find 
> out 
> atll the buffers that have data for it. So it could request writing all those 
> buffers (while disallowing (or ignoring) new dirty buffers for that device).
> 

  How? The buffers are in the domU, the device is in the Dom0. The only way is 
to send a sync to the DomU, and then pause it. Which is again the 
sync-and-pause command.


> It's as ugly as anything else.
> 
> "For every problem there's a solution that's simple, neat, and wrong"
> (In Kernighan & Plaugher about C programming I think)

 That's Mencken. Kernigan an pike were never good at aphorisms. That was 
Mencken's forte.




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