[CentOS] I need some NFS explanations, please.

Tue May 20 15:22:32 UTC 2008
Steve Campbell <campbell at cnpapers.com>

I have a problem with NFS that I can't start to resolve. All servers are 
CentOS 5 servers. One server exports a directory and two others mount 
it. Simple so far.

A file is created on the server, and the two nfs clients do an "ls -al" 
and get a common (meaning the same) result as the server. Over the 
course of a day, and after the file on the server has been modified on 
the server, the results of the "ls -al" show the original common result 
on the two clients, and an obviously different result on the server. So 
I figure it's some kind of caching problem. But I figure it's a server 
caching problem.

I next go to one of the clients and "cat" the file, and then do another 
"ls -al". Now the server and this client agree on the file attributes, 
but not on the second client which shows the original wrong result 
still. So now I think it's a client caching problem.

Can anyone explain the above situation and perhaps some settings that 
will resolve this without requiring the nfs client to open the file in 
some way before it gets the proper file attributes?

"nfsstat -m" of the client returns the following:

 Flags: 
rw,vers=3,rsize=32768,wsize=32768,acregmax=3,acdirmin=3,acdirmax=3,hard,
intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=10.0.12.152


Thanks for any help.

Steve Campbell