NFS exports and mountd reload

I have set up NFS on FreeBSD 10.2-STABLE per the instructions in the handbook.
I have a very simple /etc/exports for test, and have been able to
do a basic check that FreeBSD and Solaris 10 will mount both ways correctly.

I've now added more entries to the /etc/exports directory to get my desired configuration. However, when I run service mountd reload as specified in the handbook, I get an error message:
Code:
Cannot 'reload' mountd. Set mountd_enable to YES in /etc/rc.conf or use 'onereload' instead of 'reload'.
Using onereload rather than reload doesn't appear to do anything. The new entry in the exports, which is a copy of another entry with another filename that will mount, won't mount the new file. Also the mountd(8) pid does not change in FreeBSD.

The NFS start stuff I put in /etc/rc.conf is:
Code:
# Start NFS server
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"
How can I get the daemon to reload properly?
 
Last edited by a moderator:
As an update, adding mountd_enable="YES" and rebooting lets me update the mountd table.
What is getting my attention is in /etc/rc.d/mountd
Code:
  # mountd flags will differ depending on rc.conf settings
  #
  if checkyesno nfs_server_enable ; then
  if checkyesno weak_mountd_authentication; then
  rc_flags="${mountd_flags} -n"
  fi
  else
  if checkyesno mountd_enable; then
  checkyesno weak_mountd_authentication && rc_flags="-n"
  fi
  fi
Shouldn't the first check "if" test set all the flags needed?
 
Last edited by a moderator:
A reload normally sends the SIGHUP signal(3) to the process. The service mountd reload in this case is essentially the same as pkill -HUP mountd and the end result of either is to re-read the config with no change to the PID. It should be loading correctly. Check showmount -e localhost before and after to verify it did take affect.

...
Shouldn't the first check "if" test set all the flags needed?
The mountd_enable="YES" is still needed to enable the service and it doesn't matter if mountd_flags is defined or not.
 
Back
Top