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

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

That's a good place to start.

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

OK.

I guess having the guest performing its own backups solves this problem, but I 
acknowledge that's not really solving your problem of doing stuff 
transparently.

Some kind of setup with GFS for guest data partitions (shared with another 
domU which performs backups) or NFS/Samba would also give you the level of 
correctness you're looking for...

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

I suspect the best implementation of this would patch the guest kernel to 
perform a "sync, then pause yourself" operation, then from dom0 activate the 
LVM snapshot and tell the guest to start up again...

Data could then be copied off the LVM snapshot onto your backup device at your 
leisure.

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

I suspect the cleanest solution could be guest checkpointing...  I expect this 
will be implemented at some point in the future.  The goal would be to save 
the guest's state to disk (as if the guest were being suspended) *and* 
snapshot the filesystem, then let the in-memory copy of the guest continue to 
run.

The result is that between the memory image and the snapshot, you have the 
complete set of on-disk and buffer data so you don't lose anything - the apps 
that were running wouldn't notice.

I think this *is* like to be implemented at some point (there were some quick 
and dirty - according to the author! - proof-of-concept patches posted on the 
mailing list a while back.  Since it would also back up your computation 
state, etc, it could also be useful for "backing up" long-running scientific 
jobs to guard against power or hardware failure.

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-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users