The NFS server is a SLES11SP3, here is the exports statement:
/media/data *domain.com(rw,sync,no_root_squash,fsid=1)
I suspect this is a caching issue on the client (RHEL6), however I believe I turned all caching off, still the problem remains.
How the problems shows:
On the server I do a touch /media/data/test
. The file does not show on the client, even if I wait several minutes.
If I touch /media/data
(the directory) on the server, then it shows. It also appears when I touch /data/test2
from the client.
What I tried on the client:
# original
server:/media/data /data nfs rw,soft,vers=3,rsize=1048576,wsize=1048576,mountvers=3,sync,lookupcache=none
# mod 1 (remove parameters which have defaults: size, mountvers; add noac)
server:/media/data /data nfs rw,soft,vers=3,sync,lookupcache=none,noac 0 0
I also tried mounting using hard
and specify actimeo=1
, no effect.
I have seen this and this. No help either.
Update #1
It seems that the underlying filesystem is special.
The underlying filesystem on the server is a Novell NSS volume.
NSS has certain unique properties like mapping the creation time of the file to the ctime in Linux (which natively is the change time there).
Meaning: Upon modifying the directory contents, only mtime gets updated and not ctime. Apparently the RHEL NFS client does not consider this a sufficient reason to update its cache while the SuSE NFS clients seem to be patched for this.
What are the options?
- Change the properties on the NSS volume (which can optionally map ctime to Change Time and not Creation Time, although one would have to investigate the repercussions of this filesystem-wide setting)
- Get Redhat to only consider mtime and not ctime (why are they anyway?)
- Workaround: touch the directories before listing them.......