Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Here's the mount configuration of an NFS mount, we'll call it server2, gotten from running cat /etc/mtab:

<ip1>:/mnt/fs101 /mnt/fs101 nfs rw,relatime,rsize=1024,wsize=1024,timeo=14,intr,cto,acregmax=6,acdirmax=0,noac,acdirmin=0,vers=4,addr=<ip1>,clientaddr=10.0.0.201 0 0

Another machine (call it server1) has more default settings, but is also mounting the NFS mount at . When I edit a file with vim on server1, and then run cat file.txt, I usually see the contents of the old file (i.e. not the edits).

If i type ls -l into the directory on server2 (the one seeing the old contents), then run cat again, I now see the updated contents.

As you can see server2 has its NFS caching effectively turned off. This affects across a number of machines, many (say 7 or 8) of which have this NFS mount attached. These are virtualized CentOS 6 machines running on VMWare.

I'm lost on where to go with this one—it seems it may be related to file attributes and to ls running stat on files but I'm not sure how I can effectively "fix" this issue. I'm okay with a certain period of caching for performance as these are webservers (10-20s) but right now it's completely unpredictable.

Update: when checking the machine that is presenting the NFS mount (i.e. in above), this machine sees the updated file contents immediately after editing on server1

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.