From owner-freebsd-current@FreeBSD.ORG Mon Jan 10 21:13:34 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2BAC106564A for ; Mon, 10 Jan 2011 21:13:33 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id A53118FC24 for ; Mon, 10 Jan 2011 21:13:33 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEALIEK02DaFvO/2dsb2JhbACECKE2rU2Nf4Ehgzd0BIRnhiOFKoYH X-IronPort-AV: E=Sophos;i="4.60,303,1291611600"; d="scan'208";a="106567182" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 10 Jan 2011 16:13:32 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id DF69EB3F80; Mon, 10 Jan 2011 16:13:31 -0500 (EST) Date: Mon, 10 Jan 2011 16:13:31 -0500 (EST) From: Rick Macklem To: Marek Salwerowicz Message-ID: <1283297834.106648.1294694011899.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: freebsd-current@freebsd.org, Andrzej Tobola Subject: Re: NFSv4 and pam_mount - mounting user home directories. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 21:13:34 -0000 > >> 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