Date: Mon, 10 Jan 2011 16:13:31 -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: <1283297834.106648.1294694011899.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <DB864E7EF95C43A68E74EB1B4B278BBA@marekdesktop>
next in thread | previous in thread | raw e-mail | index | archive | help
> >> Good to know if it will work with nfsv4 server started via rc.conf > >> and > >> sysctl values in sysctl.conf.. > >> > > build a kernel with "options NFSD" in its config file and then try > > it > > with that kernel, and then you'll find out... > > > > How about patching the /etc/rc.d/nfsd script like this: > > > [..] > nfsd_precmd() > { > if checkyesno nfs_server_newnfs_only; then > echo 'NFS server serving only newnfs (NFSv4)=YES' > sysctl vfs.newnfs.server_min_nfsvers=4 > /dev/null > fi > [..] > > It checks if there is a > nfs_server_newnfs_only=YES > set in rc.conf, and if so, it runs the sysctl command. > > But, after testing, it is too late (nfsd starts with NFSv3 support). > Any idea where to put that patch ? > I think you can stick it just before "return 0" in /etc/rc.d/nfsd. (I'd probably just go with the "sysctl vfs.newnfs.server_min_nfsvers=4" line in this case, since you want it unconditionally?) Or, if you don't want to build a kernel with "options NFSD", I think you can get nfsd.ko loaded early by fiddling with loader.conf, but I'm not volunteering to figure out what works there:-) rick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1283297834.106648.1294694011899.JavaMail.root>