Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jan 2011 08:50:47 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Marek Salwerowicz <salwerom@iem.pw.edu.pl>
Cc:        freebsd-current@freebsd.org, Andrzej Tobola <ato@iem.pw.edu.pl>
Subject:   Re: NFSv4 and pam_mount - mounting user home directories.
Message-ID:  <1591195360.13254.1294581047595.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <63A16336D4E84A90969026BAFB5FDA64@marekdesktop>

next in thread | previous in thread | raw e-mail | index | archive | help
 > 
> After manually setting:
> 
> salwerom@freebsd:/etc#sudo sysctl vfs.newnfs.server_max_nfsvers=4
> vfs.newnfs.server_max_nfsvers: 4 -> 4
> salwerom@freebsd:/etc#sudo sysctl vfs.newnfs.server_min_nfsvers=4
> vfs.newnfs.server_min_nfsvers: 4 -> 4
> salwerom@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.)

rick
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.



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