From owner-freebsd-fs@FreeBSD.ORG Mon May 7 17:48:22 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A138106566C for ; Mon, 7 May 2012 17:48:22 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id A640D8FC1A for ; Mon, 7 May 2012 17:48:21 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1SRS2f-0006I1-Qx; Mon, 07 May 2012 20:48:13 +0300 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id B0C111CC31; Mon, 7 May 2012 20:48:13 +0300 (EEST) Date: Mon, 7 May 2012 20:48:13 +0300 From: Andrey Simonenko To: Rick Macklem Message-ID: <20120507174813.GA5927@pm513-1.comsys.ntu-kpi.kiev.ua> References: <1494135294.103829.1335731763653.JavaMail.root@erie.cs.uoguelph.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494135294.103829.1335731763653.JavaMail.root@erie.cs.uoguelph.ca> User-Agent: Mutt/1.5.21 (2010-09-15) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 28-Apr-2011 07:11:12) X-Date: 2012-05-07 20:48:13 X-Connected-IP: 10.18.52.101:29819 X-Message-Linecount: 62 X-Body-Linecount: 46 X-Message-Size: 2847 X-Body-Size: 2070 Cc: freebsd-fs@freebsd.org Subject: Re: NFSv4 Questions X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 17:48:22 -0000 On Sun, Apr 29, 2012 at 04:36:03PM -0400, Rick Macklem wrote: > > Also, be sure to check "man nfsv4" and maybe reference it (it is currently > in the See Also list, but that might not be strong enough). There is another question not explained in documentation (I could not find the answer at least). Currently NFSv3 client uses reserved port for NFS mounts and uses non reserved port if "noresvport" is specified. NFSv4 client always uses non reserved port, ignoring the "resvport" option in the mount_nfs command. Such behaviour of NFS client was introduced in 1.18 version of fs/nfsclient/nfs_clvfsops.c [1], where the "resvport" flag is cleared for NFSv4 mounts. Why does "reserved port logic" differ in NFSv3 and NFSv4 clients? > > If I may, perhaps a switch in /etc/rc.conf: > > nfsv4_only="YES" > > > I might call it nfsv4_server_only, but sounds like a good suggestion. > > > This would set the -nfsv4-only switch you mention for mountd, and it > > would set vfs.nfsd.server_min_nfsvers=4 > > > It could also be used by /etc/rc.d/mountd to indicate "don't force rpcbind". > I'm sure that you know all these, but let me add some comments. 1. Using server_min_nfsvers and server_max_nfsvers are global settings and do not allow to make one file system NFSv2/3/4 exported and another one NFSv4 exported only for example. 2. MOUNT protocol is not used only for MNT/UMNT/UMNTALL requests from NFSv2/3 clients. As I know some automounters use MOUNT EXPORT requests to get information about exported file systems. So, MOUNT protocol can be usefull for somebody who uses NFSv4 only. Both items have something common. There should be options that enable/ disables NFSv2, NFSv3 and/or NFSv4 per address specification and/or per file system. And there should be the option that allows to disable the MOUNT protocol entirely, some of its versions or some of its netconfigs (some of visible netconfigs that can be used by the MOUNT protocol). [1] http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/fs/nfsclient/nfs_clvfsops.c.diff?r1=1.17;r2=1.18