|
|
381c0b |
diff --git a/nfs.conf b/nfs.conf
|
|
|
381c0b |
index 8c714ff7..21d3e7b2 100644
|
|
|
381c0b |
--- a/nfs.conf
|
|
|
381c0b |
+++ b/nfs.conf
|
|
|
381c0b |
@@ -68,7 +68,6 @@
|
|
|
381c0b |
# lease-time=90
|
|
|
381c0b |
# udp=n
|
|
|
381c0b |
# tcp=y
|
|
|
381c0b |
-# vers2=n
|
|
|
381c0b |
# vers3=y
|
|
|
381c0b |
# vers4=y
|
|
|
381c0b |
# vers4.0=y
|
|
|
381c0b |
diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man
|
|
|
381c0b |
index 4436a38a..be487a11 100644
|
|
|
381c0b |
--- a/systemd/nfs.conf.man
|
|
|
381c0b |
+++ b/systemd/nfs.conf.man
|
|
|
381c0b |
@@ -171,7 +171,6 @@ Recognized values:
|
|
|
381c0b |
.BR lease-time ,
|
|
|
381c0b |
.BR udp ,
|
|
|
381c0b |
.BR tcp ,
|
|
|
381c0b |
-.BR vers2 ,
|
|
|
381c0b |
.BR vers3 ,
|
|
|
381c0b |
.BR vers4 ,
|
|
|
381c0b |
.BR vers4.0 ,
|
|
|
381c0b |
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c
|
|
|
381c0b |
index 3d3684ef..1d88cbfc 100644
|
|
|
381c0b |
--- a/utils/mount/configfile.c
|
|
|
381c0b |
+++ b/utils/mount/configfile.c
|
|
|
381c0b |
@@ -71,7 +71,7 @@ struct mnt_alias {
|
|
|
381c0b |
int mnt_alias_sz = (sizeof(mnt_alias_tab)/sizeof(mnt_alias_tab[0]));
|
|
|
381c0b |
|
|
|
381c0b |
static const char *version_keys[] = {
|
|
|
381c0b |
- "v2", "v3", "v4", "vers", "nfsvers", "minorversion", NULL
|
|
|
381c0b |
+ "v3", "v4", "vers", "nfsvers", "minorversion", NULL
|
|
|
381c0b |
};
|
|
|
381c0b |
|
|
|
381c0b |
static int strict;
|
|
|
381c0b |
diff --git a/utils/mount/mount.nfs.man b/utils/mount/mount.nfs.man
|
|
|
381c0b |
index 0409c96f..a78a3b0d 100644
|
|
|
381c0b |
--- a/utils/mount/mount.nfs.man
|
|
|
381c0b |
+++ b/utils/mount/mount.nfs.man
|
|
|
381c0b |
@@ -27,7 +27,7 @@ can mount all NFS file system versions. Under earlier Linux kernel versions,
|
|
|
381c0b |
.BR mount.nfs4
|
|
|
381c0b |
must be used for mounting NFSv4 file systems while
|
|
|
381c0b |
.BR mount.nfs
|
|
|
381c0b |
-must be used for NFSv3 and v2.
|
|
|
381c0b |
+must be used for NFSv3.
|
|
|
381c0b |
|
|
|
381c0b |
.SH OPTIONS
|
|
|
381c0b |
.TP
|
|
|
381c0b |
diff --git a/utils/mount/network.c b/utils/mount/network.c
|
|
|
381c0b |
index e803dbbe..0d80d08c 100644
|
|
|
381c0b |
--- a/utils/mount/network.c
|
|
|
381c0b |
+++ b/utils/mount/network.c
|
|
|
381c0b |
@@ -97,7 +97,7 @@ static const char *nfs_transport_opttbl[] = {
|
|
|
381c0b |
};
|
|
|
381c0b |
|
|
|
381c0b |
static const char *nfs_version_opttbl[] = {
|
|
|
381c0b |
- "v2",
|
|
|
381c0b |
+ "v2", /* no longer supported */
|
|
|
381c0b |
"v3",
|
|
|
381c0b |
"v4",
|
|
|
381c0b |
"vers",
|
|
|
381c0b |
@@ -1290,7 +1290,7 @@ nfs_nfs_version(char *type, struct mount_options *options, struct nfs_version *v
|
|
|
381c0b |
else if (found < 0)
|
|
|
381c0b |
return 1;
|
|
|
381c0b |
else if (found <= 2 ) {
|
|
|
381c0b |
- /* v2, v3, v4 */
|
|
|
381c0b |
+ /* v3, v4 */
|
|
|
381c0b |
version_val = version_key + 1;
|
|
|
381c0b |
version->v_mode = V_SPECIFIC;
|
|
|
381c0b |
} else if (found > 2 ) {
|
|
|
381c0b |
diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man
|
|
|
381c0b |
index f1b76936..83365a37 100644
|
|
|
381c0b |
--- a/utils/mount/nfs.man
|
|
|
381c0b |
+++ b/utils/mount/nfs.man
|
|
|
381c0b |
@@ -12,7 +12,7 @@ created by Sun Microsystems in 1984. NFS was developed
|
|
|
381c0b |
to allow file sharing between systems residing
|
|
|
381c0b |
on a local area network.
|
|
|
381c0b |
Depending on kernel configuration, the Linux NFS client may
|
|
|
381c0b |
-support NFS versions 2, 3, 4.0, 4.1, or 4.2.
|
|
|
381c0b |
+support NFS versions 3, 4.0, 4.1, or 4.2.
|
|
|
381c0b |
.P
|
|
|
381c0b |
The
|
|
|
381c0b |
.BR mount (8)
|
|
|
381c0b |
@@ -941,11 +941,6 @@ file. See
|
|
|
381c0b |
.BR nfsmount.conf(5)
|
|
|
381c0b |
for details.
|
|
|
381c0b |
.SH EXAMPLES
|
|
|
381c0b |
-To mount an export using NFS version 2,
|
|
|
381c0b |
-use the
|
|
|
381c0b |
-.B nfs
|
|
|
381c0b |
-file system type and specify the
|
|
|
381c0b |
-.B nfsvers=2
|
|
|
381c0b |
mount option.
|
|
|
381c0b |
To mount using NFS version 3,
|
|
|
381c0b |
use the
|
|
|
381c0b |
@@ -972,13 +967,6 @@ reasonable defaults for NFS behavior.
|
|
|
381c0b |
server:/export /mnt nfs defaults 0 0
|
|
|
381c0b |
.fi
|
|
|
381c0b |
.P
|
|
|
381c0b |
-Here is an example from an /etc/fstab file for an NFS version 2 mount over UDP.
|
|
|
381c0b |
-.P
|
|
|
381c0b |
-.nf
|
|
|
381c0b |
-.ta 8n +16n +6n +6n +30n
|
|
|
381c0b |
- server:/export /mnt nfs nfsvers=2,proto=udp 0 0
|
|
|
381c0b |
-.fi
|
|
|
381c0b |
-.P
|
|
|
381c0b |
This example shows how to mount using NFS version 4 over TCP
|
|
|
381c0b |
with Kerberos 5 mutual authentication.
|
|
|
381c0b |
.P
|
|
|
381c0b |
@@ -1071,7 +1059,7 @@ and
|
|
|
381c0b |
can safely be allowed to default to the largest values supported by
|
|
|
381c0b |
both client and server, independent of the network's MTU size.
|
|
|
381c0b |
.SS "Using the mountproto mount option"
|
|
|
381c0b |
-This section applies only to NFS version 2 and version 3 mounts
|
|
|
381c0b |
+This section applies only to NFS version 3 mounts
|
|
|
381c0b |
since NFS version 4 does not use a separate protocol for mount
|
|
|
381c0b |
requests.
|
|
|
381c0b |
.P
|
|
|
381c0b |
@@ -1474,7 +1462,7 @@ the use of the
|
|
|
381c0b |
mount option.
|
|
|
381c0b |
.SS "Using file locks with NFS"
|
|
|
381c0b |
The Network Lock Manager protocol is a separate sideband protocol
|
|
|
381c0b |
-used to manage file locks in NFS version 2 and version 3.
|
|
|
381c0b |
+used to manage file locks in NFS version 3.
|
|
|
381c0b |
To support lock recovery after a client or server reboot,
|
|
|
381c0b |
a second sideband protocol --
|
|
|
381c0b |
known as the Network Status Manager protocol --
|
|
|
381c0b |
@@ -1894,8 +1882,6 @@ RFC 768 for the UDP specification.
|
|
|
381c0b |
.br
|
|
|
381c0b |
RFC 793 for the TCP specification.
|
|
|
381c0b |
.br
|
|
|
381c0b |
-RFC 1094 for the NFS version 2 specification.
|
|
|
381c0b |
-.br
|
|
|
381c0b |
RFC 1813 for the NFS version 3 specification.
|
|
|
381c0b |
.br
|
|
|
381c0b |
RFC 1832 for the XDR specification.
|
|
|
381c0b |
diff --git a/utils/mount/nfsmount.conf b/utils/mount/nfsmount.conf
|
|
|
381c0b |
index 6bdc225a..342063f7 100644
|
|
|
381c0b |
--- a/utils/mount/nfsmount.conf
|
|
|
381c0b |
+++ b/utils/mount/nfsmount.conf
|
|
|
381c0b |
@@ -28,7 +28,7 @@
|
|
|
381c0b |
# This statically named section defines global mount
|
|
|
381c0b |
# options that can be applied on all NFS mount.
|
|
|
381c0b |
#
|
|
|
381c0b |
-# Protocol Version [2,3,4]
|
|
|
381c0b |
+# Protocol Version [3,4]
|
|
|
381c0b |
# This defines the default protocol version which will
|
|
|
381c0b |
# be used to start the negotiation with the server.
|
|
|
381c0b |
# Defaultvers=4
|
|
|
381c0b |
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
|
|
|
381c0b |
index fa67a66f..3c4e218a 100644
|
|
|
381c0b |
--- a/utils/mount/stropts.c
|
|
|
381c0b |
+++ b/utils/mount/stropts.c
|
|
|
381c0b |
@@ -357,6 +357,7 @@ static int nfs_insert_sloppy_option(struct mount_options *options)
|
|
|
381c0b |
|
|
|
381c0b |
static int nfs_set_version(struct nfsmount_info *mi)
|
|
|
381c0b |
{
|
|
|
381c0b |
+
|
|
|
381c0b |
if (!nfs_nfs_version(mi->type, mi->options, &mi->version))
|
|
|
381c0b |
return 0;
|
|
|
381c0b |
|
|
|
381c0b |
@@ -1016,7 +1017,6 @@ static int nfs_try_mount(struct nfsmount_info *mi)
|
|
|
381c0b |
}
|
|
|
381c0b |
|
|
|
381c0b |
switch (mi->version.major) {
|
|
|
381c0b |
- case 2:
|
|
|
381c0b |
case 3:
|
|
|
381c0b |
result = nfs_try_mount_v3v2(mi, FALSE);
|
|
|
381c0b |
break;
|
|
|
381c0b |
@@ -1247,6 +1247,14 @@ static int nfsmount_start(struct nfsmount_info *mi)
|
|
|
381c0b |
if (!nfs_validate_options(mi))
|
|
|
381c0b |
return EX_FAIL;
|
|
|
381c0b |
|
|
|
381c0b |
+ /*
|
|
|
381c0b |
+ * NFS v2 has been deprecated
|
|
|
381c0b |
+ */
|
|
|
381c0b |
+ if (mi->version.major == 2) {
|
|
|
381c0b |
+ mount_error(mi->spec, mi->node, EOPNOTSUPP);
|
|
|
381c0b |
+ return EX_FAIL;
|
|
|
381c0b |
+ }
|
|
|
381c0b |
+
|
|
|
381c0b |
/*
|
|
|
381c0b |
* Avoid retry and negotiation logic when remounting
|
|
|
381c0b |
*/
|
|
|
381c0b |
diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man
|
|
|
381c0b |
index 77e6299a..a206a3e2 100644
|
|
|
381c0b |
--- a/utils/mountd/mountd.man
|
|
|
381c0b |
+++ b/utils/mountd/mountd.man
|
|
|
381c0b |
@@ -286,10 +286,9 @@ The values recognized in the
|
|
|
381c0b |
section include
|
|
|
381c0b |
.BR TCP ,
|
|
|
381c0b |
.BR UDP ,
|
|
|
381c0b |
-.BR vers2 ,
|
|
|
381c0b |
.BR vers3 ", and"
|
|
|
381c0b |
.B vers4
|
|
|
381c0b |
-which each have same same meaning as given by
|
|
|
381c0b |
+which each have the same meaning as given by
|
|
|
381c0b |
.BR rpc.nfsd (8).
|
|
|
381c0b |
|
|
|
381c0b |
.SH TCP_WRAPPERS SUPPORT
|
|
|
381c0b |
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
|
|
|
381c0b |
index b0741718..4016a761 100644
|
|
|
381c0b |
--- a/utils/nfsd/nfsd.c
|
|
|
381c0b |
+++ b/utils/nfsd/nfsd.c
|
|
|
381c0b |
@@ -226,7 +226,6 @@ main(int argc, char **argv)
|
|
|
381c0b |
}
|
|
|
381c0b |
/* FALLTHRU */
|
|
|
381c0b |
case 3:
|
|
|
381c0b |
- case 2:
|
|
|
381c0b |
NFSCTL_VERUNSET(versbits, c);
|
|
|
381c0b |
break;
|
|
|
381c0b |
default:
|
|
|
381c0b |
@@ -251,7 +250,6 @@ main(int argc, char **argv)
|
|
|
381c0b |
minorvers = minorversset = minormask;
|
|
|
381c0b |
/* FALLTHRU */
|
|
|
381c0b |
case 3:
|
|
|
381c0b |
- case 2:
|
|
|
381c0b |
NFSCTL_VERSET(versbits, c);
|
|
|
381c0b |
break;
|
|
|
381c0b |
default:
|
|
|
381c0b |
diff --git a/utils/nfsd/nfsd.man b/utils/nfsd/nfsd.man
|
|
|
381c0b |
index 2701ba78..634b8a63 100644
|
|
|
381c0b |
--- a/utils/nfsd/nfsd.man
|
|
|
381c0b |
+++ b/utils/nfsd/nfsd.man
|
|
|
381c0b |
@@ -57,7 +57,7 @@ This option can be used to request that
|
|
|
381c0b |
.B rpc.nfsd
|
|
|
381c0b |
does not offer certain versions of NFS. The current version of
|
|
|
381c0b |
.B rpc.nfsd
|
|
|
381c0b |
-can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
|
|
|
381c0b |
+can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
|
|
|
381c0b |
.TP
|
|
|
381c0b |
.B \-s " or " \-\-syslog
|
|
|
381c0b |
By default,
|
|
|
381c0b |
@@ -84,7 +84,7 @@ This option can be used to request that
|
|
|
381c0b |
.B rpc.nfsd
|
|
|
381c0b |
offer certain versions of NFS. The current version of
|
|
|
381c0b |
.B rpc.nfsd
|
|
|
381c0b |
-can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
|
|
|
381c0b |
+can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
|
|
|
381c0b |
.TP
|
|
|
381c0b |
.B \-L " or " \-\-lease-time seconds
|
|
|
381c0b |
Set the lease-time used for NFSv4. This corresponds to how often
|
|
|
381c0b |
@@ -156,8 +156,6 @@ Enable (with "on" or "yes" etc) or disable ("off", "no") UDP support.
|
|
|
381c0b |
.B TCP
|
|
|
381c0b |
Enable or disable TCP support.
|
|
|
381c0b |
.TP
|
|
|
381c0b |
-.B vers2
|
|
|
381c0b |
-.TP
|
|
|
381c0b |
.B vers3
|
|
|
381c0b |
.TP
|
|
|
381c0b |
.B vers4
|