NFS   (5) manpage
NFS
5
20 November 1993
Linux 0.99
Linux Programmer's Manual
  • NAME
      nfs - nfs and nfs4 fstab format and options
  • SYNOPSIS
      /etc/fstab
  • DESCRIPTION
      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. Three different versions of the NFS protocol are supported by the Linux NFS client: NFS version 2, NFS version 3, and NFS version 4. To mount via NFS version 2, use the nfs file system type and specify nfsvers=2 . Version 2 is the default protocol version for the nfs file system type when nfsvers= is not specified on the mount command. To mount via NFS version 3, use the nfs file system type and specify nfsvers=3 . To mount via NFS version 4, use the nfs4 file system type. The nfsvers= keyword is not supported for the nfs4 file system type. These file system types share similar mount options; the differences are listed below. Here is an example from an /etc/fstab file for an NFSv2 mount over UDP.

      
      server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr
      Here is an example for an NFSv4 mount over TCP using Kerberos
      5 mutual authentication.


      
      server:/usr/local/pub /pub nfs4 proto=tcp,sec=krb5,hard,intr
      Options for the nfs file system type
      rsize=n
      The number of bytes NFS uses when reading files from an NFS server.
      The default value is dependent on the kernel, currently 1024 bytes.
      (However, throughput is improved greatly by asking for
      rsize=8192 .)
      wsize=n
      The number of bytes NFS uses when writing files to an NFS server.
      The default value is dependent on the kernel, currently 1024 bytes.
      (However, throughput is improved greatly by asking for
      wsize=8192 .)
      timeo=n
      The value in tenths of a second before sending the
      first retransmission after an RPC timeout.
      The default value is 7 tenths of a second.  After the first timeout,
      the timeout 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.  Then, 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 or gateways.
      retrans=n
      The number of minor timeouts and retransmissions that must occur before
      a major timeout occurs.  The default is 3 timeouts.  When a major timeout
      occurs, the file operation is either aborted or a "server not responding"
      message is printed on the console.
      acregmin=n
      The minimum time in seconds that attributes of a regular file should
      be cached before requesting fresh information from a server.
      The default is 3 seconds.
      acregmax=n
      The maximum time in seconds that attributes of a regular file can
      be cached before requesting fresh information from a server.
      The default is 60 seconds.
      acdirmin=n
      The minimum time in seconds that attributes of a directory should
      be cached before requesting fresh information from a server.
      The default is 30 seconds.
      acdirmax=n
      The maximum time in seconds that attributes of a directory can
      be cached before requesting fresh information from a server.
      The default is 60 seconds.
      actimeo=n
      Using actimeo sets all of
      acregmin,
      acregmax,
      acdirmin,
      and
      acdirmax
      to the same value.
      There is no default value.
      retry=n
      The number of minutes to retry an NFS mount operation
      in the foreground or background before giving up.
      The default value is 10000 minutes, which is roughly one week.
      namlen=n
      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.  The default is 255 characters.
      port=n
      The numeric value of the port to connect to the NFS server on.
      If the port number is 0 (the default) then 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.
      mountport=n
      The numeric value of the
      mountd port.
      mounthost=name
      The name of the host running
      mountd .
      mountprog=n
      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.
      The default value is 100005 which is the standard RPC
      mount daemon program number.
      mountvers=n
      Use an alternate RPC version number to contact the
      mount daemon on the remote host.  This option is useful
      for hosts that can run multiple NFS servers.
      The default value depends on which kernel you are using.
      nfsprog=n
      Use an alternate RPC program number to contact the
      NFS daemon on the remote host.  This option is useful
      for hosts that can run multiple NFS servers.
      The default value is 100003 which is the standard RPC
      NFS daemon program number.
      nfsvers=n
      Use an alternate RPC version number to contact the
      NFS daemon on the remote host.  This option is useful
      for hosts that can run multiple NFS servers.
      The default value depends on which kernel you are using.
      vers=n
      vers is an alternative to nfsvers and is compatible with
      many other operating systems.
      nolock
      Disable NFS locking. Do not start lockd.
      This has to be used with some old NFS servers
      that don't support locking.
      bg
      If the first NFS mount attempt times out, retry the mount
      in the background.
      After a mount operation is backgrounded, all subsequent mounts
      on the same NFS server will be backgrounded immediately, without
      first attempting the mount.
      A missing mount point is treated as a timeout,
      to allow for nested NFS mounts.
      fg
      If the first NFS mount attempt times out, retry the mount
      in the foreground.
      This is the complement of the
      bg
      option, and also the default behavior.
      soft
      If an NFS file operation has a major timeout then report an I/O error to
      the calling program.
      The default is to continue retrying NFS file operations indefinitely.
      hard
      If an NFS file operation has a major timeout then report
      "server not responding" on the console and continue retrying indefinitely.
      This is the default.
      intr
      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
      return EINTR to the calling program.  The default is to not
      allow file operations to be interrupted.
      posix
      Mount the NFS filesystem using POSIX semantics.  This allows
      an NFS filesystem to properly support the POSIX pathconf
      command by querying the mount server for the maximum length
      of a filename.  To do this, the remote host must support version
      two of the RPC mount protocol.  Many NFS servers support only
      version one.
      nocto
      Suppress the retrieval of new attributes when creating a file.
      noac
      Disable all forms of attribute caching entirely.  This extracts a
      significant performance penalty but it allows two different NFS clients
      to get reasonable results when both clients are actively
      writing to a common export on the server.
      sec=mode
      Set the security flavor for this mount to "mode".
      The default setting is <3>sec=sys<1>, which uses local
      unix uids and gids to authenticate NFS operations (AUTH_SYS).
      Other currently supported settings are:
      <3>sec=krb5<1>, which uses Kerberos V5 instead of local unix uids
      and gids to authenticate users;
      <3>sec=krb5i<1>, which uses Kerberos V5 for user authentication
      and performs integrity checking of NFS operations using secure
      checksums to prevent data tampering; and
      <3>sec=krb5p<1>, which uses 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.
      tcp
      Mount the NFS filesystem using the TCP protocol instead of the
      default UDP protocol.  Many NFS servers only support UDP.
      udp
      Mount the NFS filesystem using the UDP protocol.  This
      is the default.
      All of the non-value options have corresponding nooption forms.
      For example, nointr means don't allow file operations to be
      interrupted.
      Options for the nfs4 file system type
      rsize=n
      The number of bytes NFS uses when reading files from an NFS server.
      The default value is dependent on the kernel, currently 4096 bytes.
      (However, throughput is improved greatly by asking for
      rsize=32768 .)
      This value is negotiated with the server.
      wsize=n
      The number of bytes NFS uses when writing files to an NFS server.
      The default value is dependent on the kernel, currently 4096 bytes.
      (However, throughput is improved greatly by asking for
      wsize=32768 .)
      This value is negotiated with the server.
      timeo=n
      The value in tenths of a second before sending the
      first retransmission after an RPC timeout.
      The default value depends on whether
      proto=udp
      or
      proto=tcp
      is in effect (see below).
      The default value for UDP is 7 tenths of a second.
      The default value for TCP is 60 seconds.
      After the first timeout,
      the timeout 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.  Then, 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.
      retrans=n
      The number of minor timeouts and retransmissions that must occur before
      a major timeout occurs.  The default is 5 timeouts for
      proto=udp
      and 2 timeouts for
      proto=tcp .
      When a major timeout
      occurs, the file operation is either aborted or a "server not responding"
      message is printed on the console.
      acregmin=n
      The minimum time in seconds that attributes of a regular file should
      be cached before requesting fresh information from a server.
      The default is 3 seconds.
      acregmax=n
      The maximum time in seconds that attributes of a regular file can
      be cached before requesting fresh information from a server.
      The default is 60 seconds.
      acdirmin=n
      The minimum time in seconds that attributes of a directory should
      be cached before requesting fresh information from a server.
      The default is 30 seconds.
      acdirmax=n
      The maximum time in seconds that attributes of a directory can
      be cached before requesting fresh information from a server.
      The default is 60 seconds.
      actimeo=n
      Using actimeo sets all of
      acregmin,
      acregmax,
      acdirmin,
      and
      acdirmax
      to the same value.
      There is no default value.
      retry=n
      The number of minutes to retry an NFS mount operation
      in the foreground or background before giving up.
      The default value is 10000 minutes, which is roughly one week.
      port=n
      The numeric value of the port to connect to the NFS server on.
      If the port number is 0 (the default) then 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.
      proto=n
      Mount the NFS filesystem using a specific network protocol
      instead of the default UDP protocol.
      Many NFS version 4 servers only support TCP.
      Valid protocol types are
      udp
      and
      tcp .
      clientaddr=n
      On a multi-homed client, this
      causes the client to use a specific callback address when
      communicating with an NFS version 4 server.
      This option is currently ignored.
      sec=mode
      Same as <3>sec=mode<1> for the nfs filesystem type (see above).
      bg
      If an NFS mount attempt times out, retry the mount
      in the background.
      After a mount operation is backgrounded, all subsequent mounts
      on the same NFS server will be backgrounded immediately, without
      first attempting the mount.
      A missing mount point is treated as a timeout,
      to allow for nested NFS mounts.
      fg
      If the first NFS mount attempt times out, retry the mount
      in the foreground.
      This is the complement of the
      bg
      option, and also the default behavior.
      soft
      If an NFS file operation has a major timeout then report an I/O error to
      the calling program.
      The default is to continue retrying NFS file operations indefinitely.
      hard
      If an NFS file operation has a major timeout then report
      "server not responding" on the console and continue retrying indefinitely.
      This is the default.
      intr
      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
      return EINTR to the calling program.  The default is to not
      allow file operations to be interrupted.
      nocto
      Suppress the retrieval of new attributes when creating a file.
      noac
      Disable attribute caching, and force synchronous writes.
      This extracts a
      server performance penalty but it allows two different NFS clients
      to get reasonable good results when both clients are actively
      writing to common filesystem on the server.
      All of the non-value options have corresponding nooption forms.
      For example, nointr means don't allow file operations to be
      interrupted.
  • FILES
      /etc/fstab
  • SEE ALSO
      fstab "(5), " mount "(8), " umount "(8), " exports(5)
  • AUTHOR
      "Rick Sladkey" <jrs@world.std.com>
  • BUGS
      The posix, and nocto options are parsed by mount
      but currently are silently ignored.
      The tcp and namlen options are implemented but are not currently
      supported by the Linux kernel.
      The umount command should notify the server
      when an NFS filesystem is unmounted.
Current Users: 16 © 1999-2006 Linux.com.hk PenguinSoft
All trademarks and copyrights on this page are owned by their respective companies. Linux is a trademark of Linus Torvalds.