On Mon, Aug 22, 2016 at 3:13 PM, Nick Fisk <[email protected]> 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
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to