6

Can I trigger a filesystem event on Linux, without an actual file change? Is there some system call that acts like the file was written? Is that even possible?

I have a NFS share mounted and want to get inotify events in the virtual machine, when a file changes on the server site.

It seems inotify doesn't work with NFS. Is there any network filesystem that supports inotify?

It's easy to monitor the events on the server site, but how can I trigger the events on the client? At that moment I do a simple touch, but that's not ideal.

(the use case is for local development with docker (boot2docker, OS X.)

John Hascall
  • 9,176
  • 6
  • 48
  • 72
yvess
  • 1,992
  • 19
  • 17

2 Answers2

0

Sorry, it's just not a feature.

You could implement some sort of semaphore thing by using incrond to monitor the local filesystem, then do something (touch a file, trigger a script, etc.) on the remote machine to tell it there's been an update, but there's no native functionality in NFS.

Terry Carmen
  • 3,720
  • 1
  • 16
  • 32
0

Now I'm using Docker for Mac. I still use NFS because of the bad file sharing performence with osxfs. I have written a sublime text 3 plugin, to do the touch automatically, this solves my use case.

yvess
  • 1,992
  • 19
  • 17