1NFS(5)                     Linux Programmer's Manual                    NFS(5)
2
3
4

NAME

6       nfs - nfs and nfs4 fstab format and options
7

SYNOPSIS

9       /etc/fstab
10

DESCRIPTION

12       The  fstab  file  contains information about which filesystems to mount
13       where and with what options.  For NFS mounts, it  contains  the  server
14       name  and  exported server directory to mount from, the local directory
15       that is the mount point, and the NFS specific options that control  the
16       way the filesystem is mounted.
17
18       Three different versions of the NFS protocol are supported by the Linux
19       NFS client: NFS version 2, NFS version 3, and NFS version 4.  To  mount
20       via  NFS version 2, use the nfs file system type and specify nfsvers=2.
21       To mount via NFS version 3, use the nfs file system  type  and  specify
22       nfsvers=3.   Version 3 is the default protocol version for the nfs file
23       system type when nfsvers= is not specified on  the  mount  command  and
24       both client and server support it.  To mount via NFS version 4, use the
25       nfs4 file system type.  The nfsvers= keyword is not supported  for  the
26       nfs4 file system type.
27
28       These  file  system  types share similar mount options; the differences
29       are listed below.
30
31       Here is an example from an /etc/fstab file for an NFSv3 mount over TCP.
32
33       server:/usr/local/pub    /pub   nfs    rsize=32768,wsize=32768,timeo=14,intr
34
35       Here is an example for an NFSv4 mount over TCP using Kerberos 5  mutual
36       authentication.
37
38       server:/usr/local/pub    /pub   nfs4   proto=tcp,sec=krb5,hard,intr
39
40   Options for the nfs file system type
41       rsize=n        The  number of bytes NFS uses when reading files from an
42                      NFS server.  The rsize is negotiated between the  server
43                      and client to determine the largest block size that both
44                      can support.  The value specified by this option is  the
45                      maximum  size  that  could  be used; however, the actual
46                      size used may be smaller.  Note: Setting this size to  a
47                      value  less  than  the largest supported block size will
48                      adversely affect performance.
49
50       wsize=n        The number of bytes NFS uses when writing  files  to  an
51                      NFS  server.  The wsize is negotiated between the server
52                      and client to determine the largest block size that both
53                      can  support.  The value specified by this option is the
54                      maximum size that could be  used;  however,  the  actual
55                      size  used may be smaller.  Note: Setting this size to a
56                      value less than the largest supported  block  size  will
57                      adversely affect performance.
58
59       timeo=n        The value in tenths of a second before sending the first
60                      retransmission after an RPC timeout.  The default  value
61                      is  7  tenths of a second.  After the first timeout, the
62                      timeout is doubled after each successive timeout until a
63                      maximum  timeout  of 60 seconds is reached or the enough
64                      retransmissions have occured to cause a  major  timeout.
65                      Then,  if the filesystem is hard mounted, each new time‐
66                      out cascade restarts at twice the initial value  of  the
67                      previous cascade, again doubling at each retransmission.
68                      The maximum timeout is always 60 seconds.  Better  over‐
69                      all  performance may be achieved by increasing the time‐
70                      out when mounting on a busy network, to a  slow  server,
71                      or through several routers or gateways.
72
73       retrans=n      The  number  of  minor timeouts and retransmissions that
74                      must occur before a major timeout occurs.   The  default
75                      is  3  timeouts.   When a major timeout occurs, the file
76                      operation is either aborted or a "server not responding"
77                      message is printed on the console.
78
79       acregmin=n     The minimum time in seconds that attributes of a regular
80                      file should be cached before requesting  fresh  informa‐
81                      tion from a server.  The default is 3 seconds.
82
83       acregmax=n     The maximum time in seconds that attributes of a regular
84                      file can be cached before requesting  fresh  information
85                      from a server.  The default is 60 seconds.
86
87       acdirmin=n     The  minimum time in seconds that attributes of a direc‐
88                      tory should be cached before requesting  fresh  informa‐
89                      tion from a server.  The default is 30 seconds.
90
91       acdirmax=n     The  maximum time in seconds that attributes of a direc‐
92                      tory can be cached before requesting  fresh  information
93                      from a server.  The default is 60 seconds.
94
95       actimeo=n      Using  actimeo sets all of acregmin, acregmax, acdirmin,
96                      and acdirmax to the same value.   There  is  no  default
97                      value.
98
99       retry=n        The number of minutes to retry an NFS mount operation in
100                      the foreground or  background  before  giving  up.   The
101                      default  value  for  forground mounts is 2 minutes.  The
102                      default value for background mounts  is  10000  minutes,
103                      which is roughly one week.
104
105       namlen=n       When  an  NFS server does not support version two of the
106                      RPC mount protocol, this option can be used  to  specify
107                      the  maximum  length  of a filename that is supported on
108                      the remote filesystem.  This  is  used  to  support  the
109                      POSIX  pathconf  functions.   The default is 255 charac‐
110                      ters.
111
112       port=n         The numeric value of the port  to  connect  to  the  NFS
113                      server  on.   If the port number is 0 (the default) then
114                      query the remote host's portmapper for the  port  number
115                      to  use.   If the remote host's NFS daemon is not regis‐
116                      tered with its portmapper, the standard NFS port  number
117                      2049 is used instead.
118
119       mountport=n    The numeric value of the mountd port.
120
121       mounthost=name The name of the host running mountd .
122
123       mountprog=n    Use an alternate RPC program number to contact the mount
124                      daemon on the remote host.  This option  is  useful  for
125                      hosts  that  can  run multiple NFS servers.  The default
126                      value is 100005 which is the standard RPC  mount  daemon
127                      program number.
128
129       mountvers=n    Use an alternate RPC version number to contact the mount
130                      daemon on the remote host.  This option  is  useful  for
131                      hosts  that  can  run multiple NFS servers.  The default
132                      value depends on which kernel you are using.
133
134       nfsprog=n      Use an alternate RPC program number to contact  the  NFS
135                      daemon  on  the  remote host.  This option is useful for
136                      hosts that can run multiple NFS  servers.   The  default
137                      value  is  100003  which  is the standard RPC NFS daemon
138                      program number.
139
140       nfsvers=n      Use an alternate RPC version number to contact  the  NFS
141                      daemon  on  the  remote host.  This option is useful for
142                      hosts that can run multiple NFS  servers.   The  default
143                      value depends on which kernel you are using.
144
145       vers=n         vers is an alternative to nfsvers and is compatible with
146                      many other operating systems.
147
148       nolock         Disable NFS locking. Do not start lockd.  This is appro‐
149                      priate for mounting the root filesystem or /usr or /var.
150                      These filesystems are typically either read-only or  not
151                      shared,  and  in  those  cases,  remote  locking  is not
152                      needed.  This also needs to be used with  some  old  NFS
153                      servers that don't support locking.
154                      Note that applications can still get locks on files, but
155                      the locks only provide exclusion locally.  Other clients
156                      mounting  the same filesystem will not be able to detect
157                      the locks.
158
159       bg             If the first NFS mount  attempt  times  out,  retry  the
160                      mount  in  the  background.   After a mount operation is
161                      backgrounded, all subsequent  mounts  on  the  same  NFS
162                      server  will  be backgrounded immediately, without first
163                      attempting the mount.  A missing mount point is  treated
164                      as a timeout, to allow for nested NFS mounts.
165
166       fg             If  the  first  NFS  mount  attempt times out, retry the
167                      mount in the foreground.  This is the complement of  the
168                      bg option, and also the default behavior.
169
170       soft           If an NFS file operation has a major timeout then report
171                      an I/O error to the calling program.  The default is  to
172                      continue retrying NFS file operations indefinitely.
173
174       hard           If an NFS file operation has a major timeout then report
175                      "server not responding"  on  the  console  and  continue
176                      retrying indefinitely.  This is the default.
177
178       intr           If  an  NFS file operation has a major timeout and it is
179                      hard mounted, then allow signals to  interupt  the  file
180                      operation  and  cause  it to return EINTR to the calling
181                      program.  The default is to not allow file operations to
182                      be interrupted.
183
184       posix          Mount  the  NFS  filesystem using POSIX semantics.  This
185                      allows an NFS filesystem to properly support  the  POSIX
186                      pathconf  command  by  querying the mount server for the
187                      maximum length of a filename.  To do  this,  the  remote
188                      host must support version two of the RPC mount protocol.
189                      Many NFS servers support only version one.
190
191       nocto          Suppress the retrieval of new attributes when creating a
192                      file.
193
194       noac           Disable  all  forms of attribute caching entirely.  This
195                      extracts a significant performance penalty but it allows
196                      two different NFS clients to get reasonable results when
197                      both clients are actively writing to a common export  on
198                      the server.
199
200       noacl          Disables Access Control List (ACL) processing.
201
202       sec=mode       Set  the  security flavor for this mount to "mode".  The
203                      default setting is sec=sys, which uses local  unix  uids
204                      and  gids  to  authenticate  NFS  operations (AUTH_SYS).
205                      Other currently supported settings are: sec=krb5,  which
206                      uses  Kerberos V5 instead of local unix uids and gids to
207                      authenticate users; sec=krb5i, which  uses  Kerberos  V5
208                      for  user authentication and performs integrity checking
209                      of NFS operations using secure checksums to prevent data
210                      tampering;  and  sec=krb5p,  which  uses Kerberos V5 for
211                      user authentication and integrity checking, and encrypts
212                      NFS  traffic  to  prevent  traffic sniffing (this is the
213                      most secure setting).  Note that there is a  performance
214                      penalty when using integrity or privacy.
215
216       tcp            Mount  the  NFS filesystem using the TCP protocol.  This
217                      is the default if it is supported  by  both  client  and
218                      server.  Many NFS servers only support UDP.
219
220       udp            Mount the NFS filesystem using the UDP protocol.
221
222       nordirplus     Disables  NFSv3  READDIRPLUS  RPCs. Use this option when
223                      mounting servers that don't support or have broken READ‐
224                      DIRPLUS implementations.
225
226       nosharecache   As  of  kernel 2.6.18, it is no longer possible to mount
227                      the same same filesystem with different mount options to
228                      a  new mountpoint.  It was deemed unsafe to do so, since
229                      cached data cannot be  shared  between  the  two  mount‐
230                      points.  In  consequence, files or directories that were
231                      common to both mountpoint subtrees could often  be  seen
232                      to be out of sync following an update.
233                      This   option   allows   administrators  to  select  the
234                      pre-2.6.18 behaviour, permitting the same filesystem  to
235                      be mounted with different mount options.
236                      Beware: Use of this option is not recommended unless you
237                      are certain that there are no hard links or subtrees  of
238                      this mountpoint that are mounted elsewhere.
239
240       All  of  the  non-value options have corresponding nooption forms.  For
241       example, nointr means don't allow file operations to be interrupted.
242
243   Options for the nfs4 file system type
244       rsize=n        The number of bytes nfs4 uses when  reading  files  from
245                      the  server.  The rsize is negotiated between the server
246                      and client to determine the largest block size that both
247                      can  support.  The value specified by this option is the
248                      maximum size that could be  used;  however,  the  actual
249                      size  used may be smaller.  Note: Setting this size to a
250                      value less than the largest supported  block  size  will
251                      adversely affect performance.
252
253       wsize=n        The  number of bytes nfs4 uses when writing files to the
254                      server.  The wsize is negotiated between the server  and
255                      client to determine the largest block size that both can
256                      support.  The value specified by this option is the max‐
257                      imum  size  that could be used; however, the actual size
258                      used may be smaller.  Note: Setting this size to a value
259                      less   than   the  largest  supported  block  size  will
260                      adversely affect performance.
261
262       timeo=n        The value in tenths of a second before sending the first
263                      retransmission  after an RPC timeout.  The default value
264                      depends on whether proto=udp or proto=tcp is  in  effect
265                      (see below).  The default value for UDP is 7 tenths of a
266                      second.  The default value for TCP is 60 seconds.  After
267                      the  first  timeout,  the  timeout is doubled after each
268                      successive timeout until a maximum timeout of 60 seconds
269                      is reached or the enough retransmissions have occured to
270                      cause a major timeout.  Then, if the filesystem is  hard
271                      mounted,  each new timeout cascade restarts at twice the
272                      initial value of the previous cascade, again doubling at
273                      each  retransmission.   The maximum timeout is always 60
274                      seconds.
275
276       retrans=n      The number of minor timeouts  and  retransmissions  that
277                      must  occur  before a major timeout occurs.  The default
278                      is  5  timeouts  for  proto=udp  and  2   timeouts   for
279                      proto=tcp.  When a major timeout occurs, the file opera‐
280                      tion is either aborted or a "server not responding" mes‐
281                      sage is printed on the console.
282
283       acregmin=n     The minimum time in seconds that attributes of a regular
284                      file should be cached before requesting  fresh  informa‐
285                      tion from a server.  The default is 3 seconds.
286
287       acregmax=n     The maximum time in seconds that attributes of a regular
288                      file can be cached before requesting  fresh  information
289                      from a server.  The default is 60 seconds.
290
291       acdirmin=n     The  minimum time in seconds that attributes of a direc‐
292                      tory should be cached before requesting  fresh  informa‐
293                      tion from a server.  The default is 30 seconds.
294
295       acdirmax=n     The  maximum time in seconds that attributes of a direc‐
296                      tory can be cached before requesting  fresh  information
297                      from a server.  The default is 60 seconds.
298
299       actimeo=n      Using  actimeo sets all of acregmin, acregmax, acdirmin,
300                      and acdirmax to the same value.   There  is  no  default
301                      value.
302
303       retry=n        The number of minutes to retry an NFS mount operation in
304                      the foreground or  background  before  giving  up.   The
305                      default  value  for  forground mounts is 2 minutes.  The
306                      default value for background mounts  is  10000  minutes,
307                      which is roughly one week.
308
309       port=n         The  numeric  value  of  the  port to connect to the NFS
310                      server on.  If the port number is 0 (the  default)  then
311                      query  the  remote host's portmapper for the port number
312                      to use.  If the remote host's NFS daemon is  not  regis‐
313                      tered  with its portmapper, the standard NFS port number
314                      2049 is used instead.
315
316       proto=n        Mount the NFS filesystem using a specific network proto‐
317                      col  instead of the default UDP protocol.  Many NFS ver‐
318                      sion 4 servers only support TCP.  Valid  protocol  types
319                      are udp and tcp.
320
321       clientaddr=n   On a multi-homed client, this causes the client to use a
322                      specific callback address when communicating with an NFS
323                      version 4 server.  This option is currently ignored.
324
325       sec=mode       Same  as  sec=mode  for  the  nfs  filesystem  type (see
326                      above).
327
328       bg             If an NFS mount attempt times out, retry  the  mount  in
329                      the  background.   After  a  mount  operation  is  back‐
330                      grounded, all subsequent mounts on the same  NFS  server
331                      will be backgrounded immediately, without first attempt‐
332                      ing the mount.  A missing mount point is  treated  as  a
333                      timeout, to allow for nested NFS mounts.
334
335       fg             If  the  first  NFS  mount  attempt times out, retry the
336                      mount in the foreground.  This is the complement of  the
337                      bg option, and also the default behavior.
338
339       soft           If an NFS file operation has a major timeout then report
340                      an I/O error to the calling program.  The default is  to
341                      continue retrying NFS file operations indefinitely.
342
343       hard           If an NFS file operation has a major timeout then report
344                      "server not responding"  on  the  console  and  continue
345                      retrying indefinitely.  This is the default.
346
347       intr           If  an  NFS file operation has a major timeout and it is
348                      hard mounted, then allow signals to  interupt  the  file
349                      operation  and  cause  it to return EINTR to the calling
350                      program.  The default is to not allow file operations to
351                      be interrupted.
352
353       nocto          Suppress the retrieval of new attributes when creating a
354                      file.
355
356       noac           Disable attribute caching, and force synchronous writes.
357                      This extracts a server performance penalty but it allows
358                      two different NFS clients to get reasonable good results
359                      when   both  clients  are  actively  writing  to  common
360                      filesystem on the server.
361
362       nosharecache   As of kernel 2.6.18, it is no longer possible  to  mount
363                      the same same filesystem with different mount options to
364                      a new mountpoint.  It was deemed unsafe to do so,  since
365                      cached  data  cannot  be  shared  between the two mount‐
366                      points. In consequence, files or directories  that  were
367                      common  to  both mountpoint subtrees could often be seen
368                      to be out of sync following an update.
369                      This  option  allows  administrators   to   select   the
370                      pre-2.6.18  behaviour, permitting the same filesystem to
371                      be mounted with different mount options.
372                      Beware: Use of this option is not recommended unless you
373                      are  certain that there are no hard links or subtrees of
374                      this mountpoint that are mounted elsewhere.
375
376       All of the non-value options have corresponding  nooption  forms.   For
377       example, nointr means don't allow file operations to be interrupted.
378

FILES

380       /etc/fstab
381

SEE ALSO

383       fstab(5), mount(8), umount(8), exports(5)
384

AUTHOR

386       "Rick Sladkey" <jrs@world.std.com>
387

BUGS

389       Checking  files  on NFS filesystem referenced by file descriptors (i.e.
390       the fcntl and ioctl families of functions)  may  lead  to  inconsistent
391       result  due  to the lack of consistency check in kernel even if noac is
392       used.
393
394
395
396Linux 0.99                     20 November 1993                         NFS(5)
Impressum