walters / rpms / nfs-utils

Forked from rpms/nfs-utils 6 years ago
Clone
cf6d5cf
commit ca43d9d8c7bdbd067fb1fb4fa9d6e055f4d34ce5
cf6d5cf
Author: Steve Dickson <steved@redhat.com>
cf6d5cf
Date:   Fri Jan 4 09:27:35 2008 -0500
cf6d5cf
cf6d5cf
    Incorporated Chuck Lever's and Don Domingo's changes to the
cf6d5cf
    nfs(5) manual page.
c0c131b
cf6d5cf
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
cf6d5cf
    Signed-off-by: Don Domingo <ddomingo@redhat.com>
cf6d5cf
    Signed-off-by: Steve Dickson <steved@redhat.com>
cf6d5cf
c0c131b
diff -up nfs-utils-1.1.1/utils/mount/nfs.man.save nfs-utils-1.1.1/utils/mount/nfs.man
c0c131b
--- nfs-utils-1.1.1/utils/mount/nfs.man.save	2007-10-18 23:07:28.000000000 -0400
c0c131b
+++ nfs-utils-1.1.1/utils/mount/nfs.man	2008-01-05 08:34:22.000000000 -0500
c0c131b
@@ -1,510 +1,1233 @@
cf6d5cf
-.\" nfs.5 "Rick Sladkey" <jrs@world.std.com>
cf6d5cf
-.\" Wed Feb  8 12:52:42 1995, faith@cs.unc.edu: updates for Ross Biro's
cf6d5cf
-.\" patches. "
cf6d5cf
-.TH NFS 5 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual"
cf6d5cf
+.\"@(#)nfs.5"
cf6d5cf
+.TH NFS 5 "2 November 2007"
cf6d5cf
 .SH NAME
cf6d5cf
-nfs \- nfs and nfs4 fstab format and options
cf6d5cf
+nfs \- fstab format and options for the
cf6d5cf
+.B nfs
cf6d5cf
+and
cf6d5cf
+.B nfs4
cf6d5cf
+file systems
cf6d5cf
 .SH SYNOPSIS
cf6d5cf
-.B /etc/fstab
cf6d5cf
+.I /etc/fstab
cf6d5cf
 .SH DESCRIPTION
cf6d5cf
-The
cf6d5cf
-.I fstab
cf6d5cf
-file contains information about which filesystems
cf6d5cf
-to mount where and with what options.
cf6d5cf
-For NFS mounts, it contains the server name and
cf6d5cf
-exported server directory to mount from,
cf6d5cf
-the local directory that is the mount point,
cf6d5cf
-and the NFS specific options that control
cf6d5cf
-the way the filesystem is mounted.
cf6d5cf
+NFS is an Internet Standard protocol
cf6d5cf
+created by Sun Microsystems in 1984. NFS was developed
cf6d5cf
+to allow file sharing between systems residing
cf6d5cf
+on a local area network.
cf6d5cf
+The Linux NFS client supports three versions
cf6d5cf
+of the NFS protocol:
cf6d5cf
+NFS version 2 [RFC1094],
cf6d5cf
+NFS version 3 [RFC1813],
cf6d5cf
+and NFS version 4 [RFC3530].
cf6d5cf
 .P
cf6d5cf
-Three different versions of the NFS protocol are
cf6d5cf
-supported by the Linux NFS client:
cf6d5cf
-NFS version 2, NFS version 3, and NFS version 4.
cf6d5cf
-To mount via NFS version 2, use the
cf6d5cf
-.BR nfs
cf6d5cf
-file system type and specify
cf6d5cf
-.BR nfsvers=2 .
cf6d5cf
-To mount via NFS version 3, use the
cf6d5cf
-.BR nfs
cf6d5cf
-file system type and specify
cf6d5cf
-.BR nfsvers=3 .
cf6d5cf
-Version 3 is the default protocol version for the
cf6d5cf
-.BR nfs
cf6d5cf
-file system type when
cf6d5cf
-.BR nfsvers=
cf6d5cf
-is not specified on the mount command and both client and server
cf6d5cf
-support it.
cf6d5cf
-To mount via NFS version 4, use the
cf6d5cf
-.BR nfs4
cf6d5cf
-file system type.
cf6d5cf
 The
cf6d5cf
-.BR nfsvers=
cf6d5cf
-keyword is not supported for the
cf6d5cf
-.BR nfs4
cf6d5cf
-file system type.
cf6d5cf
+.BR mount (8)
cf6d5cf
+command attaches a file system to the system's
cf6d5cf
+name space hierarchy at a given mount point.
cf6d5cf
+The
cf6d5cf
+.I /etc/fstab
cf6d5cf
+file describes how
cf6d5cf
+.BR mount (8)
cf6d5cf
+should assemble a system's file name hierarchy
cf6d5cf
+from various independent file systems 
cf6d5cf
+(including file systems exported by NFS servers).
cf6d5cf
+Each line in the
cf6d5cf
+.I /etc/fstab
cf6d5cf
+file describes a single file system, its mount point,
cf6d5cf
+and a set of default mount options for that mount point.
cf6d5cf
 .P
cf6d5cf
-These file system types share similar mount options;
cf6d5cf
-the differences are listed below.
cf6d5cf
+For NFS file system mounts, a line in the
cf6d5cf
+.I /etc/fstab
cf6d5cf
+file specifies the server name,
cf6d5cf
+the path name of the exported server directory to mount,
cf6d5cf
+the local directory that is the mount point,
cf6d5cf
+the type of file system that is being mounted,
cf6d5cf
+and a list of mount options that control
cf6d5cf
+the way the filesystem is mounted and
cf6d5cf
+how the NFS client behaves when accessing
cf6d5cf
+files on this mount point.
cf6d5cf
+The fifth and sixth fields on each line are not used
cf6d5cf
+by NFS, thus conventionally each contain the digit zero. For example:
cf6d5cf
 .P
cf6d5cf
-Here is an example from an \fI/etc/fstab\fP file for an NFSv3 mount
cf6d5cf
-over TCP.
cf6d5cf
-.sp
cf6d5cf
-.nf
cf6d5cf
-.ta 2.5i +0.75i +0.75i +1.0i
cf6d5cf
-server:/usr/local/pub	/pub	nfs	rsize=32768,wsize=32768,timeo=14,intr
cf6d5cf
-.fi
cf6d5cf
+.SP
cf6d5cf
+.NF
cf6d5cf
+.TA 2.5i +0.75i +0.75i +1.0i
cf6d5cf
+	server:path	/mountpoint	fstype	option,option,...	0 0
cf6d5cf
+.FI
cf6d5cf
 .P
cf6d5cf
-Here is an example for an NFSv4 mount over TCP using Kerberos
cf6d5cf
-5 mutual authentication.
cf6d5cf
-.sp
cf6d5cf
-.nf
cf6d5cf
-.ta 2.5i +0.75i +0.75i +1.0i
cf6d5cf
-server:/usr/local/pub	/pub	nfs4	proto=tcp,sec=krb5,hard,intr
cf6d5cf
-.fi
cf6d5cf
+The server's hostname and export pathname
cf6d5cf
+are separated by a colon, while
cf6d5cf
+the mount options are separated by commas. The remaining fields 
cf6d5cf
+are separated by blanks or tabs.
cf6d5cf
+The server's hostname can be an unqualified hostname,
cf6d5cf
+a fully qualified domain name,
cf6d5cf
+or a dotted quad IPv4 address.
cf6d5cf
+The
cf6d5cf
+.I fstype
cf6d5cf
+field contains either "nfs" (for version 2 or version 3 NFS mounts)
cf6d5cf
+or "nfs4" (for NFS version 4 mounts).
cf6d5cf
+The
cf6d5cf
+.B nfs
cf6d5cf
+and
cf6d5cf
+.B nfs4
cf6d5cf
+file system types share similar mount options,
cf6d5cf
+which are described below. 
cf6d5cf
+.SH "MOUNT OPTIONS"
cf6d5cf
+Refer to 
cf6d5cf
+.BR mount (8)
cf6d5cf
+for a description of generic mount options
cf6d5cf
+available for all file systems. If you do not need to 
cf6d5cf
+specify any mount options, use the generic option 
cf6d5cf
+.B defaults
cf6d5cf
+in
cf6d5cf
+.IR /etc/fstab .
cf6d5cf
+. 
cf6d5cf
 .DT
cf6d5cf
-.SS Options for the nfs file system type
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I rsize=n
cf6d5cf
-The number of bytes NFS uses when reading files from an NFS server.
cf6d5cf
-The rsize is negotiated between the server and client to determine 
cf6d5cf
-the largest block size that both can support.
cf6d5cf
-The value specified by this option is the maximum size that could 
cf6d5cf
-be used; however, the actual size used may be smaller.
cf6d5cf
-Note: Setting this size to a value less than the largest supported
cf6d5cf
-block size will adversely affect performance.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I wsize=n
cf6d5cf
-The number of bytes NFS uses when writing files to an NFS server.
cf6d5cf
-The wsize is negotiated between the server and client to determine 
cf6d5cf
-the largest block size that both can support.
cf6d5cf
-The value specified by this option is the maximum size that could 
cf6d5cf
-be used; however, the actual size used may be smaller.
cf6d5cf
-Note: Setting this size to a value less than the largest supported
cf6d5cf
-block size will adversely affect performance.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I timeo=n
cf6d5cf
-The value in tenths of a second before sending the
cf6d5cf
-first retransmission after an RPC timeout.
cf6d5cf
-The default value is 7 tenths of a second.  After the first timeout,
cf6d5cf
-the timeout is doubled after each successive timeout until a maximum
cf6d5cf
-timeout of 60 seconds is reached or the enough retransmissions
cf6d5cf
-have occured to cause a major timeout.  Then, if the filesystem
cf6d5cf
-is hard mounted, each new timeout cascade restarts at twice the
cf6d5cf
-initial value of the previous cascade, again doubling at each
cf6d5cf
-retransmission.  The maximum timeout is always 60 seconds.
cf6d5cf
-Better overall performance may be achieved by increasing the
cf6d5cf
-timeout when mounting on a busy network, to a slow server, or through
cf6d5cf
-several routers or gateways.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I retrans=n
cf6d5cf
-The number of minor timeouts and retransmissions that must occur before
cf6d5cf
-a major timeout occurs.  The default is 3 timeouts.  When a major timeout
cf6d5cf
-occurs, the file operation is either aborted or a "server not responding"
cf6d5cf
-message is printed on the console.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acregmin=n
cf6d5cf
-The minimum time in seconds that attributes of a regular file should
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 3 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acregmax=n
cf6d5cf
-The maximum time in seconds that attributes of a regular file can
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 60 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acdirmin=n
cf6d5cf
-The minimum time in seconds that attributes of a directory should
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 30 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acdirmax=n
cf6d5cf
-The maximum time in seconds that attributes of a directory can
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 60 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I actimeo=n
cf6d5cf
-Using actimeo sets all of
cf6d5cf
-.I acregmin,
cf6d5cf
-.I acregmax,
cf6d5cf
-.I acdirmin,
cf6d5cf
+.SS "Valid options for either the nfs or nfs4 file system type"
cf6d5cf
+These options are valid to use when mounting either
cf6d5cf
+.B nfs
cf6d5cf
+or
cf6d5cf
+.B nfs4
cf6d5cf
+file system types.
cf6d5cf
+They imply the same behavior
cf6d5cf
+and have the same default for both file system types.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR soft " / " hard
cf6d5cf
+Determines the recovery behavior of the NFS client
cf6d5cf
+after an NFS request times out.
cf6d5cf
+If neither option is specified (or if the
cf6d5cf
+.B hard
cf6d5cf
+option is specified), NFS requests are retried indefinitely.
cf6d5cf
+If the
cf6d5cf
+.B soft
cf6d5cf
+option is specified, then the NFS client fails an NFS request
cf6d5cf
+after 
cf6d5cf
+.B retrans
cf6d5cf
+retransmissions have been sent,
cf6d5cf
+causing the NFS client to return an error
cf6d5cf
+to the calling application.
cf6d5cf
+.IP
cf6d5cf
+.I NB:
cf6d5cf
+A so-called "soft" timeout can cause
cf6d5cf
+silent data corruption in certain cases. As such, use the
cf6d5cf
+.B soft
cf6d5cf
+option only when client responsiveness
cf6d5cf
+is more important than data integrity.
cf6d5cf
+Using NFS over TCP or increasing the value of the
cf6d5cf
+.B retrans
cf6d5cf
+option may mitigate some of the risks of using the
cf6d5cf
+.B soft
cf6d5cf
+option.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI timeo= n
cf6d5cf
+The time (in tenths of a second) the NFS client waits for a 
cf6d5cf
+response before it retries an NFS request. If this 
cf6d5cf
+option is not specified, requests are retried after 
cf6d5cf
+60 seconds for NFS over TCP, and are retried after 7/10 of a second for
cf6d5cf
+NFS over UDP.
cf6d5cf
+.IP
cf6d5cf
+For NFS over TCP, the client uses a fixed timeout, as specified by the
cf6d5cf
+.B timeo
cf6d5cf
+option. However, for NFS over UDP, the client uses an adaptive
cf6d5cf
+algorithm to estimate an appropriate timeout value for frequently used
cf6d5cf
+request types (such as READ and WRITE requests), but uses the 
cf6d5cf
+.B timeo
cf6d5cf
+setting for infrequently used request types (such as FSINFO requests).
cf6d5cf
+After each retransmission, the NFS client doubles the timeout for that
cf6d5cf
+request, up to a maximum timeout length of 60 seconds.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI retrans= n
cf6d5cf
+The number of times the NFS client retries a request before
cf6d5cf
+it attempts further recovery action. If the 
cf6d5cf
+.B retrans
cf6d5cf
+option is not specified, the NFS client retries each request 
cf6d5cf
+three times.
cf6d5cf
+.IP
cf6d5cf
+The NFS client generates a "server not responding" message
cf6d5cf
+after 
cf6d5cf
+.B retrans
cf6d5cf
+retries, then attempts further recovery (depending on whether the
cf6d5cf
+.B hard
cf6d5cf
+mount option is in effect).
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI rsize= n
cf6d5cf
+The maximum number of bytes in each network READ request
cf6d5cf
+that the NFS client can receive when reading data from a file
cf6d5cf
+on an NFS server.
cf6d5cf
+The actual data payload size of each NFS READ request is equal to
cf6d5cf
+or smaller than the
cf6d5cf
+.B rsize
cf6d5cf
+setting. The largest read payload supported by the Linux NFS client
cf6d5cf
+is 1,048,576 bytes (one megabyte).
cf6d5cf
+.IP
cf6d5cf
+The
cf6d5cf
+.B rsize
cf6d5cf
+value is a positive integral multiple of 1024.
cf6d5cf
+Specified 
cf6d5cf
+.B rsize
cf6d5cf
+values lower than 1024 are replaced with 4096; values larger than
cf6d5cf
+1048576 are replaced with 1048576. If a specified value is within the supported
cf6d5cf
+range but not a multiple of 1024, it is rounded down to the nearest 
cf6d5cf
+multiple of 1024.
cf6d5cf
+.IP
cf6d5cf
+If an
cf6d5cf
+.B rsize
cf6d5cf
+value is not specified, or if the specified 
cf6d5cf
+.B rsize 
cf6d5cf
+value is larger than the maximum that either client or server can support,
cf6d5cf
+the client and server negotiate the largest
cf6d5cf
+.B rsize
cf6d5cf
+value that they can both support. 
cf6d5cf
+.IP
cf6d5cf
+The
cf6d5cf
+.B rsize
cf6d5cf
+mount option as specified on the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command line appears in the
cf6d5cf
+.I /etc/mtab
cf6d5cf
+file. However, the effective
cf6d5cf
+.B rsize
cf6d5cf
+value negotiated by the client and server is reported in the
cf6d5cf
+.I /proc/mounts
cf6d5cf
+file.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI wsize= n
cf6d5cf
+The maximum number of bytes per network WRITE request
cf6d5cf
+that the NFS client can send when writing data to a file
cf6d5cf
+on an NFS server. The actual data payload size of each 
cf6d5cf
+NFS WRITE request is equal to
cf6d5cf
+or smaller than the
cf6d5cf
+.B wsize
cf6d5cf
+setting. The largest write payload supported by the Linux NFS client
cf6d5cf
+is 1,048,576 bytes (one megabyte).
cf6d5cf
+.IP
cf6d5cf
+Similar to
cf6d5cf
+.B rsize
cf6d5cf
+, the
cf6d5cf
+.B wsize 
cf6d5cf
+value is a positive integral multiple of 1024.
cf6d5cf
+Specified 
cf6d5cf
+.B wsize
cf6d5cf
+values lower than 1024 are replaced with 4096; values larger than
cf6d5cf
+1048576 are replaced with 1048576. If a specified value is within the supported
cf6d5cf
+range but not a multiple of 1024, it is rounded down to the nearest 
cf6d5cf
+multiple of 1024.
cf6d5cf
+.IP
cf6d5cf
+If a
cf6d5cf
+.B wsize
cf6d5cf
+value is not specified, or if the specified 
cf6d5cf
+.B wsize 
cf6d5cf
+value is larger than the maximum that either client or server can support,
cf6d5cf
+the client and server negotiate the largest
cf6d5cf
+.B wsize
cf6d5cf
+value that they can both support.
cf6d5cf
+.IP
cf6d5cf
+The
cf6d5cf
+.B wsize
cf6d5cf
+mount option as specified on the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command line appears in the
cf6d5cf
+.I /etc/mtab
cf6d5cf
+file. However, the effective
cf6d5cf
+.B wsize
cf6d5cf
+value negotiated by the client and server is reported in the
cf6d5cf
+.I /proc/mounts
cf6d5cf
+file. 
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR ac " / " noac
cf6d5cf
+Selects whether the client may cache file attributes. If neither  
cf6d5cf
+option is specified (or if 
cf6d5cf
+.B ac
cf6d5cf
+is specified), the client caches file  
cf6d5cf
+attributes.  
cf6d5cf
+.IP
cf6d5cf
+To improve performance, NFS clients cache file  
cf6d5cf
+attributes. Every few seconds, an NFS client checks the server's version of each  
cf6d5cf
+file's attributes for updates.  Changes that occur on the server in  
cf6d5cf
+those small intervals remain undetected until the client checks the  
cf6d5cf
+server again. The 
cf6d5cf
+.B noac
cf6d5cf
+option prevents clients from caching file  
cf6d5cf
+attributes so that applications can more quickly detect file changes  
cf6d5cf
+on the server.
cf6d5cf
+.IP
cf6d5cf
+In addition to preventing the client from caching file attributes,  
cf6d5cf
+the 
cf6d5cf
+.B noac
cf6d5cf
+option forces application writes to become synchronous so  
cf6d5cf
+that local changes to a file become visible on the server  
cf6d5cf
+immediately.  That way, other clients can quickly detect recent  
cf6d5cf
+writes when they check the file's attributes.
cf6d5cf
+.IP
cf6d5cf
+Using the
cf6d5cf
+.B noac
cf6d5cf
+option provides greater cache coherence among NFS clients
cf6d5cf
+accessing the same files,
cf6d5cf
+but it extracts a significant performance penalty.
cf6d5cf
+As such, judicious use of file locking is encouraged instead.
cf6d5cf
+The DATA AND METADATA COHERENCE section contains a detailed discussion
cf6d5cf
+of these trade-offs.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI acregmin= n
cf6d5cf
+The minimum time (in seconds) that the NFS client caches
cf6d5cf
+attributes of a regular file before it requests
cf6d5cf
+fresh attribute information from a server.
cf6d5cf
+If this option is not specified, the NFS client uses
cf6d5cf
+a 3-second minimum.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI acregmax= n
cf6d5cf
+The maximum time (in seconds) that the NFS client caches
cf6d5cf
+attributes of a regular file before it requests
cf6d5cf
+fresh attribute information from a server.
cf6d5cf
+If this option is not specified, the NFS client uses
cf6d5cf
+a 60-second maximum.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI acdirmin= n
cf6d5cf
+The minimum time (in seconds) that the NFS client caches
cf6d5cf
+attributes of a directory before it requests
cf6d5cf
+fresh attribute information from a server.
cf6d5cf
+If this option is not specified, the NFS client uses
cf6d5cf
+a 30-second minimum.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI acdirmax= n
cf6d5cf
+The maximum time (in seconds) that the NFS client caches
cf6d5cf
+attributes of a directory before it requests
cf6d5cf
+fresh attribute information from a server.
cf6d5cf
+If this option is not specified, the NFS client uses
cf6d5cf
+a 60-second maximum.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI actimeo= n
cf6d5cf
+Using
cf6d5cf
+.B actimeo
cf6d5cf
+sets all of
cf6d5cf
+.BR acregmin ,
cf6d5cf
+.BR acregmax ,
cf6d5cf
+.BR acdirmin ,
cf6d5cf
 and
cf6d5cf
-.I acdirmax
cf6d5cf
+.B acdirmax
cf6d5cf
 to the same value.
cf6d5cf
-There is no default value.
cf6d5cf
+If this option is not specified, the NFS client uses
cf6d5cf
+the defaults for each of these options listed above.
cf6d5cf
 .TP 1.5i
cf6d5cf
-.I retry=n
cf6d5cf
-The number of minutes to retry an NFS mount operation
cf6d5cf
+.BR bg " / " fg
cf6d5cf
+Determines how the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command behaves if an attempt to mount an export fails.
cf6d5cf
+The
cf6d5cf
+.B fg
cf6d5cf
+option causes
cf6d5cf
+.BR mount (8)
cf6d5cf
+to exit with an error status if any part of the mount request
cf6d5cf
+times out or fails outright.
cf6d5cf
+This is called a "foreground" mount,
cf6d5cf
+and is the default behavior if neither the
cf6d5cf
+.B fg
cf6d5cf
+nor
cf6d5cf
+.B bg
cf6d5cf
+mount option is specified.
cf6d5cf
+.IP
cf6d5cf
+If the
cf6d5cf
+.B bg
cf6d5cf
+option is specified, a timeout or failure causes the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command to fork a child which continues to attempt
cf6d5cf
+to mount the export.
cf6d5cf
+The parent immediately returns with a zero exit code.
cf6d5cf
+This is known as a "background" mount.
cf6d5cf
+.IP
cf6d5cf
+If the local mount point directory is missing, the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command acts as if the mount request timed out.
cf6d5cf
+This permits nested NFS mounts specified in
cf6d5cf
+.I /etc/fstab
cf6d5cf
+to proceed in any order during system initialization,
cf6d5cf
+even if some NFS servers are not yet available.
cf6d5cf
+Alternatively these issues can be addressed
cf6d5cf
+using an automounter (refer to
cf6d5cf
+.BR automount (8)
cf6d5cf
+for details).
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI retry= n
cf6d5cf
+The number of minutes that the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command retries an NFS mount operation
cf6d5cf
 in the foreground or background before giving up.
cf6d5cf
-The default value for forground mounts is 2 minutes.  
cf6d5cf
-The default value for background mounts is 10000 minutes, 
cf6d5cf
-which is roughly one week.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I namlen=n
cf6d5cf
-When an NFS server does not support version two of the
cf6d5cf
-RPC mount protocol, this option can be used to specify
cf6d5cf
-the maximum length of a filename that is supported on
cf6d5cf
-the remote filesystem.  This is used to support the
cf6d5cf
-POSIX pathconf functions.  The default is 255 characters.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I port=n
cf6d5cf
-The numeric value of the port to connect to the NFS server on.
cf6d5cf
-If the port number is 0 (the default) then query the
cf6d5cf
-remote host's portmapper for the port number to use.
cf6d5cf
-If the remote host's NFS daemon is not registered with
cf6d5cf
-its portmapper, the standard NFS port number 2049 is
cf6d5cf
-used instead.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I mountport=n
cf6d5cf
-The numeric value of the
cf6d5cf
-.B mountd
cf6d5cf
-port.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I mounthost=name
cf6d5cf
-The name of the host running
cf6d5cf
-.B mountd .
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I mountprog=n
cf6d5cf
-Use an alternate RPC program number to contact the
cf6d5cf
-mount daemon on the remote host.  This option is useful
cf6d5cf
-for hosts that can run multiple NFS servers.
cf6d5cf
-The default value is 100005 which is the standard RPC
cf6d5cf
-mount daemon program number.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I mountvers=n
cf6d5cf
-Use an alternate RPC version number to contact the
cf6d5cf
-mount daemon on the remote host.  This option is useful
cf6d5cf
-for hosts that can run multiple NFS servers.
cf6d5cf
-The default value depends on which kernel you are using.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I nfsprog=n
cf6d5cf
-Use an alternate RPC program number to contact the
cf6d5cf
-NFS daemon on the remote host.  This option is useful
cf6d5cf
-for hosts that can run multiple NFS servers.
cf6d5cf
-The default value is 100003 which is the standard RPC
cf6d5cf
-NFS daemon program number.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I nfsvers=n
cf6d5cf
-Use an alternate RPC version number to contact the
cf6d5cf
-NFS daemon on the remote host.  This option is useful
cf6d5cf
-for hosts that can run multiple NFS servers.
cf6d5cf
-The default value depends on which kernel you are using.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I vers=n
cf6d5cf
-vers is an alternative to nfsvers and is compatible with
cf6d5cf
-many other operating systems.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I nolock
cf6d5cf
-Disable NFS locking. Do not start lockd.
cf6d5cf
-This is appropriate for mounting the root filesystem or
cf6d5cf
-.B /usr
cf6d5cf
-or
cf6d5cf
-.BR /var .
cf6d5cf
-These filesystems are typically either read-only or not shared, and in
cf6d5cf
-those cases, remote locking is not needed.
cf6d5cf
-This also needs to be used with some old NFS servers
cf6d5cf
-that don't support locking.
cf6d5cf
-.br
cf6d5cf
-Note that applications can still get locks on files, but the locks
cf6d5cf
-only provide exclusion locally.  Other clients mounting the same
cf6d5cf
-filesystem will not be able to detect the locks.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I bg
cf6d5cf
-If the first NFS mount attempt times out, retry the mount
cf6d5cf
-in the background.
cf6d5cf
-After a mount operation is backgrounded, all subsequent mounts
cf6d5cf
-on the same NFS server will be backgrounded immediately, without
cf6d5cf
-first attempting the mount.
cf6d5cf
-A missing mount point is treated as a timeout,
cf6d5cf
-to allow for nested NFS mounts.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I fg
cf6d5cf
-If the first NFS mount attempt times out, retry the mount
cf6d5cf
-in the foreground.
cf6d5cf
-This is the complement of the
cf6d5cf
-.I bg
cf6d5cf
-option, and also the default behavior.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I soft
cf6d5cf
-If an NFS file operation has a major timeout then report an I/O error to
cf6d5cf
-the calling program.
cf6d5cf
-The default is to continue retrying NFS file operations indefinitely.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I hard
cf6d5cf
-If an NFS file operation has a major timeout then report
cf6d5cf
-"server not responding" on the console and continue retrying indefinitely.
cf6d5cf
-This is the default.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I intr
cf6d5cf
-If an NFS file operation has a major timeout and it is hard mounted,
cf6d5cf
-then allow signals to interupt the file operation and cause it to
cf6d5cf
-return EINTR to the calling program.  The default is to not
cf6d5cf
-allow file operations to be interrupted.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I posix
cf6d5cf
-Mount the NFS filesystem using POSIX semantics.  This allows
cf6d5cf
-an NFS filesystem to properly support the POSIX pathconf
cf6d5cf
-command by querying the mount server for the maximum length
cf6d5cf
-of a filename.  To do this, the remote host must support version
cf6d5cf
-two of the RPC mount protocol.  Many NFS servers support only
cf6d5cf
-version one.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I nocto
cf6d5cf
-Suppress the retrieval of new attributes when creating a file.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I noac
cf6d5cf
-Disable all forms of attribute caching entirely.  This extracts a
cf6d5cf
-significant performance penalty but it allows two different NFS clients
cf6d5cf
-to get reasonable results when both clients are actively
cf6d5cf
-writing to a common export on the server.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I noacl
cf6d5cf
-Disables Access Control List (ACL) processing.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I sec=mode
cf6d5cf
-Set the security flavor for this mount to "mode".
cf6d5cf
-The default setting is \f3sec=sys\f1, which uses local
cf6d5cf
-unix uids and gids to authenticate NFS operations (AUTH_SYS).
cf6d5cf
-Other currently supported settings are:
cf6d5cf
-\f3sec=krb5\f1, which uses Kerberos V5 instead of local unix uids
cf6d5cf
-and gids to authenticate users;
cf6d5cf
-\f3sec=krb5i\f1, which uses Kerberos V5 for user authentication
cf6d5cf
-and performs integrity checking of NFS operations using secure
cf6d5cf
-checksums to prevent data tampering; and
cf6d5cf
-\f3sec=krb5p\f1, which uses Kerberos V5 for user authentication
cf6d5cf
-and integrity checking, and encrypts NFS traffic to prevent
cf6d5cf
-traffic sniffing (this is the most secure setting).
cf6d5cf
-Note that there is a performance penalty when using integrity
cf6d5cf
-or privacy.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I tcp
cf6d5cf
-Mount the NFS filesystem using the TCP protocol.  This is the default
cf6d5cf
-if it is supported by both client and server.  Many NFS servers only
cf6d5cf
-support UDP.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I udp
cf6d5cf
-Mount the NFS filesystem using the UDP protocol.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I nordirplus
cf6d5cf
-Disables NFSv3 READDIRPLUS RPCs. Use this option when
cf6d5cf
-mounting servers that don't support or have broken
cf6d5cf
-READDIRPLUS implementations.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I nosharecache
cf6d5cf
-As of kernel 2.6.18, it is no longer possible to mount the same
cf6d5cf
-same filesystem with different mount options to a new mountpoint.
cf6d5cf
-It was deemed unsafe to do so, since cached data cannot be shared
cf6d5cf
-between the two mountpoints. In consequence, files or directories
cf6d5cf
-that were common to both mountpoint subtrees could often be seen to
cf6d5cf
-be out of sync following an update.
cf6d5cf
-.br
cf6d5cf
-This option allows administrators to select the pre-2.6.18 behaviour,
cf6d5cf
-permitting the same filesystem to be mounted with different mount
cf6d5cf
-options.
cf6d5cf
-.br
cf6d5cf
-.B Beware:
cf6d5cf
-Use of this option is not recommended unless you are certain that there
cf6d5cf
-are no hard links or subtrees of this mountpoint that are mounted
cf6d5cf
-elsewhere.
cf6d5cf
-.P
cf6d5cf
-All of the non-value options have corresponding nooption forms.
cf6d5cf
-For example, nointr means don't allow file operations to be
cf6d5cf
-interrupted.
cf6d5cf
-.SS Options for the nfs4 file system type
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I rsize=n
cf6d5cf
-The number of bytes nfs4 uses when reading files from the server.
cf6d5cf
-The rsize is negotiated between the server and client to determine 
cf6d5cf
-the largest block size that both can support.
cf6d5cf
-The value specified by this option is the maximum size that could 
cf6d5cf
-be used; however, the actual size used may be smaller.
cf6d5cf
-Note: Setting this size to a value less than the largest supported
cf6d5cf
-block size will adversely affect performance.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I wsize=n
cf6d5cf
-The number of bytes nfs4 uses when writing files to the server.
cf6d5cf
-The wsize is negotiated between the server and client to determine 
cf6d5cf
-the largest block size that both can support.
cf6d5cf
-The value specified by this option is the maximum size that could 
cf6d5cf
-be used; however, the actual size used may be smaller.
cf6d5cf
-Note: Setting this size to a value less than the largest supported
cf6d5cf
-block size will adversely affect performance.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I timeo=n
cf6d5cf
-The value in tenths of a second before sending the
cf6d5cf
-first retransmission after an RPC timeout.
cf6d5cf
-The default value depends on whether
cf6d5cf
-.IR proto=udp
cf6d5cf
-or
cf6d5cf
-.IR proto=tcp
cf6d5cf
-is in effect (see below).
cf6d5cf
-The default value for UDP is 7 tenths of a second.
cf6d5cf
-The default value for TCP is 60 seconds.
cf6d5cf
-After the first timeout,
cf6d5cf
-the timeout is doubled after each successive timeout until a maximum
cf6d5cf
-timeout of 60 seconds is reached or the enough retransmissions
cf6d5cf
-have occured to cause a major timeout.  Then, if the filesystem
cf6d5cf
-is hard mounted, each new timeout cascade restarts at twice the
cf6d5cf
-initial value of the previous cascade, again doubling at each
cf6d5cf
-retransmission.  The maximum timeout is always 60 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I retrans=n
cf6d5cf
-The number of minor timeouts and retransmissions that must occur before
cf6d5cf
-a major timeout occurs.  The default is 5 timeouts for
cf6d5cf
-.IR proto=udp
cf6d5cf
-and 2 timeouts for
cf6d5cf
-.IR proto=tcp .
cf6d5cf
-When a major timeout
cf6d5cf
-occurs, the file operation is either aborted or a "server not responding"
cf6d5cf
-message is printed on the console.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acregmin=n
cf6d5cf
-The minimum time in seconds that attributes of a regular file should
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 3 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acregmax=n
cf6d5cf
-The maximum time in seconds that attributes of a regular file can
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 60 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acdirmin=n
cf6d5cf
-The minimum time in seconds that attributes of a directory should
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 30 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I acdirmax=n
cf6d5cf
-The maximum time in seconds that attributes of a directory can
cf6d5cf
-be cached before requesting fresh information from a server.
cf6d5cf
-The default is 60 seconds.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I actimeo=n
cf6d5cf
-Using actimeo sets all of
cf6d5cf
-.I acregmin,
cf6d5cf
-.I acregmax,
cf6d5cf
-.I acdirmin,
cf6d5cf
+If this option is not specified, the default value for foreground mounts
cf6d5cf
+is 2 minutes, and the default value for background mounts is 10000 minutes (80 minutes shy of one week).
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI sec= mode
cf6d5cf
+The RPCGSS security flavor to use for accessing files on this mount point.
cf6d5cf
+If the
cf6d5cf
+.B sec
cf6d5cf
+option is not specified, or if
cf6d5cf
+.B sec=sys
cf6d5cf
+is specified, the NFS client uses the AUTH_SYS security flavor
cf6d5cf
+for all NFS requests on this mount point.
cf6d5cf
+Valid security flavors are
cf6d5cf
+.BR none ,
cf6d5cf
+.BR sys ,
cf6d5cf
+.BR krb5 ,
cf6d5cf
+.BR krb5i ,
cf6d5cf
+.BR krb5p ,
cf6d5cf
+.BR lkey ,
cf6d5cf
+.BR lkeyi ,
cf6d5cf
+.BR lkeyp ,
cf6d5cf
+.BR spkm ,
cf6d5cf
+.BR spkmi ,
cf6d5cf
 and
cf6d5cf
-.I acdirmax
cf6d5cf
-to the same value.
cf6d5cf
-There is no default value.
cf6d5cf
+.BR spkmp .
cf6d5cf
+Refer to the SECURITY CONSIDERATIONS section for details.
cf6d5cf
 .TP 1.5i
cf6d5cf
-.I retry=n
cf6d5cf
-The number of minutes to retry an NFS mount operation
cf6d5cf
-in the foreground or background before giving up.
cf6d5cf
-The default value for forground mounts is 2 minutes.  
cf6d5cf
-The default value for background mounts is 10000 minutes, 
cf6d5cf
-which is roughly one week.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I port=n
cf6d5cf
-The numeric value of the port to connect to the NFS server on.
cf6d5cf
-If the port number is 0 (the default) then query the
cf6d5cf
-remote host's portmapper for the port number to use.
cf6d5cf
-If the remote host's NFS daemon is not registered with
cf6d5cf
-its portmapper, the standard NFS port number 2049 is
cf6d5cf
-used instead.
cf6d5cf
-.TP 1.5i
cf6d5cf
-.I proto=n
cf6d5cf
-Mount the NFS filesystem using a specific network protocol
cf6d5cf
-instead of the default UDP protocol.
cf6d5cf
-Many NFS version 4 servers only support TCP.
cf6d5cf
-Valid protocol types are
cf6d5cf
-.IR udp
cf6d5cf
+.BR sharecache " / " nosharecache
cf6d5cf
+Determines how the client's data cache and attribute cache are shared
cf6d5cf
+when mounting the same export more than once concurrently.  Using the  
cf6d5cf
+same cache reduces memory requirements on the client and presents  
cf6d5cf
+identical file contents to applications when the same remote file is  
cf6d5cf
+accessed via different mount points.
cf6d5cf
+.IP
cf6d5cf
+If neither option is specified, or if the 
cf6d5cf
+.B sharecache
cf6d5cf
+option is  
cf6d5cf
+specified, then a single cache is used for all mount points that  
cf6d5cf
+access the same export.  If the 
cf6d5cf
+.B nosharecache
cf6d5cf
+option is specified,  
cf6d5cf
+then that mount point gets a unique cache.  Note that when data and  
cf6d5cf
+attribute caches are shared, the mount options from the first mount  
cf6d5cf
+point take effect for subsequent concurrent mounts of the same export.
cf6d5cf
+.IP
cf6d5cf
+As of kernel 2.6.18, the behavior specified by
cf6d5cf
+.B nosharecache
cf6d5cf
+is legacy caching behavior. This
cf6d5cf
+is considered a data risk since multiple cached copies
cf6d5cf
+of the same file on the same client can become out of sync
cf6d5cf
+following a local update of one of the copies.
cf6d5cf
+.SS "Valid options for the nfs file system type"
cf6d5cf
+Use these options, along with the options in the above subsection,
cf6d5cf
+for mounting the
cf6d5cf
+.B nfs
cf6d5cf
+file system type.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI proto= netid
cf6d5cf
+The transport protocol used by the NFS client
cf6d5cf
+to transmit requests to the NFS server for this mount point.
cf6d5cf
+.I netid
cf6d5cf
+can be either
cf6d5cf
+.B udp
cf6d5cf
+or
cf6d5cf
+.BR tcp .
cf6d5cf
+Each transport protocol uses different default
cf6d5cf
+.B retrans
cf6d5cf
 and
cf6d5cf
-.IR tcp .
cf6d5cf
+.B timeo
cf6d5cf
+settings; refer to the description of these two mount options for details.
cf6d5cf
+.IP
cf6d5cf
+In addition to controlling how the NFS client transmits requests to
cf6d5cf
+the server, this mount option also controls how the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command communicates with the server's rpcbind and mountd services.
cf6d5cf
+Specifying 
cf6d5cf
+.B proto=tcp
cf6d5cf
+forces all traffic from the 
cf6d5cf
+.BR mount (8)
cf6d5cf
+command and the NFS client to use TCP.
cf6d5cf
+Specifying
cf6d5cf
+.B proto=udp
cf6d5cf
+forces all traffic types to use UDP.
cf6d5cf
+.IP
cf6d5cf
+If the
cf6d5cf
+.B proto
cf6d5cf
+mount option is not specified, the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command discovers which protocols the server supports
cf6d5cf
+and chooses an appropriate transport for each service.
cf6d5cf
+Refer to the TRANSPORT METHODS section for more details.
cf6d5cf
 .TP 1.5i
c0c131b
-.I clientaddr=n.n.n.n
c0c131b
-Specifies a single IPv4 address in dotted-quad form that
c0c131b
-the NFS client advertises to allow servers to perform
c0c131b
-NFSv4 callback requests against files on this mount point.
c0c131b
-If the server is not able to establish callback connections
c0c131b
-to clients, performance may degrade, or accesses to
c0c131b
-files may temporarily hang.
cf6d5cf
+.B udp
cf6d5cf
+The
cf6d5cf
+.B udp
cf6d5cf
+option is an alternative to specifying
cf6d5cf
+.BR proto=udp.
cf6d5cf
+It is included for compatibility with other operating systems.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.B tcp
cf6d5cf
+The
cf6d5cf
+.B tcp
cf6d5cf
+option is an alternative to specifying
cf6d5cf
+.BR proto=tcp.
cf6d5cf
+It is included for compatibility with other operating systems.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI port= n
cf6d5cf
+The numeric value of the server's NFS service port.
cf6d5cf
+If the server's NFS service is not available on the specified port,
cf6d5cf
+the mount request fails.
cf6d5cf
+.IP
cf6d5cf
+If this option is not specified, or if the specified port value is 0,
cf6d5cf
+then the NFS client uses the NFS service port number
cf6d5cf
+advertised by the server's rpcbind service.
cf6d5cf
+The mount request fails if the server's rpcbind service is not available,
cf6d5cf
+the server's NFS service is not registered with its rpcbind service,
cf6d5cf
+or the server's NFS service is not available on the advertised port.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI mountport= n
cf6d5cf
+The numeric value of the server's mountd port.
cf6d5cf
+If the server's mountd service is not available on the specified port,
cf6d5cf
+the mount request fails.
cf6d5cf
+.IP
cf6d5cf
+If this option is not specified,
cf6d5cf
+or if the specified port value is 0, then the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command uses the mountd service port number
cf6d5cf
+advertised by the server's rpcbind service.
cf6d5cf
+The mount request fails if the server's rpcbind service is not available,
cf6d5cf
+the server's mountd service is not registered with its rpcbind service,
cf6d5cf
+or the server's mountd service is not available on the advertised port.
c0c131b
 .IP
cf6d5cf
+This option can be used when mounting an NFS server
cf6d5cf
+through a firewall that blocks the rpcbind protocol.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI mounthost= name
cf6d5cf
+The hostname of the host running mountd.
c0c131b
 If this option is not specified, the
c0c131b
 .BR mount (8)
c0c131b
-command attempts to discover an appropriate callback
c0c131b
-address automatically.
cf6d5cf
+command assumes that the mountd service runs
cf6d5cf
+on the same host as the NFS service.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI mountvers= n
cf6d5cf
+The RPC version number used to contact the server's mountd.
cf6d5cf
+If this option is not specified, the client uses a version number
cf6d5cf
+appropriate to the requested NFS version.
cf6d5cf
+This option is useful when multiple NFS services
cf6d5cf
+are running on the same remote server host.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI namlen= n
cf6d5cf
+The maximum length of a pathname component on this mount.
cf6d5cf
+If this option is not specified, the maximum length is negotiated
cf6d5cf
+with the server. In most cases, this maximum length is 255 characters.
cf6d5cf
+.IP
cf6d5cf
+Some early versions of NFS did not support this negotiation.
cf6d5cf
+Using this option ensures that
cf6d5cf
+.BR pathconf (3)
cf6d5cf
+reports the proper maximum component length to applications
cf6d5cf
+in such cases.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI nfsvers= n
cf6d5cf
+The NFS protocol version number used to contact the server's NFS service.
cf6d5cf
+The Linux client supports version 2 and version 3 of the NFS protocol
cf6d5cf
+when using the file system type
cf6d5cf
+.BR nfs .
cf6d5cf
+If the server does not support the requested version,
cf6d5cf
+the mount request fails.
cf6d5cf
+If this option is not specified, the client attempts to use version 3,
cf6d5cf
+but negotiates the NFS version with the server if version 3 support
cf6d5cf
+is not available.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI vers= n
cf6d5cf
+This option is an alternative to the
cf6d5cf
+.B nfsvers
cf6d5cf
+option.
cf6d5cf
+It is included for compatibility with other operating systems.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR lock " / " nolock
cf6d5cf
+Selects whether to use the NLM sideband protocol to lock files on the server.
cf6d5cf
+If neither option is specified (or if 
cf6d5cf
+.B lock 
cf6d5cf
+is specified), NLM locking is used for this mount point. 
cf6d5cf
+When using the
cf6d5cf
+.B nolock
cf6d5cf
+option, applications can lock files,
cf6d5cf
+but such locks provide exclusion only against other applications
cf6d5cf
+running on the same client.
cf6d5cf
+Remote applications are not affected by these locks.
cf6d5cf
+.IP
cf6d5cf
+NLM locking must be disabled with the
cf6d5cf
+.B nolock
cf6d5cf
+option when using NFS to mount
cf6d5cf
+.I /var
cf6d5cf
+because
cf6d5cf
+.I /var
cf6d5cf
+contains files used by the NLM implementation on Linux.
cf6d5cf
+Using the
cf6d5cf
+.B nolock
cf6d5cf
+option is also required when mounting exports on NFS servers
cf6d5cf
+that do not support the NLM protocol.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR intr " / " nointr
cf6d5cf
+Selects whether to allow signals to interrupt file operations
cf6d5cf
+on this mount point. If neither option 
cf6d5cf
+is specified (or if 
cf6d5cf
+.B nointr
cf6d5cf
+is specified),
cf6d5cf
+signals do not interrupt NFS file operations. If
cf6d5cf
+.B intr 
cf6d5cf
+is specified, system calls return EINTR if an in-progress NFS operation is interrupted by 
cf6d5cf
+a signal.
cf6d5cf
+.IP
cf6d5cf
+Using the
cf6d5cf
+.B intr
cf6d5cf
+option is preferred to using the
cf6d5cf
+.B soft
cf6d5cf
+option because it is significantly less likely to result in data corruption.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR cto " / " nocto
cf6d5cf
+Selects whether to use close-to-open cache coherence semantics.
cf6d5cf
+If neither option is specified (or if 
cf6d5cf
+.B cto
cf6d5cf
+is specified), the client uses close-to-open
cf6d5cf
+cache coherence semantics. If the 
cf6d5cf
+.B nocto 
cf6d5cf
+option is specified, the client uses a non-standard heuristic to determine when
cf6d5cf
+files on the server have changed. 
cf6d5cf
+.IP
cf6d5cf
+Using the
cf6d5cf
+.B nocto
cf6d5cf
+option may improve performance for read-only mounts,
cf6d5cf
+but should be used only if the data on the server changes only occasionally.
cf6d5cf
+The DATA AND METADATA COHERENCE section discusses the behavior
cf6d5cf
+of this option in more detail.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR acl " / " noacl
cf6d5cf
+Selects whether to use the NFSACL sideband protocol on this mount point.
cf6d5cf
+The NFSACL sideband protocol is a proprietary protocol
cf6d5cf
+implemented in Solaris that manages Access Control Lists. NFSACL was never 
cf6d5cf
+made a standard part of the NFS protocol specification.
cf6d5cf
+.IP
cf6d5cf
+If neither 
cf6d5cf
+.B acl
cf6d5cf
+nor 
cf6d5cf
+.B noacl 
cf6d5cf
+option is specified,
cf6d5cf
+the NFS client negotiates with the server
cf6d5cf
+to see if the NFSACL protocol is supported,
cf6d5cf
+and uses it if the server supports it.
cf6d5cf
+Disabling the NFSACL sideband protocol may be necessary
cf6d5cf
+if the negotiation causes problems on the client or server.
cf6d5cf
+Refer to the SECURITY CONSIDERATIONS section for more details.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR rdirplus " / " nordirplus
cf6d5cf
+Selects whether to use NFS version 3 READDIRPLUS requests.
cf6d5cf
+If this option is not specified, the NFS client uses READDIRPLUS requests
cf6d5cf
+on NFS version 3 mounts to read small directories.
cf6d5cf
+Some applications perform better if the client uses only READDIR requests
cf6d5cf
+for all directories.  
cf6d5cf
+.SS "Valid options for the nfs4 file system type"
cf6d5cf
+Use these options, along with the options in the first subsection above,
cf6d5cf
+for mounting the
cf6d5cf
+.B nfs4
cf6d5cf
+file system type.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI proto= netid
cf6d5cf
+The transport protocol used by the NFS client
cf6d5cf
+to transmit requests to the NFS server for this mount point.
cf6d5cf
+.I netid
cf6d5cf
+can be either
cf6d5cf
+.B udp
cf6d5cf
+or
cf6d5cf
+.BR tcp .
cf6d5cf
+All NFS version 4 servers are required to support TCP,
cf6d5cf
+so if this mount option is not specified, the NFS version 4 client 
cf6d5cf
+uses the TCP transport protocol. 
cf6d5cf
+Refer to the TRANSPORT METHODS section for more details.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI port= n
cf6d5cf
+The numeric value of the server's NFS service port.
cf6d5cf
+If the server's NFS service is not available on the specified port,
cf6d5cf
+the mount request fails.
cf6d5cf
+.IP
cf6d5cf
+If this mount option is not specified,
cf6d5cf
+the NFS client uses the standard NFS port number of 2049
cf6d5cf
+without first checking the server's rpcbind service.
cf6d5cf
+This allows an NFS version 4 client to contact an NFS version 4
cf6d5cf
+server through a firewall that may block rpcbind requests.
cf6d5cf
+.IP
cf6d5cf
+If the specified port value is 0,
cf6d5cf
+then the NFS client uses the NFS service port number
cf6d5cf
+advertised by the server's rpcbind service.
cf6d5cf
+The mount request fails if the server's rpcbind service is not available,
cf6d5cf
+the server's NFS service is not registered with its rpcbind service,
cf6d5cf
+or the server's NFS service is not available on the advertised port.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR intr " / " nointr
cf6d5cf
+Selects whether to allow signals to interrupt file operations
cf6d5cf
+on this mount point. If neither option is specified (or if 
cf6d5cf
+.B intr 
cf6d5cf
+is specified), system calls return EINTR if an in-progress NFS operation  
cf6d5cf
+is interrupted by a signal.  If 
cf6d5cf
+.B nointr
cf6d5cf
+is specified, signals do not  
cf6d5cf
+interrupt NFS operations.
cf6d5cf
+.IP
cf6d5cf
+Using the
cf6d5cf
+.B intr
cf6d5cf
+option is preferred to using the
cf6d5cf
+.B soft
cf6d5cf
+option because it is significantly less likely to result in data corruption.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BR cto " / " nocto
cf6d5cf
+Selects whether to use close-to-open cache coherence semantics
cf6d5cf
+for NFS directories on this mount point.
cf6d5cf
+If neither
cf6d5cf
+.B cto
cf6d5cf
+nor
cf6d5cf
+.B nocto 
cf6d5cf
+is specified,
cf6d5cf
+the default is to use close-to-open cache coherence
cf6d5cf
+semantics for directories.
cf6d5cf
+.IP
cf6d5cf
+File data caching behavior is not affected by this option.
cf6d5cf
+The DATA AND METADATA COHERENCE section discusses
cf6d5cf
+the behavior of this option in more detail.
cf6d5cf
+.TP 1.5i
cf6d5cf
+.BI clientaddr= n.n.n.n
cf6d5cf
+Specifies  a  single  IPv4  address  (in dotted-quad form) 
cf6d5cf
+that the NFS client advertises to allow servers 
cf6d5cf
+to perform NFS version 4 callback requests against 
cf6d5cf
+files on this mount point. If  the  server is unable to 
cf6d5cf
+establish callback connections to clients, performance 
cf6d5cf
+may degrade, or accesses to files may temporarily hang.
cf6d5cf
+.IP
cf6d5cf
+If this option is not specified, the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command attempts to discover an appropriate callback address automatically.
c0c131b
 The automatic discovery process is not perfect, however.
c0c131b
-In the presence of multiple client network interfaces, special
c0c131b
-routing policies, or atypical network topologies, the exact
c0c131b
-address to use for callbacks may be nontrivial to determine,
c0c131b
-and should be explicitly set using this mount option.
c0c131b
-.TP 1.5i
c0c131b
-.I sec=mode
c0c131b
-Same as \f3sec=mode\f1 for the nfs filesystem type (see above).
c0c131b
-.TP 1.5i
c0c131b
-.I bg
c0c131b
-If an NFS mount attempt times out, retry the mount
c0c131b
-in the background.
c0c131b
-After a mount operation is backgrounded, all subsequent mounts
c0c131b
-on the same NFS server will be backgrounded immediately, without
c0c131b
-first attempting the mount.
c0c131b
-A missing mount point is treated as a timeout,
c0c131b
-to allow for nested NFS mounts.
c0c131b
-.TP 1.5i
c0c131b
-.I fg
c0c131b
-If the first NFS mount attempt times out, retry the mount
c0c131b
-in the foreground.
c0c131b
-This is the complement of the
c0c131b
-.I bg
c0c131b
-option, and also the default behavior.
c0c131b
-.TP 1.5i
c0c131b
-.I soft
c0c131b
-If an NFS file operation has a major timeout then report an I/O error to
c0c131b
-the calling program.
c0c131b
-The default is to continue retrying NFS file operations indefinitely.
c0c131b
-.TP 1.5i
c0c131b
-.I hard
c0c131b
-If an NFS file operation has a major timeout then report
c0c131b
-"server not responding" on the console and continue retrying indefinitely.
c0c131b
-This is the default.
c0c131b
-.TP 1.5i
c0c131b
-.I intr
c0c131b
-If an NFS file operation has a major timeout and it is hard mounted,
c0c131b
-then allow signals to interupt the file operation and cause it to
c0c131b
-return EINTR to the calling program.  The default is to not
c0c131b
-allow file operations to be interrupted.
c0c131b
-.TP 1.5i
c0c131b
-.I nocto
c0c131b
-Suppress the retrieval of new attributes when creating a file.
c0c131b
-.TP 1.5i
c0c131b
-.I noac
c0c131b
-Disable attribute caching, and force synchronous writes.
c0c131b
-This extracts a
c0c131b
-server performance penalty but it allows two different NFS clients
c0c131b
-to get reasonable good results when both clients are actively
c0c131b
-writing to common filesystem on the server.
c0c131b
-.TP 1.5i
c0c131b
-.I nosharecache
c0c131b
-As of kernel 2.6.18, it is no longer possible to mount the same
c0c131b
-same filesystem with different mount options to a new mountpoint.
c0c131b
-It was deemed unsafe to do so, since cached data cannot be shared
c0c131b
-between the two mountpoints. In consequence, files or directories
c0c131b
-that were common to both mountpoint subtrees could often be seen to
c0c131b
-be out of sync following an update.
c0c131b
-.br
c0c131b
-This option allows administrators to select the pre-2.6.18 behaviour,
c0c131b
-permitting the same filesystem to be mounted with different mount
c0c131b
-options.
c0c131b
-.br
c0c131b
-.B Beware:
c0c131b
-Use of this option is not recommended unless you are certain that there
c0c131b
-are no hard links or subtrees of this mountpoint that are mounted
c0c131b
-elsewhere.
c0c131b
-.P
c0c131b
-All of the non-value options have corresponding nooption forms.
c0c131b
-For example, nointr means don't allow file operations to be
c0c131b
-interrupted.
cf6d5cf
+In the presence of multiple client network interfaces,
cf6d5cf
+special routing policies,
cf6d5cf
+or atypical network topologies,
cf6d5cf
+the exact address to use for callbacks may be nontrivial to determine. 
cf6d5cf
+.SH EXAMPLES
cf6d5cf
+To mount an export using NFS version 2,
cf6d5cf
+use the
cf6d5cf
+.B nfs
cf6d5cf
+file system type and specify the
cf6d5cf
+.B nfsvers=2
cf6d5cf
+mount option.
cf6d5cf
+To mount using NFS version 3,
cf6d5cf
+use the
cf6d5cf
+.B nfs
cf6d5cf
+file system type and specify the
cf6d5cf
+.B nfsvers=3
cf6d5cf
+mount option.
cf6d5cf
+To mount using NFS version 4,
cf6d5cf
+use the
cf6d5cf
+.B nfs4
cf6d5cf
+file system type.
cf6d5cf
+The
cf6d5cf
+.B nfsvers
cf6d5cf
+mount option is not supported for the
cf6d5cf
+.B nfs4
cf6d5cf
+file system type.
cf6d5cf
+.P
cf6d5cf
+The following example from an
cf6d5cf
+.I /etc/fstab
cf6d5cf
+file causes the mount command to negotiate
cf6d5cf
+reasonable defaults for NFS behavior.
cf6d5cf
+.P
cf6d5cf
+.NF
cf6d5cf
+.TA 2.5i +0.7i +0.7i +.7i
cf6d5cf
+	server:/export	/mnt	nfs	defaults	0 0
cf6d5cf
+.FI
cf6d5cf
+.P
cf6d5cf
+Here is an example from an /etc/fstab file for an NFS version 2 mount over UDP.
cf6d5cf
+.P
cf6d5cf
+.NF
cf6d5cf
+.TA 2.5i +0.7i +0.7i +.7i
cf6d5cf
+	server:/export	/mnt	nfs	nfsvers=2,proto=udp	0 0
cf6d5cf
+.FI
cf6d5cf
+.P
cf6d5cf
+Try this example to mount using NFS version 4 over TCP
cf6d5cf
+with Kerberos 5 mutual authentication.
cf6d5cf
+.P
cf6d5cf
+.NF
cf6d5cf
+.TA 2.5i +0.7i +0.7i +.7i
cf6d5cf
+	server:/export	/mnt	nfs4	sec=krb5	0 0
cf6d5cf
+.FI
cf6d5cf
+.P
cf6d5cf
+This example can be used to mount /usr over NFS.
cf6d5cf
+.P
cf6d5cf
+.NF
cf6d5cf
+.TA 2.5i +0.7i +0.7i +.7i
cf6d5cf
+	server:/export	/usr	nfs	ro,nolock,nocto,actimeo=3600	0 0
cf6d5cf
+.FI
cf6d5cf
+.SH "TRANSPORT METHODS"
cf6d5cf
+NFS clients send requests to NFS servers via
cf6d5cf
+Remote Procedure Calls, or
cf6d5cf
+.IR RPCs .
cf6d5cf
+The RPC client discovers remote service endpoints automatically,
cf6d5cf
+handles per-request authentication,
cf6d5cf
+adjusts request parameters for different byte endianness on client and server,
cf6d5cf
+and retransmits requests that may have been lost by the network or server.
cf6d5cf
+RPC requests and replies flow over a network transport.
cf6d5cf
+.P
cf6d5cf
+In most cases, the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command, NFS client, and NFS server
cf6d5cf
+can automatically negotiate proper transport
cf6d5cf
+and data transfer size settings for a mount point.
cf6d5cf
+In some cases, however, it pays to specify
cf6d5cf
+these settings explicitly using mount options.
cf6d5cf
+.P
cf6d5cf
+Traditionally, NFS clients used the UDP transport exclusively for  
cf6d5cf
+transmitting requests to servers.  Though its implementation is  
cf6d5cf
+simple, NFS over UDP has many limitations that prevent smooth  
cf6d5cf
+operation and good performance in some common deployment  
cf6d5cf
+environments.  Even an insignificant packet loss rate results in the  
cf6d5cf
+loss of whole NFS requests; as such, retransmit timeouts are usually  
cf6d5cf
+in the subsecond range to allow clients to recover quickly from  
cf6d5cf
+dropped requests, but this can result in extraneous network traffic  
cf6d5cf
+and server load.
cf6d5cf
+.P
cf6d5cf
+However, UDP can be quite effective in specialized settings where  
cf6d5cf
+the network’s MTU is large relative to NFS’s data transfer size (such  
cf6d5cf
+as network environments that enable jumbo Ethernet frames).  In such  
cf6d5cf
+environments, trimming the 
cf6d5cf
+.B rsize 
cf6d5cf
+and 
cf6d5cf
+.B wsize 
cf6d5cf
+settings so that each  
cf6d5cf
+NFS read or write request fits in just a few network frames (or even  
cf6d5cf
+in  a single  frame) is advised.  This reduces the probability that  
cf6d5cf
+the loss of a single MTU-sized network frame results in the loss of  
cf6d5cf
+an entire large read or write request.
cf6d5cf
+.P
cf6d5cf
+TCP is the default transport protocol used for all modern NFS 
cf6d5cf
+implementations.  It performs well in almost every conceivable
cf6d5cf
+network environment and provides excellent guarantees against data 
cf6d5cf
+corruption caused by network unreliability.  TCP is often a  
cf6d5cf
+requirement for mounting a server through a network firewall.
cf6d5cf
+.P
cf6d5cf
+Under normal circumstances, networks drop packets much more
cf6d5cf
+frequently than NFS servers drop requests.  As such, an aggressive
cf6d5cf
+retransmit timeout  setting for NFS over TCP is unnecessary. Typical
cf6d5cf
+timeout settings for NFS over TCP are between one and ten minutes.
cf6d5cf
+After  the client exhausts its retransmits (the value of the
cf6d5cf
+.B retrans
cf6d5cf
+mount option), it assumes a network partition has occurred,
cf6d5cf
+and attempts to reconnect to the server on a fresh socket. Since
cf6d5cf
+TCP itself makes network data transfer reliable, 
cf6d5cf
+.B rsize
cf6d5cf
+and 
cf6d5cf
+.B wsize
cf6d5cf
+can safely be allowed to default to the largest values supported by  
cf6d5cf
+both client and server, independent of the network's MTU size.
cf6d5cf
+.SH "DATA AND METADATA COHERENCE"
cf6d5cf
+Some modern cluster file systems provide
cf6d5cf
+perfect cache coherence among their clients.
cf6d5cf
+Perfect cache coherence among disparate NFS clients
cf6d5cf
+is expensive to achieve, especially on wide area networks.
cf6d5cf
+As such, NFS settles for weaker cache coherence that 
cf6d5cf
+satisfies the requirements of most file sharing types. Normally, 
cf6d5cf
+file sharing is completely sequential:
cf6d5cf
+first client A opens a file, writes something to it, then closes it;
cf6d5cf
+then client B opens the same file, and reads the changes.
cf6d5cf
+.DT
cf6d5cf
+.SS "Close-to-open cache consistency"
cf6d5cf
+When an application opens a file stored on an NFS server,
cf6d5cf
+the NFS client checks that it still exists on the server
cf6d5cf
+and is permitted to the opener by sending a GETATTR or ACCESS request.
cf6d5cf
+When the application closes the file,
cf6d5cf
+the NFS client writes back any pending changes
cf6d5cf
+to the file so that the next opener can view the changes.
cf6d5cf
+This also gives the NFS client an opportunity to report
cf6d5cf
+any server write errors to the application
cf6d5cf
+via the return code from
cf6d5cf
+.BR close (2).
cf6d5cf
+The behavior of checking at open time and flushing at close time
cf6d5cf
+is referred to as close-to-open cache consistency.
cf6d5cf
+.SS "Weak cache consistency"
cf6d5cf
+There are still opportunities for a client's data cache
cf6d5cf
+to contain stale data.
cf6d5cf
+The NFS version 3 protocol introduced "weak cache consistency"
cf6d5cf
+(also known as WCC) which provides a way of efficiently checking
cf6d5cf
+a file's attributes before and after a single request.
cf6d5cf
+This allows a client to help identify changes
cf6d5cf
+that could have been made by other clients.
cf6d5cf
+.P
cf6d5cf
+When a client is using many concurrent operations
cf6d5cf
+that update the same file at the same time
cf6d5cf
+(for example, during asynchronous write behind),
cf6d5cf
+it is still difficult to tell whether it was
cf6d5cf
+that client's updates or some other client's updates
cf6d5cf
+that altered the file.
cf6d5cf
+.SS "Attribute caching"
cf6d5cf
+Use the 
cf6d5cf
+.B noac
cf6d5cf
+mount option to achieve attribute cache coherence
cf6d5cf
+among multiple clients.
cf6d5cf
+Almost every file system operation checks
cf6d5cf
+file attribute information.
cf6d5cf
+The client keeps this information cached
cf6d5cf
+for a period of time to reduce network and server load.
cf6d5cf
+When
cf6d5cf
+.B noac
cf6d5cf
+is in effect, a client's file attribute cache is disabled,
cf6d5cf
+so each operation that needs to check a file's attributes
cf6d5cf
+is forced to go back to the server.
cf6d5cf
+This permits a client to see changes to a file very quickly,
cf6d5cf
+at the cost of many extra network operations.
cf6d5cf
+.P
cf6d5cf
+Be careful not to confuse the
cf6d5cf
+.B noac
cf6d5cf
+option with "no data caching."
cf6d5cf
+The
cf6d5cf
+.B noac
cf6d5cf
+mount option prevents the client from caching file metadata,
cf6d5cf
+but there are still races that may result in data cache incoherence
cf6d5cf
+between client and server.
cf6d5cf
+.P
cf6d5cf
+The NFS protocol is not designed to support
cf6d5cf
+true cluster file system cache coherence
cf6d5cf
+without some type of application serialization.
cf6d5cf
+If absolute cache coherence among clients is required,
cf6d5cf
+applications should use file locking. Alternatively, applications 
cf6d5cf
+can also open their files with the O_DIRECT flag
cf6d5cf
+to disable data caching entirely.
cf6d5cf
+.SS "The sync mount option"
cf6d5cf
+The NFS client treats the
cf6d5cf
+.B sync
cf6d5cf
+mount option differently than some other file systems
cf6d5cf
+(refer to 
cf6d5cf
+.BR mount (8)
cf6d5cf
+for a description of the generic
cf6d5cf
+.B sync
cf6d5cf
+and
cf6d5cf
+.B async
cf6d5cf
+mount options).
cf6d5cf
+If neither
cf6d5cf
+.B sync
cf6d5cf
+nor
cf6d5cf
+.B async
cf6d5cf
+is specified (or if the 
cf6d5cf
+.B async 
cf6d5cf
+option is specified),
cf6d5cf
+the NFS client delays sending application
cf6d5cf
+writes to the server
cf6d5cf
+until any of these events occur: 
cf6d5cf
+.IP
cf6d5cf
+Memory pressure forces reclamation of system memory resources.
cf6d5cf
+.IP
cf6d5cf
+An application flushes file data explicitly with 
cf6d5cf
+.BR sync (2),
cf6d5cf
+.BR msync (2),
cf6d5cf
+or
cf6d5cf
+.BR fsync (3).
cf6d5cf
+.IP
cf6d5cf
+An application closes a file with
cf6d5cf
+.BR close (2).
cf6d5cf
+.IP
cf6d5cf
+The file is locked/unlocked via
cf6d5cf
+.BR fcntl (2).
cf6d5cf
+.P
cf6d5cf
+In other words, under normal circumstances,
cf6d5cf
+data written by an application may not immediately appear
cf6d5cf
+on the server that hosts the file.
cf6d5cf
+.P
cf6d5cf
+If the
cf6d5cf
+.B sync
cf6d5cf
+option is specified on a mount point,
cf6d5cf
+any system call that writes data to files on that mount point
cf6d5cf
+causes that data to be flushed to the server
cf6d5cf
+before the system call returns control to user space.
cf6d5cf
+This provides greater data cache coherence among clients,
cf6d5cf
+but at a significant performance cost.
cf6d5cf
+.P
cf6d5cf
+Applications can use the O_SYNC open flag to force application
cf6d5cf
+writes to individual files to go to the server immediately without
cf6d5cf
+the use of the
cf6d5cf
+.B sync 
cf6d5cf
+mount option.
cf6d5cf
+.SS "Using file locks with NFS"
cf6d5cf
+The Network Lock Manager protocol is a separate sideband protocol
cf6d5cf
+used to manage file locks in NFS version 2 and version 3.
cf6d5cf
+To support lock recovery after a client or server reboot,
cf6d5cf
+a second sideband protocol --
cf6d5cf
+known as the Network Status Manager protocol --
cf6d5cf
+is also required.
cf6d5cf
+In NFS version 4,
cf6d5cf
+file locking is supported directly in the main NFS protocol,
cf6d5cf
+and the NLM and NSM sideband protocols are not used.
cf6d5cf
+.P
cf6d5cf
+In most cases, NLM and NSM services are started automatically,
cf6d5cf
+and no extra configuration is required.
cf6d5cf
+Configure all NFS clients with fully-qualified domain names
cf6d5cf
+to ensure that NFS servers can find clients to notify them of server reboots.
cf6d5cf
+.P
cf6d5cf
+NLM supports advisory file locks only.
cf6d5cf
+To lock NFS files, use
cf6d5cf
+.BR fcntl (2)
cf6d5cf
+with the F_GETLK and F_SETLK commands.
cf6d5cf
+The NFS client converts file locks obtained via
cf6d5cf
+.BR flock (2)
cf6d5cf
+to advisory locks.
cf6d5cf
+.P
cf6d5cf
+When mounting servers that do not support the NLM protocol,
cf6d5cf
+or when mounting an NFS server through a firewall
cf6d5cf
+that blocks the NLM service port,
cf6d5cf
+specify the
cf6d5cf
+.B nolock
cf6d5cf
+mount option. NLM locking must be disabled with the
cf6d5cf
+.B nolock
cf6d5cf
+option when using NFS to mount
cf6d5cf
+.I /var
cf6d5cf
+because 
cf6d5cf
+.I /var 
cf6d5cf
+contains files used by the NLM implementation on Linux.
cf6d5cf
+.P
cf6d5cf
+Specifying the
cf6d5cf
+.B nolock
cf6d5cf
+option may also be advised to improve the performance
cf6d5cf
+of a proprietary application which runs on a single client
cf6d5cf
+and uses file locks extensively. 
cf6d5cf
+.SS "NFS version 4 caching features"
cf6d5cf
+The data and metadata caching behavior of NFS version 4
cf6d5cf
+clients is similar to that of earlier versions.
cf6d5cf
+However, NFS version 4 adds two features that improve
cf6d5cf
+cache behavior:
cf6d5cf
+.I change attributes
cf6d5cf
+and
cf6d5cf
+.IR "file delegation" .
cf6d5cf
+.P
cf6d5cf
+The
cf6d5cf
+.I change attribute
cf6d5cf
+is a new part of NFS file and directory metadata
cf6d5cf
+which tracks data changes.
cf6d5cf
+It replaces the use of a file's modification
cf6d5cf
+and change time stamps
cf6d5cf
+as a way for clients to validate the content
cf6d5cf
+of their caches.
cf6d5cf
+Change attributes are independent of the time stamp
cf6d5cf
+resolution on either the server or client, however.
cf6d5cf
+.P
cf6d5cf
+A
cf6d5cf
+.I file delegation
cf6d5cf
+is a contract between an NFS version 4 client
cf6d5cf
+and server that allows the client to treat a file temporarily
cf6d5cf
+as if no other client is accessing it.
cf6d5cf
+The server promises to notify the client (via a callback request) if another client
cf6d5cf
+attempts to access that file.
cf6d5cf
+Once a file has been delegated to a client, the client can
cf6d5cf
+cache that file's data and metadata aggressively without
cf6d5cf
+contacting the server.
cf6d5cf
+.P
cf6d5cf
+File delegations come in two flavors:
cf6d5cf
+.I read
cf6d5cf
+and
cf6d5cf
+.IR write .
cf6d5cf
+A
cf6d5cf
+.I read
cf6d5cf
+delegation means that the server notifies the client
cf6d5cf
+about any other clients that want to write to the file.
cf6d5cf
+A
cf6d5cf
+.I write
cf6d5cf
+delegation means that the client gets notified about
cf6d5cf
+either read or write accessors.
cf6d5cf
+.P
cf6d5cf
+Servers grant file delegations when a file is opened,
cf6d5cf
+and can recall delegations at any time when another
cf6d5cf
+client wants access to the file that conflicts with
cf6d5cf
+any delegations already granted.
cf6d5cf
+Delegations on directories are not supported.
cf6d5cf
+.P
cf6d5cf
+In order to support delegation callback, the server
cf6d5cf
+checks the network return path to the client during
cf6d5cf
+the client's initial contact with the server.
cf6d5cf
+If contact with the client cannot be established,
cf6d5cf
+the server simply does not grant any delegations to
cf6d5cf
+that client.
cf6d5cf
+.SH "SECURITY CONSIDERATIONS"
cf6d5cf
+NFS servers control access to file data,
cf6d5cf
+but they depend on their RPC implementation
cf6d5cf
+to provide authentication of NFS requests.
cf6d5cf
+Traditional NFS access control mimics
cf6d5cf
+the standard mode bit access control provided in local file systems.
cf6d5cf
+Traditional RPC authentication uses a number
cf6d5cf
+to represent each user
cf6d5cf
+(usually the user's own uid),
cf6d5cf
+a number to represent the user's group (the user's gid),
cf6d5cf
+and a set of up to 16 auxiliary group numbers
cf6d5cf
+to represent other groups of which the user may be a member.
cf6d5cf
+.P
cf6d5cf
+Typically, file data and user ID values appear unencrypted
cf6d5cf
+(i.e. "in the clear") on the network.
cf6d5cf
+Moreover, NFS versions 2 and 3 use
cf6d5cf
+separate sideband protocols for mounting,
cf6d5cf
+locking and unlocking files,
cf6d5cf
+and reporting system status of clients and servers.
cf6d5cf
+These auxiliary protocols use no authentication.
cf6d5cf
+.P
cf6d5cf
+In addition to combining these sideband protocols with the main NFS protocol,
cf6d5cf
+NFS version 4 introduces more advanced forms of access control,
cf6d5cf
+authentication, and in-transit data protection.
cf6d5cf
+The NFS version 4 specification mandates NFSv4 ACLs,
cf6d5cf
+RPCGSS authentication, and RPCGSS security flavors
cf6d5cf
+that provide per-RPC integrity checking and encryption.
cf6d5cf
+Because NFS version 4 combines the  
cf6d5cf
+function of the sideband protocols into the main NFS protocol,
cf6d5cf
+the new security features apply to all NFS version 4 operations
cf6d5cf
+including mounting, file locking, and so on.
cf6d5cf
+RPCGSS authentication can also be used with NFS versions 2 and 3,
cf6d5cf
+but does not protect their sideband protocols.
cf6d5cf
+.P
cf6d5cf
+The
cf6d5cf
+.B sec
cf6d5cf
+mount option specifies the RPCGSS security mode
cf6d5cf
+that is in effect on a given NFS mount point.
cf6d5cf
+Specifying
cf6d5cf
+.B sec=krb5
cf6d5cf
+provides cryptographic proof of a user's identity in each RPC request.
cf6d5cf
+This provides strong verification of the identity of users 
cf6d5cf
+accessing data on the server.
cf6d5cf
+Note that additional configuration besides adding this mount option
cf6d5cf
+is required in order to enable Kerberos security.
cf6d5cf
+Refer to the 
cf6d5cf
+.BR rpc.gssd (8)
cf6d5cf
+man page for details.
cf6d5cf
+.P
cf6d5cf
+Two additional flavors of Kerberos security are supported:
cf6d5cf
+.B krb5i
cf6d5cf
+and
cf6d5cf
+.BR krb5p .
cf6d5cf
+The
cf6d5cf
+.B krb5i
cf6d5cf
+security flavor provides a cryptographically strong guarantee
cf6d5cf
+that the data in each RPC request has not been tampered with.
cf6d5cf
+The
cf6d5cf
+.B krb5p
cf6d5cf
+security flavor encrypts every RPC request
cf6d5cf
+to prevent data exposure during network transit; however,
cf6d5cf
+expect some performance impact
cf6d5cf
+when using integrity checking or encryption.
cf6d5cf
+Similar support for other forms of cryptographic security (such as lipkey and SPKM3)
cf6d5cf
+is also available.
cf6d5cf
+.P
cf6d5cf
+The NFS version 4 protocol allows
cf6d5cf
+clients and servers to negotiate among multiple security flavors
cf6d5cf
+during mount processing.
cf6d5cf
+However, Linux does not yet implement such negotiation.
cf6d5cf
+The Linux client specifies a single security flavor at mount time
cf6d5cf
+which remains in effect for the lifetime of the mount.
cf6d5cf
+If the server does not support this flavor,
cf6d5cf
+the initial mount request is rejected by the server.
cf6d5cf
+.SS "Mounting through a firewall"
cf6d5cf
+A firewall may reside between an NFS client and server,
cf6d5cf
+or the client or server may block some of its own ports via IP
cf6d5cf
+filter rules.
cf6d5cf
+It is still possible to mount an NFS server through a firewall,
cf6d5cf
+though some of the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command's automatic service endpoint discovery mechanisms may not work; this 
cf6d5cf
+requires you to provide specific endpoint details via NFS mount options.
cf6d5cf
+.P
cf6d5cf
+NFS servers normally run a portmapper or rpcbind daemon to advertise
cf6d5cf
+their service endpoints to clients. Clients use the rpcbind daemon to determine: 
cf6d5cf
+.IP
cf6d5cf
+What network port each RPC-based service is using
cf6d5cf
+.IP
cf6d5cf
+What transport protocols each RPC-based service supports 
cf6d5cf
+.P
cf6d5cf
+The rpcbind daemon uses a well-known port number (111) to help clients find a service endpoint.
cf6d5cf
+Although NFS often uses a standard port number (2049),
cf6d5cf
+auxiliary services such as the NLM service can choose
cf6d5cf
+any unused port number at random.
cf6d5cf
+.P
cf6d5cf
+Common firewall configurations block the well-known rpcbind port.
cf6d5cf
+In the absense of an rpcbind service,
cf6d5cf
+the server administrator fixes the port number
cf6d5cf
+of NFS-related services so that the firewall
cf6d5cf
+can allow access to specific NFS service ports.
cf6d5cf
+Client administrators then specify the port number
cf6d5cf
+for the mountd service via the
cf6d5cf
+.BR mount (8)
cf6d5cf
+command's
cf6d5cf
+.B mountport
cf6d5cf
+option.
cf6d5cf
+It may also be necessary to enforce the use of TCP or UDP
cf6d5cf
+if the firewall blocks one of those transports.
cf6d5cf
+.SS "NFS Access Control Lists"
cf6d5cf
+Solaris allows NFS version 3 clients direct access
cf6d5cf
+to POSIX Access Control Lists stored in its local file systems.
cf6d5cf
+This proprietary sideband protocol, known as NFSACL,
cf6d5cf
+provides richer access control than mode bits.
cf6d5cf
+Linux implements this protocol
cf6d5cf
+for compatibility with the Solaris NFS implementation.
cf6d5cf
+The NFSACL protocol never became a standard part
cf6d5cf
+of the NFS version 3 specification, however.
cf6d5cf
+.P
cf6d5cf
+The NFS version 4 specification mandates a new version
cf6d5cf
+of Access Control Lists that are semantically richer than POSIX ACLs.
cf6d5cf
+NFS version 4 ACLs are not fully compatible with POSIX ACLs; as such, 
cf6d5cf
+some translation between the two is required
cf6d5cf
+in an environment that mixes POSIX ACLs and NFS version 4. 
cf6d5cf
 .SH FILES
cf6d5cf
+.TP 1.5i
cf6d5cf
 .I /etc/fstab
cf6d5cf
-.SH "SEE ALSO"
cf6d5cf
-.BR fstab "(5), " mount "(8), " umount "(8), " exports (5)
cf6d5cf
-.SH AUTHOR
cf6d5cf
-"Rick Sladkey" <jrs@world.std.com>
cf6d5cf
+file system table
cf6d5cf
 .SH BUGS
cf6d5cf
+The generic
cf6d5cf
+.B remount
cf6d5cf
+option is not fully supported.
cf6d5cf
+Generic options, such as
cf6d5cf
+.BR rw " and " ro
cf6d5cf
+can be modified using the
cf6d5cf
+.B remount
cf6d5cf
+option,
cf6d5cf
+but NFS-specific options are not all supported.
cf6d5cf
+The underlying transport or NFS version
cf6d5cf
+cannot be changed by a remount, for example.
cf6d5cf
+Performing a remount on an NFS file system mounted with the
cf6d5cf
+.B noac
cf6d5cf
+option may have unintended consequences.
cf6d5cf
+The
cf6d5cf
+.B noac
cf6d5cf
+option is a mixture of a generic option,
cf6d5cf
+.BR sync ,
cf6d5cf
+and an NFS-specific option
cf6d5cf
+.BR actimeo=0 .
cf6d5cf
 .P
cf6d5cf
-Checking files on NFS filesystem referenced by file descriptors (i.e. the 
cf6d5cf
-.BR fcntl 
cf6d5cf
-and 
cf6d5cf
-.BR ioctl
cf6d5cf
-families of functions) may lead to inconsistent result due to the lack of
cf6d5cf
-consistency check in kernel even if noac is used.
cf6d5cf
+Before 2.4.7, the Linux NFS client did not support NFS over TCP.
cf6d5cf
+.P
cf6d5cf
+Before 2.4.20, the Linux NFS client used a heuristic
cf6d5cf
+to determine whether cached file data was still valid
cf6d5cf
+rather than using the standard close-to-open cache coherency method
cf6d5cf
+described above.
cf6d5cf
+.P
cf6d5cf
+Starting with 2.4.22, the Linux NFS client employs
cf6d5cf
+a Van Jacobsen-based RTT estimator to determine retransmit
cf6d5cf
+timeout values when using NFS over UDP.
cf6d5cf
+.P
cf6d5cf
+Before 2.6.0, the Linux NFS client did not support NFS version 4.
cf6d5cf
+.P
cf6d5cf
+Before 2.6.8, the Linux NFS client used only synchronous reads and writes
cf6d5cf
+when the
cf6d5cf
+.BR rsize " and " wsize
cf6d5cf
+settings were smaller than the system's page size.
cf6d5cf
+.P
cf6d5cf
+The Linux NFS client does not yet support
cf6d5cf
+certain optional features of the NFS version 4 protocol,
cf6d5cf
+such as security negotiation, server referrals, and named attributes.
cf6d5cf
+.SH "SEE ALSO"
cf6d5cf
+.BR fstab (5),
cf6d5cf
+.BR mount (8),
cf6d5cf
+.BR umount (8),
cf6d5cf
+.BR mount.nfs (5),
cf6d5cf
+.BR umount.nfs (5),
cf6d5cf
+.BR exports (5),
cf6d5cf
+.BR nfsd (8),
cf6d5cf
+.BR rpc.idmapd (8),
cf6d5cf
+.BR rpc.gssd (8),
cf6d5cf
+.BR rpc.svcgssd (8),
cf6d5cf
+.BR kerberos (1)
cf6d5cf
+.sp
cf6d5cf
+RFC 768 for the UDP specification.
cf6d5cf
+.br
cf6d5cf
+RFC 793 for the TCP specification.
cf6d5cf
+.br
cf6d5cf
+RFC 1094 for the NFS version 2 specification.
cf6d5cf
+.br
cf6d5cf
+RFC 1813 for the NFS version 3 specification.
cf6d5cf
+.br
cf6d5cf
+RFC 1832 for the XDR specification.
cf6d5cf
+.br
cf6d5cf
+RFC 1833 for the RPC bind specification.
cf6d5cf
+.br
cf6d5cf
+RFC 2203 for the RPCSEC GSS API protocol specification.
cf6d5cf
+.br
cf6d5cf
+RFC 3530 for the NFS version 4 specification.