Re: RBD Watch Notify for snapshots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux