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