librbd pseudo-automatically handles this by flushing the cache to the snapshot when a new snapshot is created, but I don't think krbd does the same. If it doesn't, it would probably be a nice addition to the block driver to support the general case.
Baring that (or if you want to involve something like fsfreeze), I think the answer depends on how much you are willing to write some custom C/C++ code (I don't think the rados python library exposes watch/notify APIs). A daemon could register a watch on a custom per-host/image/etc object which would sync the disk when a notification is received. Prior to creating a snapshot, you would need to send a notification to this object to alert the daemon to sync/fsfreeze/etc. On Thu, Jul 7, 2016 at 12:33 PM, Nick Fisk <[email protected]> wrote: > Hi All, > > I have a RBD mounted to a machine via the kernel client and I wish to be > able to take a snapshot and mount it to another machine > where it can be backed up. > > The big issue is that I need to make sure that the process writing on the > source machine is finished and the FS is sync'd before > taking the snapshot. > > My question. Is there something I can do with Watch/Notify to trigger this > checking/sync process on the source machine before the > snapshot is actually taken? > > Thanks, > Nick > > _______________________________________________ > ceph-users mailing list > [email protected] > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com > -- Jason
_______________________________________________ ceph-users mailing list [email protected] http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
