On 11/17/2014 07:37 AM, Payes Anand wrote:
This patchset adds virDomainFSFreeze()/virDomainFSThaw() APIs and
virsh
> domfsfreeze/domfsthaw commands to enable the users to freeze and thaw
> domain's filesystems cleanly.
>
Do these API's ( commands ) also push the dirty buffer to the disk, or it
has to be done separately before freezing, to take snapshots.
virDomainFSFreeze does whatever the guest agent is wired to do (and the
default implementation of qemu-guest-agent has hooks for you to add any
additional work around the envelope of freezing your guest's
filesystem). There have been other threads on this list on how to add a
hook that prepares a database to be frozen, for example. Passing the
--quiesce flag to taking a snapshot is just shorthand for triggering the
same actions as what you manually control by calling virDomainFSFreeze
yourself.
If we don't specify any mount points, how different is
domfsfreeze/domfsthaw from suspend/resume. Which of them would be better to
take live incremental external snapshots of iSCSI devices.
suspend does NOT flush pending guest I/O. It just stops the guest CPUs
from making further changes. Taking a snapshot of a suspended guest is
NOT going to be consistent in the same way as a snapshot of a guest that
has had its filesystems frozen (that is, booting the disks that were
copied from the time that a guest was frozen will likely need fsck
repair, and will not contain pending I/O transactions that were still
held in memory; while booting a disk that was copied while filesystems
were frozen should see a fully consistent file system that is not
lacking any pending I/O).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org