]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/mount/nfs.man
Update the nfs.5 manpage
[nfs-utils.git] / utils / mount / nfs.man
1 .\" nfs.5 "Rick Sladkey" <jrs@world.std.com>
2 .\" Wed Feb  8 12:52:42 1995, faith@cs.unc.edu: updates for Ross Biro's
3 .\" patches. "
4 .TH NFS 5 "20 November 1993" "Linux 0.99" "Linux Programmer's Manual"
5 .SH NAME
6 nfs \- nfs and nfs4 fstab format and options
7 .SH SYNOPSIS
8 .B /etc/fstab
9 .SH DESCRIPTION
10 The
11 .I fstab
12 file contains information about which filesystems
13 to mount where and with what options.
14 For NFS mounts, it contains the server name and
15 exported server directory to mount from,
16 the local directory that is the mount point,
17 and the NFS specific options that control
18 the way the filesystem is mounted.
19 .P
20 Three different versions of the NFS protocol are
21 supported by the Linux NFS client:
22 NFS version 2, NFS version 3, and NFS version 4.
23 To mount via NFS version 2, use the
24 .BR nfs
25 file system type and specify
26 .BR nfsvers=2 .
27 To mount via NFS version 3, use the
28 .BR nfs
29 file system type and specify
30 .BR nfsvers=3 .
31 Version 3 is the default protocol version for the
32 .BR nfs
33 file system type when
34 .BR nfsvers=
35 is not specified on the mount command and both client and server
36 support it.
37 To mount via NFS version 4, use the
38 .BR nfs4
39 file system type.
40 The
41 .BR nfsvers=
42 keyword is not supported for the
43 .BR nfs4
44 file system type.
45 .P
46 These file system types share similar mount options;
47 the differences are listed below.
48 .P
49 Here is an example from an \fI/etc/fstab\fP file for an NFSv3 mount
50 over TCP.
51 .sp
52 .nf
53 .ta 2.5i +0.75i +0.75i +1.0i
54 server:/usr/local/pub   /pub    nfs     rsize=32768,wsize=32768,timeo=14,intr
55 .fi
56 .P
57 Here is an example for an NFSv4 mount over TCP using Kerberos
58 5 mutual authentication.
59 .sp
60 .nf
61 .ta 2.5i +0.75i +0.75i +1.0i
62 server:/usr/local/pub   /pub    nfs4    proto=tcp,sec=krb5,hard,intr
63 .fi
64 .DT
65 .SS Options for the nfs file system type
66 .TP 1.5i
67 .I rsize=n
68 The number of bytes NFS uses when reading files from an NFS server.
69 The rsize is negotiated between the server and client to determine 
70 the largest block size that both can support.
71 The value specified by this option is the maximum size that could 
72 be used; however, the actual size used may be smaller.
73 Note: Setting this size to a value less than the largest supported
74 block size will adversely affect performance.
75 .TP 1.5i
76 .I wsize=n
77 The number of bytes NFS uses when writing files to an NFS server.
78 The wsize is negotiated between the server and client to determine 
79 the largest block size that both can support.
80 The value specified by this option is the maximum size that could 
81 be used; however, the actual size used may be smaller.
82 Note: Setting this size to a value less than the largest supported
83 block size will adversely affect performance.
84 .TP 1.5i
85 .I timeo=n
86 The value in tenths of a second before sending the
87 first retransmission after an RPC timeout.
88 The default value is 7 tenths of a second.  After the first timeout,
89 the timeout is doubled after each successive timeout until a maximum
90 timeout of 60 seconds is reached or the enough retransmissions
91 have occured to cause a major timeout.  Then, if the filesystem
92 is hard mounted, each new timeout cascade restarts at twice the
93 initial value of the previous cascade, again doubling at each
94 retransmission.  The maximum timeout is always 60 seconds.
95 Better overall performance may be achieved by increasing the
96 timeout when mounting on a busy network, to a slow server, or through
97 several routers or gateways.
98 .TP 1.5i
99 .I retrans=n
100 The number of minor timeouts and retransmissions that must occur before
101 a major timeout occurs.  The default is 3 timeouts.  When a major timeout
102 occurs, the file operation is either aborted or a "server not responding"
103 message is printed on the console.
104 .TP 1.5i
105 .I acregmin=n
106 The minimum time in seconds that attributes of a regular file should
107 be cached before requesting fresh information from a server.
108 The default is 3 seconds.
109 .TP 1.5i
110 .I acregmax=n
111 The maximum time in seconds that attributes of a regular file can
112 be cached before requesting fresh information from a server.
113 The default is 60 seconds.
114 .TP 1.5i
115 .I acdirmin=n
116 The minimum time in seconds that attributes of a directory should
117 be cached before requesting fresh information from a server.
118 The default is 30 seconds.
119 .TP 1.5i
120 .I acdirmax=n
121 The maximum time in seconds that attributes of a directory can
122 be cached before requesting fresh information from a server.
123 The default is 60 seconds.
124 .TP 1.5i
125 .I actimeo=n
126 Using actimeo sets all of
127 .I acregmin,
128 .I acregmax,
129 .I acdirmin,
130 and
131 .I acdirmax
132 to the same value.
133 There is no default value.
134 .TP 1.5i
135 .I retry=n
136 The number of minutes to retry an NFS mount operation
137 in the foreground or background before giving up.
138 The default value for forground mounts is 2 minutes.  
139 The default value for background mounts is 10000 minutes, 
140 which is roughly one week.
141 .TP 1.5i
142 .I namlen=n
143 When an NFS server does not support version two of the
144 RPC mount protocol, this option can be used to specify
145 the maximum length of a filename that is supported on
146 the remote filesystem.  This is used to support the
147 POSIX pathconf functions.  The default is 255 characters.
148 .TP 1.5i
149 .I port=n
150 The numeric value of the port to connect to the NFS server on.
151 If the port number is 0 (the default) then query the
152 remote host's portmapper for the port number to use.
153 If the remote host's NFS daemon is not registered with
154 its portmapper, the standard NFS port number 2049 is
155 used instead.
156 .TP 1.5i
157 .I mountport=n
158 The numeric value of the
159 .B mountd
160 port.
161 .TP 1.5i
162 .I mounthost=name
163 The name of the host running
164 .B mountd .
165 .TP 1.5i
166 .I mountprog=n
167 Use an alternate RPC program number to contact the
168 mount daemon on the remote host.  This option is useful
169 for hosts that can run multiple NFS servers.
170 The default value is 100005 which is the standard RPC
171 mount daemon program number.
172 .TP 1.5i
173 .I mountvers=n
174 Use an alternate RPC version number to contact the
175 mount daemon on the remote host.  This option is useful
176 for hosts that can run multiple NFS servers.
177 The default value depends on which kernel you are using.
178 .TP 1.5i
179 .I nfsprog=n
180 Use an alternate RPC program number to contact the
181 NFS daemon on the remote host.  This option is useful
182 for hosts that can run multiple NFS servers.
183 The default value is 100003 which is the standard RPC
184 NFS daemon program number.
185 .TP 1.5i
186 .I nfsvers=n
187 Use an alternate RPC version number to contact the
188 NFS daemon on the remote host.  This option is useful
189 for hosts that can run multiple NFS servers.
190 The default value depends on which kernel you are using.
191 .TP 1.5i
192 .I vers=n
193 vers is an alternative to nfsvers and is compatible with
194 many other operating systems.
195 .TP 1.5i
196 .I nolock
197 Disable NFS locking. Do not start lockd.
198 This has to be used with some old NFS servers
199 that don't support locking.  Note that applications can
200 still get locks on files, but the locks only provide exclusion
201 locally.  Other clients mounting the same filesystem
202 will not be able to detect the locks.
203 .TP 1.5i
204 .I bg
205 If the first NFS mount attempt times out, retry the mount
206 in the background.
207 After a mount operation is backgrounded, all subsequent mounts
208 on the same NFS server will be backgrounded immediately, without
209 first attempting the mount.
210 A missing mount point is treated as a timeout,
211 to allow for nested NFS mounts.
212 .TP 1.5i
213 .I fg
214 If the first NFS mount attempt times out, retry the mount
215 in the foreground.
216 This is the complement of the
217 .I bg
218 option, and also the default behavior.
219 .TP 1.5i
220 .I soft
221 If an NFS file operation has a major timeout then report an I/O error to
222 the calling program.
223 The default is to continue retrying NFS file operations indefinitely.
224 .TP 1.5i
225 .I hard
226 If an NFS file operation has a major timeout then report
227 "server not responding" on the console and continue retrying indefinitely.
228 This is the default.
229 .TP 1.5i
230 .I intr
231 If an NFS file operation has a major timeout and it is hard mounted,
232 then allow signals to interupt the file operation and cause it to
233 return EINTR to the calling program.  The default is to not
234 allow file operations to be interrupted.
235 .TP 1.5i
236 .I posix
237 Mount the NFS filesystem using POSIX semantics.  This allows
238 an NFS filesystem to properly support the POSIX pathconf
239 command by querying the mount server for the maximum length
240 of a filename.  To do this, the remote host must support version
241 two of the RPC mount protocol.  Many NFS servers support only
242 version one.
243 .TP 1.5i
244 .I nocto
245 Suppress the retrieval of new attributes when creating a file.
246 .TP 1.5i
247 .I noac
248 Disable all forms of attribute caching entirely.  This extracts a
249 significant performance penalty but it allows two different NFS clients
250 to get reasonable results when both clients are actively
251 writing to a common export on the server.
252 .TP 1.5i
253 .I noacl
254 Disables Access Control List (ACL) processing.
255 .TP 1.5i
256 .I sec=mode
257 Set the security flavor for this mount to "mode".
258 The default setting is \f3sec=sys\f1, which uses local
259 unix uids and gids to authenticate NFS operations (AUTH_SYS).
260 Other currently supported settings are:
261 \f3sec=krb5\f1, which uses Kerberos V5 instead of local unix uids
262 and gids to authenticate users;
263 \f3sec=krb5i\f1, which uses Kerberos V5 for user authentication
264 and performs integrity checking of NFS operations using secure
265 checksums to prevent data tampering; and
266 \f3sec=krb5p\f1, which uses Kerberos V5 for user authentication
267 and integrity checking, and encrypts NFS traffic to prevent
268 traffic sniffing (this is the most secure setting).
269 Note that there is a performance penalty when using integrity
270 or privacy.
271 .TP 1.5i
272 .I tcp
273 Mount the NFS filesystem using the TCP protocol.  This is the default
274 if it is supported by both client and server.  Many NFS servers only
275 support UDP.
276 .TP 1.5i
277 .I udp
278 Mount the NFS filesystem using the UDP protocol.
279 .P
280 All of the non-value options have corresponding nooption forms.
281 For example, nointr means don't allow file operations to be
282 interrupted.
283 .SS Options for the nfs4 file system type
284 .TP 1.5i
285 .I rsize=n
286 The number of bytes nfs4 uses when reading files from the server.
287 The rsize is negotiated between the server and client to determine 
288 the largest block size that both can support.
289 The value specified by this option is the maximum size that could 
290 be used; however, the actual size used may be smaller.
291 Note: Setting this size to a value less than the largest supported
292 block size will adversely affect performance.
293 .TP 1.5i
294 .I wsize=n
295 The number of bytes nfs4 uses when writing files to the server.
296 The wsize is negotiated between the server and client to determine 
297 the largest block size that both can support.
298 The value specified by this option is the maximum size that could 
299 be used; however, the actual size used may be smaller.
300 Note: Setting this size to a value less than the largest supported
301 block size will adversely affect performance.
302 .TP 1.5i
303 .I timeo=n
304 The value in tenths of a second before sending the
305 first retransmission after an RPC timeout.
306 The default value depends on whether
307 .IR proto=udp
308 or
309 .IR proto=tcp
310 is in effect (see below).
311 The default value for UDP is 7 tenths of a second.
312 The default value for TCP is 60 seconds.
313 After the first timeout,
314 the timeout is doubled after each successive timeout until a maximum
315 timeout of 60 seconds is reached or the enough retransmissions
316 have occured to cause a major timeout.  Then, if the filesystem
317 is hard mounted, each new timeout cascade restarts at twice the
318 initial value of the previous cascade, again doubling at each
319 retransmission.  The maximum timeout is always 60 seconds.
320 .TP 1.5i
321 .I retrans=n
322 The number of minor timeouts and retransmissions that must occur before
323 a major timeout occurs.  The default is 5 timeouts for
324 .IR proto=udp
325 and 2 timeouts for
326 .IR proto=tcp .
327 When a major timeout
328 occurs, the file operation is either aborted or a "server not responding"
329 message is printed on the console.
330 .TP 1.5i
331 .I acregmin=n
332 The minimum time in seconds that attributes of a regular file should
333 be cached before requesting fresh information from a server.
334 The default is 3 seconds.
335 .TP 1.5i
336 .I acregmax=n
337 The maximum time in seconds that attributes of a regular file can
338 be cached before requesting fresh information from a server.
339 The default is 60 seconds.
340 .TP 1.5i
341 .I acdirmin=n
342 The minimum time in seconds that attributes of a directory should
343 be cached before requesting fresh information from a server.
344 The default is 30 seconds.
345 .TP 1.5i
346 .I acdirmax=n
347 The maximum time in seconds that attributes of a directory can
348 be cached before requesting fresh information from a server.
349 The default is 60 seconds.
350 .TP 1.5i
351 .I actimeo=n
352 Using actimeo sets all of
353 .I acregmin,
354 .I acregmax,
355 .I acdirmin,
356 and
357 .I acdirmax
358 to the same value.
359 There is no default value.
360 .TP 1.5i
361 .I retry=n
362 The number of minutes to retry an NFS mount operation
363 in the foreground or background before giving up.
364 The default value for forground mounts is 2 minutes.  
365 The default value for background mounts is 10000 minutes, 
366 which is roughly one week.
367 .TP 1.5i
368 .I port=n
369 The numeric value of the port to connect to the NFS server on.
370 If the port number is 0 (the default) then query the
371 remote host's portmapper for the port number to use.
372 If the remote host's NFS daemon is not registered with
373 its portmapper, the standard NFS port number 2049 is
374 used instead.
375 .TP 1.5i
376 .I proto=n
377 Mount the NFS filesystem using a specific network protocol
378 instead of the default UDP protocol.
379 Many NFS version 4 servers only support TCP.
380 Valid protocol types are
381 .IR udp
382 and
383 .IR tcp .
384 .TP 1.5i
385 .I clientaddr=n
386 On a multi-homed client, this
387 causes the client to use a specific callback address when
388 communicating with an NFS version 4 server.
389 This option is currently ignored.
390 .TP 1.5i
391 .I sec=mode
392 Same as \f3sec=mode\f1 for the nfs filesystem type (see above).
393 .TP 1.5i
394 .I bg
395 If an NFS mount attempt times out, retry the mount
396 in the background.
397 After a mount operation is backgrounded, all subsequent mounts
398 on the same NFS server will be backgrounded immediately, without
399 first attempting the mount.
400 A missing mount point is treated as a timeout,
401 to allow for nested NFS mounts.
402 .TP 1.5i
403 .I fg
404 If the first NFS mount attempt times out, retry the mount
405 in the foreground.
406 This is the complement of the
407 .I bg
408 option, and also the default behavior.
409 .TP 1.5i
410 .I soft
411 If an NFS file operation has a major timeout then report an I/O error to
412 the calling program.
413 The default is to continue retrying NFS file operations indefinitely.
414 .TP 1.5i
415 .I hard
416 If an NFS file operation has a major timeout then report
417 "server not responding" on the console and continue retrying indefinitely.
418 This is the default.
419 .TP 1.5i
420 .I intr
421 If an NFS file operation has a major timeout and it is hard mounted,
422 then allow signals to interupt the file operation and cause it to
423 return EINTR to the calling program.  The default is to not
424 allow file operations to be interrupted.
425 .TP 1.5i
426 .I nocto
427 Suppress the retrieval of new attributes when creating a file.
428 .TP 1.5i
429 .I noac
430 Disable attribute caching, and force synchronous writes.
431 This extracts a
432 server performance penalty but it allows two different NFS clients
433 to get reasonable good results when both clients are actively
434 writing to common filesystem on the server.
435 .P
436 All of the non-value options have corresponding nooption forms.
437 For example, nointr means don't allow file operations to be
438 interrupted.
439 .SH FILES
440 .I /etc/fstab
441 .SH "SEE ALSO"
442 .BR fstab "(5), " mount "(8), " umount "(8), " exports (5)
443 .SH AUTHOR
444 "Rick Sladkey" <jrs@world.std.com>
445 .SH BUGS
446 .P
447 Checking files on NFS filesystem referenced by file descriptors (i.e. the 
448 .BR fcntl 
449 and 
450 .BR ioctl
451 families of functions) may lead to inconsistent result due to the lack of
452 consistency check in kernel even if noac is used.