[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Backup domU image at runtime





2012/3/9 Simon Hobson <linux@xxxxxxxxxxxxxxxx>
Todd H. Foster wrote:

Yes, It has worked fine for me.  There may be some danger though. Centos handles it fine.

Not "may be some", but "there is a definite" danger.

If you make a backup of the virtual disk (by whatever means) from teh Som0 while a DomU is running then what you copy will be the equivalent of what you'd have on a real machine if you just yanked the power cord. Ie, you'd not include anything cached in the machine's memory and not yet written to disk.

 
That's not a theoretical risk, it is a most definite and demonstrable problem.



I think that taking a backup of a virtual disk while it is used is even worse: if you yank the power cord and you are using a journaled file system, the file system will probably recover by itself.
If you backup a virtual disk while it is used you are taking an inconsistent image of the journal and an inconsistent (corrupted) image of the files!

 

At one extreme, if you have a guest with little disk I/O (particularly writes), uses journalled filesystems, and you trigger the guest to flush it's write cache* before making a snapshot - then the risk would be low.


I think that the risk will always be high: you cannot be guaranteed that no process will write any file during the backup, and you have no way to check if the backup is working (the os will see the filesystem as ok, but application data could still be corrupted)

Andrea


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.