]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfs.man
Imported Upstream version 1.2.3
[nfs-utils.git] / utils / mount / nfs.man
index 7aa15d6d938f1a2429595287e755c23deb589158..55d4b553b480bd4c4859c4815c99d4d3cbb3a1b9 100644 (file)
@@ -3,8 +3,6 @@
 .SH NAME
 nfs \- fstab format and options for the
 .B nfs
-and
-.B nfs4
 file systems
 .SH SYNOPSIS
 .I /etc/fstab
@@ -58,19 +56,23 @@ The server's hostname and export pathname
 are separated by a colon, while
 the mount options are separated by commas. The remaining fields
 are separated by blanks or tabs.
+.P
 The server's hostname can be an unqualified hostname,
 a fully qualified domain name,
-or a dotted quad IPv4 address.
+a dotted quad IPv4 address, or
+an IPv6 address enclosed in square brackets.
+Link-local and site-local IPv6 addresses must be accompanied by an
+interface identifier.
+See
+.BR ipv6 (7)
+for details on specifying raw IPv6 addresses.
+.P
 The
 .I fstype
-field contains either "nfs" (for version 2 or version 3 NFS mounts)
-or "nfs4" (for NFS version 4 mounts).
+field contains "nfs", for whatever version of the protocol.
 The
 .B nfs
-and
-.B nfs4
-file system types share similar mount options,
-which are described below.
+allow several mount options, which are described below.
 .SH "MOUNT OPTIONS"
 Refer to
 .BR mount (8)
@@ -81,14 +83,8 @@ specify any mount options, use the generic option
 in
 .IR /etc/fstab .
 .DT
-.SS "Valid options for either the nfs or nfs4 file system type"
-These options are valid to use when mounting either
-.B nfs
-or
-.B nfs4
-file system types.
-They imply the same behavior
-and have the same default for both file system types.
+.SS "Options supported by all versions"
+These options are valid to use with any NFS version.
 .TP 1.5i
 .BR soft " / " hard
 Determines the recovery behavior of the NFS client
@@ -355,7 +351,11 @@ The number of minutes that the
 command retries an NFS mount operation
 in the foreground or background before giving up.
 If this option is not specified, the default value for foreground mounts
-is 2 minutes, and the default value for background mounts is 10000 minutes (80 minutes shy of one week).
+is 2 minutes, and the default value for background mounts is 10000 minutes
+(80 minutes shy of one week).
+If a value of zero is specified, the
+.BR mount (8)
+command exits immediately after the first failure.
 .TP 1.5i
 .BI sec= mode
 The RPCGSS security flavor to use for accessing files on this mount point.
@@ -464,38 +464,45 @@ by other clients, but can impact application and server performance.
 .IP
 The DATA AND METADATA COHERENCE section contains a
 detailed discussion of these trade-offs.
-.SS "Valid options for the nfs file system type"
+.SS "Options for versions 2 and 3 only"
 Use these options, along with the options in the above subsection,
-for mounting the
-.B nfs
-file system type.
+for NFSv2/v3 only. They will be ignored for newer versions.
 .TP 1.5i
-.BI proto= transport
-The transport the NFS client uses
+.BI proto= netid
+The transport protocol name and protocol family the NFS client uses
 to transmit requests to the NFS server for this mount point.
-.I transport
-can be either
-.B udp
-or
-.BR tcp .
-Each transport uses different default
+If an NFS server has both an IPv4 and an IPv6 address, using a specific
+netid will force the use of IPv4 or IPv6 networking to communicate
+with that server.
+.IP
+If support for TI-RPC is built into the
+.B mount.nfs
+command,
+.I netid
+is a valid netid listed in
+.IR /etc/netconfig .
+The value "rdma" may also be specified.
+If the
+.B mount.nfs
+command does not have TI-RPC support, then
+.I netid
+is one of "tcp," "udp," or "rdma," and only IPv4 may be used.
+.IP
+Each transport protocol uses different default
 .B retrans
 and
 .B timeo
-settings; refer to the description of these two mount options for details.
+settings.
+Refer to the description of these two mount options for details.
 .IP
 In addition to controlling how the NFS client transmits requests to
 the server, this mount option also controls how the
 .BR mount (8)
 command communicates with the server's rpcbind and mountd services.
-Specifying
-.B proto=tcp
-forces all traffic from the
+Specifying a netid that uses TCP forces all traffic from the
 .BR mount (8)
 command and the NFS client to use TCP.
-Specifying
-.B proto=udp
-forces all traffic types to use UDP.
+Specifying a netid that uses UDP forces all traffic types to use UDP.
 .IP
 If the
 .B proto
@@ -519,6 +526,12 @@ option is an alternative to specifying
 .BR proto=tcp.
 It is included for compatibility with other operating systems.
 .TP 1.5i
+.B rdma
+The
+.B rdma
+option is an alternative to specifying
+.BR proto=rdma.
+.TP 1.5i
 .BI port= n
 The numeric value of the server's NFS service port.
 If the server's NFS service is not available on the specified port,
@@ -548,15 +561,20 @@ or the server's mountd service is not available on the advertised port.
 This option can be used when mounting an NFS server
 through a firewall that blocks the rpcbind protocol.
 .TP 1.5i
-.BI mountproto= transport
-The transport the NFS client uses
+.BI mountproto= netid
+The transport protocol name and protocol family the NFS client uses
 to transmit requests to the NFS server's mountd service when performing
 this mount request, and when later unmounting this mount point.
-.I transport
-can be either
-.B udp
-or
-.BR tcp .
+.IP
+If support for TI-RPC is built into the
+.B mount.nfs
+command,
+.I netid
+is a valid netid listed in
+.IR /etc/netconfig .
+Otherwise,
+.I netid
+is one of "tcp" or "udp," and only IPv4 may be used.
 .IP
 This option can be used when mounting an NFS server
 through a firewall that blocks a particular transport.
@@ -566,6 +584,7 @@ option, different transports for mountd requests and NFS requests
 can be specified.
 If the server's mountd service is not available via the specified
 transport, the mount request fails.
+.IP
 Refer to the TRANSPORT METHODS section for more on how the
 .B mountproto
 mount option interacts with the
@@ -599,14 +618,9 @@ in such cases.
 .TP 1.5i
 .BI nfsvers= n
 The NFS protocol version number used to contact the server's NFS service.
-The Linux client supports version 2 and version 3 of the NFS protocol
-when using the file system type
-.BR nfs .
-If the server does not support the requested version,
-the mount request fails.
-If this option is not specified, the client attempts to use version 3,
-but negotiates the NFS version with the server if version 3 support
-is not available.
+If the server does not support the requested version, the mount request fails.
+If this option is not specified, the client negociate a suitable version with
+the server, trying version 4 first, version 3 second, and version 2 last.
 .TP 1.5i
 .BI vers= n
 This option is an alternative to the
@@ -703,23 +717,30 @@ If this option is not specified, the NFS client uses READDIRPLUS requests
 on NFS version 3 mounts to read small directories.
 Some applications perform better if the client uses only READDIR requests
 for all directories.
-.SS "Valid options for the nfs4 file system type"
+.SS "Options for version 4 only"
 Use these options, along with the options in the first subsection above,
-for mounting the
-.B nfs4
-file system type.
+for NFSv4 only. They will be ignored with older versions.
 .TP 1.5i
-.BI proto= transport
-The transport the NFS client uses
+.BI proto= netid
+The transport protocol name and protocol family the NFS client uses
 to transmit requests to the NFS server for this mount point.
-.I transport
-can be either
-.B udp
-or
-.BR tcp .
+If an NFS server has both an IPv4 and an IPv6 address, using a specific
+netid will force the use of IPv4 or IPv6 networking to communicate
+with that server.
+.IP
+If support for TI-RPC is built into the
+.B mount.nfs
+command,
+.I netid
+is a valid netid listed in
+.IR /etc/netconfig .
+Otherwise,
+.I netid
+is one of "tcp" or "udp," and only IPv4 may be used.
+.IP
 All NFS version 4 servers are required to support TCP,
 so if this mount option is not specified, the NFS version 4 client
-uses the TCP transport protocol.
+uses the TCP protocol.
 Refer to the TRANSPORT METHODS section for more details.
 .TP 1.5i
 .BI port= n
@@ -779,7 +800,8 @@ The DATA AND METADATA COHERENCE section discusses
 the behavior of this option in more detail.
 .TP 1.5i
 .BI clientaddr= n.n.n.n
-Specifies  a  single  IPv4  address  (in dotted-quad form)
+Specifies a single IPv4 address (in dotted-quad form),
+or a non-link-local IPv6 address,
 that the NFS client advertises to allow servers
 to perform NFS version 4 callback requests against
 files on this mount point. If  the  server is unable to
@@ -794,6 +816,20 @@ In the presence of multiple client network interfaces,
 special routing policies,
 or atypical network topologies,
 the exact address to use for callbacks may be nontrivial to determine.
+.SH nfs4 FILE SYSTEM TYPE
+The
+.BR nfs4
+file system type is an old syntax for specifying NFSv4 usage. It can still 
+be used with all NFSv4-specific and common options, excepted the
+.B nfsvers
+mount option.
+.SH MOUNT CONFIGURATION FILE
+If the mount command is configured to do so, all of the mount options 
+described in the previous section can also be configured in the 
+.I /etc/nfsmount.conf 
+file. See 
+.BR nfsmount.conf(5)
+for details.
 .SH EXAMPLES
 To mount an export using NFS version 2,
 use the
@@ -808,12 +844,11 @@ file system type and specify the
 .B nfsvers=3
 mount option.
 To mount using NFS version 4,
-use the
-.B nfs4
-file system type.
-The
-.B nfsvers
-mount option is not supported for the
+use either the
+.B nfs
+file system type, with the
+.B nfsvers=4
+mount option, or the 
 .B nfs4
 file system type.
 .P
@@ -848,6 +883,14 @@ This example can be used to mount /usr over NFS.
 .TA 2.5i +0.7i +0.7i +.7i
        server:/export  /usr    nfs     ro,nolock,nocto,actimeo=3600    0 0
 .FI
+.P
+This example shows how to mount an NFS server
+using a raw IPv6 link-local address.
+.P
+.NF
+.TA 2.5i +0.7i +0.7i +.7i
+       [fe80::215:c5ff:fb3e:e2b1%eth0]:/export /mnt    nfs     defaults        0 0
+.FI
 .SH "TRANSPORT METHODS"
 NFS clients send requests to NFS servers via
 Remote Procedure Calls, or
@@ -1491,6 +1534,8 @@ such as security negotiation, server referrals, and named attributes.
 .BR mount.nfs (5),
 .BR umount.nfs (5),
 .BR exports (5),
+.BR netconfig (5),
+.BR ipv6 (7),
 .BR nfsd (8),
 .BR sm-notify (8),
 .BR rpc.statd (8),