> -----Original Message----- > From: Ilya Dryomov [mailto:idryomov@xxxxxxxxx] > Sent: 22 August 2016 14:53 > To: Nick Fisk <nick@xxxxxxxxxx> > Cc: Jason Dillaman <dillaman@xxxxxxxxxx>; ceph-users <ceph-users@xxxxxxxxxxxxxx> > Subject: Re: RBD Watch Notify for snapshots > > On Mon, Aug 22, 2016 at 3:13 PM, Nick Fisk <nick@xxxxxxxxxx> wrote: > > Hi Jason, > > > > Here is my initial attempt at using the Watch/Notify support to be > > able to remotely fsfreeze a filesystem on a RBD. Please note this was all very new to me and so there will probably be a lot of things > that haven't been done in the best way. > > > > https://github.com/fiskn/rbd_freeze > > > > I'm not sure if calling out to bash scripts is the best way of doing > > the fsfreezing, but it was the easiest way I could think to accomplish the task. And it also allowed me to fairly easily run extra checks > like seeing if any files have been updated recently. > > If at any point you decide to get rid of bash scripts, look at libmount in util-linux.git repository. It's got helpers for parsing fstab and > mountinfo files and should let you go from a device to a mountpoint in a couple of C function calls. Once you have the mountpoint, it's > just a matter of ioctl(fd, FIFREEZE, 0). Thanks Ilya, yes that actually looks quite simple now you mention it. Will have a go in v1.1 :-) > > Thanks, > > Ilya _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com