Thanks Jason,

I think I'm going to start with a bash script which SSH's into the machine to 
check if the process has finished writing and then calls the fsfreeze as I've 
got time constraints to getting this working. But I will definitely revisit 
this and see if there is something I can create which will do as you have 
described, as it would be a much neater solution.

Nick

> -----Original Message-----
> From: ceph-users [mailto:[email protected]] On Behalf Of 
> Jason Dillaman
> Sent: 08 July 2016 04:02
> To: [email protected]
> Cc: ceph-users <[email protected]>
> Subject: Re: [ceph-users] RBD Watch Notify for snapshots
> 
> 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 <mailto:[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
> mailto:[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

Reply via email to