nfs - nfs and nfs4 fstab format and options
The fstab file contains information about which filesystems to mount where and with what
options. For NFS mounts, it contains the server name and exported server directory to mount
from, the local directory that is the mount point, and the NFS specific options that control
the way the filesystem is mounted.
Different versions of the NFS protocol are supported by the Linux NFS client:
- version 2, use
-t nfs nfsvers=2
- version 3, (default)use the
- version 4, use
These file system types share similar mount options;
Here is an example from an
/etc/fstab file for an NFSv2 mount over UDP.
Here is an example for an NFSv4 mount over TCP using Kerberos 5 mutual authentication.
server:/usr/local/pub /pub nfs rsize=32768,wsize=32768,timeo=14,intr
server:/usr/local/pub /pub nfs4 proto=tcp,sec=krb5,hard,intr
logical options have corresponding nooption forms. For example, |
nointr means don't allow file operations to be interrupted.
| Enable persistent caching to the local disk using the FSCache facility.|
|minimum seconds attributes of a regular file should be cached default 3.
| maximum, default 60
| minimum seconds attributes of a directory should be cached default 30
|maximum, default 60
| sets |
acregmin, acregmax, acdirmin and
acdirmax to the same value.
| Disable attribute caching. This significant performance penalty |
It allows two different NFS clients to get reasonable results when both clients are actively writing to a common export on the server.
| Suppress the retrieval of new attributes when creating a file.
| tenths of a second before sending the first retransmission after
an RPC timeout. default 7 . |
After the first timeout, the time is doubled after each successive timeout until a maximum
timeout of 60 seconds is reached or the enough retransmissions have occured
to cause a major timeout.
If the filesystem is hard mounted, each new
timeout cascade restarts at twice the initial value of the previous cascade,
again doubling at each retransmission.
The maximum timeout is always 60 seconds.
Better overall performance may be achieved by increasing the timeout
when mounting on a busy network, to a slow server, or through several routers
| number of minor timeouts and retransmissions that must occur before a major timeout occurs. |
When a major timeout occurs, the file operation is either aborted or a "server not responding"
message is output.
|minutes to retry an NFS mount operation in the foreground or
background before giving up. default for forground mounts is 2 minutes. background 10,000 minutes, roughly one week.
| When an NFS server does not support version two of the RPC mount protocol,
this option can be used to specify the maximum length of a filename that is
supported on the remote filesystem. |
This is used to support the POSIX pathconf functions. default 255 characters.
|If the port is 0 (default) query the remote host's portmapper for the
port number to use. |
If the remote host's NFS daemon is not registered with
its portmapper, the standard NFS port number 2049 is used instead.
| use a specific network protocol UDP and TCP. default TCP .
|The name of the host running mountd .
| Use an alternate RPC program number to contact the mount daemon on the
remote host. This option is useful for hosts that can run multiple
NFS servers. default 100005 which is the standard RPC
mount daemon program number.
" " " " "
version number " " " " "
mount daemon …
" " " " "
program number to contact the NFS daemon …
" " " " "
version number " " " " "
| Disable NFS locking. Do not start lockd.
| If the first NFS mount attempt times out, retry the mount in the foreground. default behavior.
| If the first NFS mount attempt times out, retry the mount in the background. |
After a mount operation is backgrounded, subsequent
mounts on the same NFS server will be backgrounded
A missing mount point is treated as a timeout, to allow for nested NFS mounts.
| If a file operation has a major timeout then "server not responding" and continue retrying indefinitely. default.
| " " " " " "
report an I/O error to the calling program.
| If an NFS file operation has a major timeout and it is hard mounted,
then allow signals to interupt the file operation and cause it to
EINTR to the calling program.
Default is to not allow file operations to be interrupted.
| Mount the NFS filesystem using POSIX semantics. allows
proper support iof the |
pathconf command by querying
the mount server for the maximum length of a filename.
The remote host must support version two of the RPC mount protocol.
| Disables Access Control List (ACL) processing.
| Security version for this mount to "mode". default
sec=sys use local unix uids and gids to authenticate NFS operations (AUTH_SYS).
sec=krb5 use Kerberos V5
sec=krb5i use Kerberos V5 for user
authentication and performs integrity checking of NFS operations using
secure checksums to prevent data tampering; and
sec=krb5p use Kerberos V5 for user authentication and integrity checking, and
encrypts NFS traffic to prevent traffic sniffing (this is the most
secure setting). Note that there is a performance penalty when using
integrity or privacy.
|maximum bytes used when reading files from an NFS server. |
Negotiated between the server and client to determine the largest
block size both can support. The actual size used may be smaller.
| maximum bytes uses when writing files …
| use the TCP protocol. default
| use the UDP protocol
| Disables NFSv3 READDIRPLUS RPCs. Use this options when mounting
servers that don't support READDIRPLUS implementations.
Beware: Use of this option is not recommended unless you are certain
that there are no hard links or subtrees of this mountpoint that are
fstab(5), mount(8), umount(8), exports(5)
The posix option is implemented but is currently ignored by the Linux kernel.
Checking files on NFS filesystem referenced by file descriptors (i.e. the fcntl and
ioctl families of functions) may lead to inconsistent result due to the lack of con-
sistency check in kernel even if noac is used.