Does inotify work on NFS?

Does inotify work on NFS?

Solution: inotify requires support from the kernel to work. On a remote NFS machine, the change is not visible to the kernel; it happens entirely remotely. NFS predates inotify and there is no network level support for it in NFS, or anything equivalent.

How install Inotify Linux?

Installing inotify-tools

  1. Download and store the source code file for inotify-tools on the Linux server.
  2. Log in as root.
  3. Decompress the source code file, as shown in Figure 72.
  4. Enter the inotify-tools-3.14 directory, as shown in Figure 73.
  5. Configure the installation directory for inotify-tools.

How to use inotify with NFS Stack Overflow?

-Using machine A to create a file in /some/nfs/dir/also/visible/to/B, the script behaves as expected. Using machine B to carry out the same action, the script is not notified about a new file dropped in the directory. Is this a bug in the bug in the package I’m using to access inotofy, or is this expected behaviour?

Are there any limitations to the inotify interface?

The inotify interface does have limitations—it can’t monitor remote, network-mounted filesystems (that is, NFS); it does not report the userid involved in the event; it does not work with /proc or other pseudo-filesystems; and mmap () operations do not trigger it, among other concerns.

What does event output in inotify look like?

The event output can be config- ured, but by default it consists of lines of the following form: watched_filename EVENT_NAMES event_filename watched_filename is the name of the file on which the event occurred. If the file is a directory, a trailing slash is output.

When to use inotify to watch for new files?

A common application is testing for the arrival of new files. Since inotify must be given the name of an existing filesystem object to watch, the directory containing the new files is provided. A trigger of interest is also easy to provide—new files should be complete and ready for processing when the close_write trigger fires.