aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mountd
diff options
context:
space:
mode:
authorMartin Cracauer <cracauer@FreeBSD.org>2019-02-11 15:51:28 +0000
committerMartin Cracauer <cracauer@FreeBSD.org>2019-02-11 15:51:28 +0000
commitaa255a10b02e74bd805356e96122fc030c44a793 (patch)
treed7092b0af4d3acaecd44dfa6b38600235f5d54af /usr.sbin/mountd
parent74a083d6c718bf7f7eacf4a83578dcb3dd3de5bb (diff)
Clarify NFSv4 /etc/exports semantics, with working example.
The existing wording has been confusing users for years.
Notes
Notes: svn path=/head/; revision=344013
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r--usr.sbin/mountd/exports.534
1 files changed, 34 insertions, 0 deletions
diff --git a/usr.sbin/mountd/exports.5 b/usr.sbin/mountd/exports.5
index c5537e978a39..e6f6e2d75ad8 100644
--- a/usr.sbin/mountd/exports.5
+++ b/usr.sbin/mountd/exports.5
@@ -498,6 +498,40 @@ and any client within the 131.104.48 subnet is permitted to perform NFSv4 state
operations on the server, so long as valid Kerberos credentials are provided.
The machine grumpy.cis.uoguelph.ca is permitted to perform NFSv4 state
operations on the server using AUTH_SYS credentials, as well as Kerberos ones.
+.Pp
+In the following example some directories are exported as NFSv3 and NFSv4:
+.Bd -literal -offset indent
+V4: /wingsdl/nfsv4
+/wingsdl/nfsv4/usr-ports -maproot=root -network 172.16.0.0 -mask 255.255.0.0
+/wingsdl/nfsv4/clasper -maproot=root clasper
+.Ed
+.Pp
+Only one V4: line is needed or allowed to declare where NFSv4 is
+rooted. The other lines declare specific exported directories with
+their absolute paths given in /etc/exports.
+.Pp
+The exported directories' paths are used for both v3 and v4.
+However, they are interpreted differently for v3 and v4. A client
+mount command for usr-ports would use the server-absolute name when
+using nfsv3:
+.Bd -literal -offset indent
+mount server:/wingsdl/nfsv4/usr-ports /mnt/tmp
+.Ed
+.Pp
+A mount command using NFSv4 would use the path relative to the NFSv4
+root:
+.Bd -literal -offset indent
+mount server:/usr-ports /mnt/tmp
+.Ed
+.Pp
+This also differentiates which version you want if the client can do
+both v3 and v4. The former will only ever do a v3 mount and the
+latter will only ever do a v4 mount.
+.Pp
+Note that due to different mount behavior between NFSv3 and NFSv4 a
+NFSv4 mount request for a directory that the client does not have
+permission for will succeed and read/write access will fail
+afterwards, whereas NFSv3 rejects the mount request.
.Sh SEE ALSO
.Xr nfsv4 4 ,
.Xr netgroup 5 ,