> > I don't think you actually need to sync in the guest if you're doing
> > this, though. You'll have all the dirty buffers in the save image
> > anyhow, so flushing them to disk doesn't seem necessary.
>
> If we don't sync, we won't be able to mount and backup. If we were
> backing up the entire image, then yes, it will work without syncing.
>
> xm save domU file
> backup entire image + file
> xm restore file
>
> But if we want to mount and take proper incremental backup, we need the
> filesystem to be consistent. Otherwise we will get very badly corrupted
> data.
Do you have to backing up the files from inside the image, rather than the
image itself?
I was assuming you'd just backup a copy of the block device (side note: for
efficiency purposes you could use rdiff-backup to store binary deltas,
organised by timestamp to do point-in-time recovery of disk images, without
the overhead of storing complete copies).
If you don't keep a copy of the *exact* block device image, then you won't be
able to restore the guest. Just restoring by copying files from the backup
onto the device and then resuming the guest will (very likely) destroy the
filesystem completely - the block device image has to exactly what the guest
is expecting. If you write data to the block device image *at all* whilst
the guest is suspended then you're risking destroying the FS.
If you really want to be able to mount the block device (and subsequently)
restore individual changed data files, I'd suggest you drop the guest suspend
part... You may be able to sync and then mount, although I still think
there's a chance that the resulting image will not be mountable (definitely
can happen if you rely on userspace, possibly fixable with kernel support,
but I'm not sure).
There's also a vague possibility of IOs being uncompleted in dom0 if a mere
sync is implemented, and therefore not having hit the disk yet. I'm not sure
if there's a race here but it makes me uneasy :-(
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
|