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

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

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.

How big of an issue it is to you depends very much on what the virtual machine is doing, how it's set up, what other measures you have in place, and what your attitude is to risk.

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.

At the other extreme, if you had a very active database, then the risk of a corrupted database is quite high.

* IIRC from a previous discussion of the topic, there's a command you can give from Dom0 to tell the DomU to flush it's cache.

What you really, really, really cannot do is mount one volume in two places (eg DomU and Dom0) - unless you take the right precautions. That may mean mounting it read-only in all places (generally not very useful), or it may mean running a clustered filesystem of some sort. If you try and mount a volume in two places, with a "standard" filesystem, then you are pretty well guaranteed a completely trashed filesystem - I did it once by accident**, it wasn't pretty or recoverable.

** I was investigating drivers for a Dell RAID card - for this card there was a choice of 2. One was loaded, and when I loaded the other I had two drivers working the same disk - I just wiped it and started again.

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

Xen-users mailing list



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