Firing an inotify event via NFS on Linux?

Is it possible to trigger a file system event on Linux without actually modifying the file? Is there some kind of system call that acts like a file? Is it possible?

I have an NFS share set and you want to receive inotify events in the virtual machine when the file changes on the server.

inotify does not seem to work with NFS. Is there a network file system that supports inotify ?

It is easy to track events on the server, but how can I trigger events on the client? At this moment I am doing a simple touch , but it is not perfect.

(used for local development with docker (boot2docker, OS X.)

+5
source share
2 answers

Sorry, this is just not a feature.

You can implement some kind of semaphore thing using incrond to monitor the local file system, then do something (touch the file, run the script, etc.) on the remote computer to report that there is an update, but there is no NFS built-in function.

0
source

Now I am using Docker for Mac. I am still using NFS due to poor file sharing with osxfs. I wrote a sublime text plugin 3 to do this automatically, this solves my use case.

0
source

Source: https://habr.com/ru/post/1215434/


All Articles