Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 May 2012 20:48:13 +0300
From:      Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: NFSv4 Questions
Message-ID:  <20120507174813.GA5927@pm513-1.comsys.ntu-kpi.kiev.ua>
In-Reply-To: <1494135294.103829.1335731763653.JavaMail.root@erie.cs.uoguelph.ca>
References:  <CA%2BQLa9B4Xxc-4pCo8y4pgU1BBoBvC2xG4vA3Kydr-Q2dXWRpNw@mail.gmail.com> <1494135294.103829.1335731763653.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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