Restarting mountd (via kill and restart or HUP-ing the process) will temporarily cause all existing mounts to be denied access, and new mounts to be refused with a 'permission denied' error. Fix: None known. How-To-Repeat: 2 Machines, a NFS server, and a NFS client. Create a simple '/etc/exports' file on the server and start NFS services (nfsd, mountd, etc...). Mount an exported partion on the client (e.g. "mount server:/export /mnt"). Start a tar of that directory on the client (should be alot of files in order to give you time to complete all of these steps.) (e.g. "tar -cpf /dev/null /mnt"). While the tar is still running on the client, send the mount daemon on the server a SIGHUP (e.g. "kill -HUP <mountdPID>"). Now watch the permission denied error messages scroll by on the client.
This is still a problem in -current. It's quite annoying.
Responsible Changed From-To: freebsd-bugs->rodrigc Mine.
State Changed From-To: open->open commit bit has been taken in for safekeeping.
Responsible Changed From-To: rodrigc->freebsd-bugs
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
I'm pretty sure this is no longer the case (well, at least with HUP). Rick: can you confirm?
In recent versions of FreeBSD, mountd has the "-S" option, which can be used to avoid this from happening. It suspends/resumes the nfsd threads while it is reloading the exports. Some have suggested that it should be enabled by default, but others felt that would be a POLA violation (since all NFS services stop during the suspend), so it has never been made the default and must be enabled via the "-S" option.
*** Bug 206855 has been marked as a duplicate of this bug. ***
I have left this open since I do have a 2 line patch that ensures that "mountd -S" isn't delayed by heavy server load. The patch gives the "suspend" priority over regular nfs requests instead of waiting until there are no outstanding RPCs before doing the suspend. (This patch is not yet in -head.)
*** Bug 131342 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: rmacklem Date: Sun May 8 20:10:23 UTC 2016 New revision: 299242 URL: https://svnweb.freebsd.org/changeset/base/299242 Log: Make "-S" a default option for mountd. After a discussion on freebsd-fs@ there seemed to be a consensus that the "-S" option for mountd should become the default. Since the only known issue w.r.t. using "-S" was fixed by r299201, this commit adds "-S" to the default mountd_flags. Discussed on: freebsd-fs PR: 9619, 131342, 206855 MFC after: 2 weeks Relnotes: yes Changes: head/etc/defaults/rc.conf
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
The "-S" mountd option fixes this and r299201 has been MFC'd to 10 and 11.