NFS negative name caching and amd
Richard Perini
rpp at ci.com.au
Sun Dec 21 10:35:10 UTC 2014
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
More information about the freebsd-stable
mailing list