Related to this question on StackOverflow, I am wondering if there is a way for me to flush the NFS cache / force Linux to see the most up-to-date copy of a file that's on an NFS share.
I have a situation where four Apache servers mount the same directory via NFS, and when one server make a change to a file, it takes about 5 - 10 seconds for the other servers to see that change. If a second change is made to that file within this window, it may overwrite the first change.
The fstab
entry for the filesystem is:
172.16.1.15:/home /media/home nfs vers=3,defaults,noauto,sync,acregmin=1 0 0
Is there a command which will force Linux to flush cache of one file on an NFS share?