From owner-freebsd-current@FreeBSD.ORG Sun Jan 9 13:50:48 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 AF4E9106564A for ; Sun, 9 Jan 2011 13:50:48 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 6C1EF8FC17 for ; Sun, 9 Jan 2011 13:50:48 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEABJMKU2DaFvO/2dsb2JhbACEAqE3rjiMQoEhgzd0BIRnhiOFKoYH X-IronPort-AV: E=Sophos;i="4.60,296,1291611600"; d="scan'208";a="104731741" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 09 Jan 2011 08:50:47 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 9D3A6B3F3E; Sun, 9 Jan 2011 08:50:47 -0500 (EST) Date: Sun, 9 Jan 2011 08:50:47 -0500 (EST) From: Rick Macklem To: Marek Salwerowicz Message-ID: <1591195360.13254.1294581047595.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <63A16336D4E84A90969026BAFB5FDA64@marekdesktop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] 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: Sun, 09 Jan 2011 13:50:48 -0000 > > 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.