NFSv4 and pam_mount - mounting user home directories.

Rick Macklem rmacklem at
Sun Jan 9 13:50:48 UTC 2011

> After manually setting:
> salwerom at freebsd:/etc#sudo sysctl vfs.newnfs.server_max_nfsvers=4
> vfs.newnfs.server_max_nfsvers: 4 -> 4
> salwerom at freebsd:/etc#sudo sysctl vfs.newnfs.server_min_nfsvers=4
> vfs.newnfs.server_min_nfsvers: 4 -> 4
> salwerom at freebsd:/etc#
> We are still able to mount via NFSv3 (even when those two lines are
> commented in sysctl.conf).
> Any other idea.. ?
It just worked for me. Try setting the sysctl before starting nfsd. If
you are starting the daemons manually for a kernel that doesn't have
"options NFSD" do:

# nfsuserd
# mountd -e -r
# sysctl vfs.newnfs.server_min_nfsvers=4
# nfsd -e -u -t -n 8

- mountd -e loads the module, so you can do the sysctl after that and before
  starting the nfsd. (Or build a kernel with "options NFSD" and do the sysctl
  anytime before starting the nfsd.)

ps: I tested the FreeBSD-8 client. Other clients may not even talk to the NFS
   server during mounting. For those, the mount would succeed, but subsequent
   use of the mount won't work.

More information about the freebsd-current mailing list