On Thu, Nov 07, 2013 at 03:45:56PM +0000, Tomoki Sekiyama wrote: > On 11/7/13 4:01 , "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote: > > >On Thu, Nov 07, 2013 at 09:39:01AM +0100, Michal Privoznik wrote: > >> On 07.11.2013 01:31, Tomoki Sekiyama wrote: > >> > Hi all, > >> > > >> > Is there any plans to add APIs to execute fsfreeze/fsthaw in qemu > >>guests? > >> > (something like virDomainFSFreeze(domain,timeout,flags) and > >> > virDomainFSThaw(domain,timeout,flags)) > >> > > >> > These would be useful in the case a guest has a disk device with its > >>own > >> > snapshot feature, such as cinder volumes in OpenStack configuration. > >> > In such cases, libvirt clients want to issue fsfreeze/fsthaw > >>before/after > >> > taking the disk snapshot. > >> > > >> > Currently we can execute them using virDomainQemuAgentCommand(). (e.g. > >> > virsh qemu-agent-command dom '{"execute":"guest-fsfreeze-freeze"}' ) > >> > > >> > However, this is exposing internal implementation too much. And it > >> > cannot leverage future implementation for the other hypervisors. > >> > So it would be nice if we have well-defined API for fsfreeze/fsthaw. > >> > > >> > If there is no plan for these API and this is acceptable, I will try > >>to > >> > implement this. > >> > Any comments are welcome. > >> > >> I am not aware of somebody wanting these APIs exposed hence I don't know > >> if somebody is working on it. But since there is a clear usage scenario > >> I'd say go for it. > > > >We already support this QEMU agent commands in libvirt. We decided not > >to expose them explicitly as APIs, but instead wire them upto the impl > >of the disk snapshot APIs when VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE is > >used. > > > >Furthermore, OpenStack already has support for using this flag when > >doing snapshots, so I don't think we need any more work here. > > > >Daniel > > AFAIK, VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE is used in openstack only when > glusterfs is used as volume backend which uses external qcow2 snapshot. > > In the other cases, it uses own implementation instead of libvirt snapshot > API, to exploit native snapshot features of various storages, such as > LVM (over iSCSI), enterprise storages, and so on. > For these cases, fsfreeze API (without taking snapshot) is useful. I'm not sure what your use case is, but I've been helping with getting blockdev-backup and drive-backup commands into qemu and hope to have some sort of libvirt API to expose them. These qemu commands allow you to create point-in-time snapshots of images with very low overhead regardless of underlying FS type etc. This was designed with 'image fleecing' in mind so you can examine the FS but it could also be used for backups etc. Ian -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list