Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 2014 21:27:46 +1100
From:      Richard Perini <rpp@ci.com.au>
To:        freebsd-stable@freebsd.org
Subject:   NFS negative name caching and amd
Message-ID:  <20141221102746.GA11278@odi.ci.com.au>

next in thread | raw e-mail | index | archive | help

We're struggling with an NFS negative name caching issue that results in
a file created by an NFS client 'A' being invisible on client 'B' for up
to client A's negnametimeo value.  In our scenario, a process on client
A creates a file, and passes a message to another process which may 
run on client B.  The second process expects the file created by A to
be available.

We're running a mix of 9-stable and 10-stable machines, and the problem is 
common to both.

The obvious fix is to set the nfs mount option 'negnametimeo' to 0, but 
unfortunately we also have 'amd' in the picture (which we also need in our 
environment). Amd doesn't understand negnametimeo and ignores it, leaving
it set to the system default of 60 seconds (as shown by nfsstat -m).

We have a workaround that involves adding this entry to /sys/conf/options:
NFS_DEFAULT_NAMETIMEO	opt_nfs.h

and then setting it in our kernel config file:
option  NFS_DEFAULT_NEGNAMETIMEO=0

which changes the system default to disable NFS's negative name caching.
This seemed far easier than hacking on amd :-(

Is there a better solution to this issue?  If not, would a friendly committer 
be able to add the NFS_DEFAULT_NAMETIMEO to /sys/conf/options and MFC it 
back to the 9 branch please?  I will submit a PR if that is appropriate.

Regards

--
Richard Perini



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141221102746.GA11278>