Sort some SEE ALSOs in manual pages.
[dragonfly.git] / sbin / mount_nfs / mount_nfs.8
1 .\" Copyright (c) 1992, 1993, 1994, 1995
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95
33 .\"
34 .\" $FreeBSD: src/sbin/mount_nfs/mount_nfs.8,v 1.18.2.10 2003/05/13 14:45:40 trhodes Exp $
35 .\" $DragonFly: src/sbin/mount_nfs/mount_nfs.8,v 1.6 2008/05/01 23:36:43 swildner Exp $
36 .\""
37 .Dd March 29, 1995
38 .Dt MOUNT_NFS 8
39 .Os
40 .Sh NAME
41 .Nm mount_nfs
42 .Nd mount nfs file systems
43 .Sh SYNOPSIS
44 .Nm
45 .Op Fl 23KNPTUbcdils
46 .Op Fl D Ar deadthresh
47 .Op Fl I Ar readdirsize
48 .Op Fl R Ar retrycnt
49 .Op Fl a Ar maxreadahead
50 .Op Fl g Ar maxgroups
51 .Op Fl m Ar realm
52 .Op Fl o Ar options
53 .Op Fl r Ar readsize
54 .Op Fl t Ar timeout
55 .Op Fl w Ar writesize
56 .Op Fl x Ar retrans
57 .Ar rhost : Ns Ar path node
58 .Sh DESCRIPTION
59 The
60 .Nm
61 command
62 calls the
63 .Xr mount 2
64 system call to prepare and graft a remote nfs file system
65 .Pq Ar rhost : Ns Ar path
66 on to the file system tree at the point
67 .Ar node .
68 This command is normally executed by
69 .Xr mount 8 .
70 It implements the mount protocol as described in RFC 1094, Appendix A and
71 .%T "NFS: Network File System Version 3 Protocol Specification" ,
72 Appendix I.
73 .Pp
74 By default,
75 .Nm
76 keeps retrying until the mount succeeds.
77 This behaviour is intended for filesystems listed in
78 .Xr fstab 5
79 that are critical to the boot process.
80 For non-critical filesystems, the
81 .Fl b
82 and
83 .Fl R
84 flags provide mechanisms to prevent the boot process from hanging
85 if the server is unavailable.
86 .Pp
87 If the server becomes unresponsive while an NFS filesystem is
88 mounted, any new or outstanding file operations on that filesystem
89 will hang uninterruptibly until the server comes back.
90 To modify this default behaviour, see the
91 .Fl i
92 and
93 .Fl s
94 flags.
95 .Pp
96 The options are:
97 .Bl -tag -width indent
98 .It Fl 2
99 Use the NFS Version 2 protocol (the default is to try version 3 first
100 then version 2).
101 Note that NFS version 2 has a file size limit of 2 gigabytes.
102 .It Fl 3
103 Use the NFS Version 3 protocol.
104 .It Fl D
105 Used to set the
106 .Dq "dead server threshold"
107 to the specified number of round trip timeout intervals.
108 After a
109 .Dq "dead server threshold"
110 of retransmit timeouts,
111 cached data for the unresponsive server is assumed to still be valid.
112 Values may be set in the range of 1 - 9, with 9 referring to an
113 .Dq "infinite dead threshold"
114 (i.e. never assume cached data still valid).
115 This option is not generally recommended and is really an experimental
116 feature.
117 .It Fl I
118 Set the readdir read size to the specified value.
119 The value should normally
120 be a multiple of DIRBLKSIZ that is \(<= the read size for the mount.
121 .It Fl K
122 Pass Kerberos authenticators to the server for client-to-server
123 user-credential mapping.
124 This requires that the kernel be built with the NFSKERB option.
125 The use of this option will prevent the kernel from compiling
126 unless calls to the appropriate Kerberos encryption routines
127 are provided in the NFS source.
128 (Refer to RFC 2695
129 .%T "Authentication Mechanisms for ONC RPC" ,
130 for more information.)
131 .It Fl N
132 Do
133 .Em not
134 use a reserved socket port number (see below).
135 .It Fl P
136 Use a reserved socket port number.
137 This flag is obsolete, and only retained for compatibility reasons.
138 Reserved port numbers are used by default now.
139 (For the rare case where the client has a trusted root account
140 but untrustworthy users and the network cables are in secure areas this does
141 help, but for normal desktop clients this does not apply.)
142 .It Fl R
143 Set the mount retry count to the specified value.
144 The default is a retry count of zero, which means to keep retrying
145 forever.
146 There is a 60 second delay between each attempt.
147 .It Fl T
148 Use TCP transport instead of UDP.
149 This is recommended for servers that are not on the same LAN cable as
150 the client.
151 This is the default.
152 .It Fl U
153 Use UDP transport instead of TCP.
154 This is not recommended due to the ease of which
155 .Dx
156 clients can blow out available socket buffer space on the server,
157 not to mention the impossibility of accurately calculating the
158 proper retry interval due to disk I/O backlogs on the server.
159 If you want to use the option anyway it is recommended that the
160 server reserve upwards of 2 MBytes of socket buffer space to hold
161 the received UDP packets.
162 .It Fl a
163 Set the read-ahead count to the specified value.
164 This may be in the range of 0 - 32, and determines how many blocks
165 will be read ahead when a large file is being read sequentially.
166 Trying a value greater than 1 for this is suggested for
167 mounts with a large bandwidth * delay product.
168 .It Fl b
169 If an initial attempt to contact the server fails, fork off a child to keep
170 trying the mount in the background.
171 Useful for
172 .Xr fstab 5 ,
173 where the filesystem mount is not critical to multiuser operation.
174 .It Fl c
175 For UDP mount points, do not do a
176 .Xr connect 2 .
177 This must be used if the server does not reply to requests from the standard
178 NFS port number 2049 or replies to requests using a different IP address
179 (which can occur if the server is multi-homed).
180 Setting the
181 .Va vfs.nfs.nfs_ip_paranoia
182 sysctl to 0 will make this option the default.
183 .It Fl d
184 Turn off the dynamic retransmit timeout estimator.
185 This may be useful for UDP mounts that exhibit high retry rates,
186 since it is possible that the dynamically estimated timeout interval is too
187 short.
188 .It Fl g
189 Set the maximum size of the group list for the credentials to the
190 specified value.
191 This should be used for mounts on old servers that cannot handle a
192 group list size of 16, as specified in RFC 1057.
193 Try 8, if users in a lot of groups cannot get response from the mount
194 point.
195 .It Fl i
196 Make the mount interruptible, which implies that file system calls that
197 are delayed due to an unresponsive server will fail with
198 .Er EINTR
199 when a termination signal is posted for the process.
200 .It Fl l
201 Used with NFSV3 to specify that the
202 .Em ReaddirPlus
203 RPC should be used.
204 This option reduces RPC traffic for cases such as
205 .Dq "ls -l" ,
206 but tends to flood the attribute and name caches with prefetched entries.
207 Try this option and see whether performance improves or degrades.
208 Probably
209 most useful for client to server network interconnects with a large bandwidth
210 times delay product.
211 This is the default.
212 .It Fl m
213 Set the Kerberos realm to the string argument.
214 Used with the
215 .Fl K
216 option for mounts to other realms.
217 .It Fl o
218 Options are specified with a
219 .Fl o
220 flag followed by a comma separated string of options.
221 See the
222 .Xr mount 8
223 man page for possible options and their meanings.
224 The following NFS specific option is also available:
225 .Bl -tag -width indent
226 .It Cm port Ns =<port_number>
227 Use specified port number for NFS requests.
228 The default is to query the portmapper for the NFS port.
229 .It Cm acregmin Ns =<seconds>
230 .It Cm acregmax Ns =<seconds>
231 .It Cm acdirmin Ns =<seconds>
232 .It Cm acdirmax Ns =<seconds>
233 When attributes of files are cached, a timeout calculated to determine
234 whether a given cache entry has expired.
235 These four values determine the
236 upper and lower bounds of the timeouts for ``directory'' attributes and
237 ``regular'' (i.e.: everything else).
238 The default values are 3 -> 60 seconds
239 for regular files, and 30 -> 60 seconds for directories.
240 The algorithm to
241 calculate the timeout is based on the age of the file.
242 The older the file,
243 the longer the cache is considered valid, subject to the limits above.
244 .It Cm bg
245 Same as
246 .Fl b .
247 .It Cm cache
248 Set
249 .Cm cache
250 .Xr chflags 2
251 flag on mount point (recursive, does not cross mounts).
252 NFS does not support
253 .Xr chflags 2 ,
254 this is alternate method to set flag.
255 .Cm cache
256 flag is used by
257 .Xr swapcache 8 .
258 .It Cm conn
259 Same as not specifying
260 .Fl c .
261 .It Cm dumbtimer
262 Same as
263 .Fl d .
264 .It Cm intr
265 Same as
266 .Fl i .
267 .It Cm kerb
268 Same as
269 .Fl K .
270 .It Cm nfsv2
271 Same as
272 .Fl 2 .
273 .It Cm nfsv3
274 Same as
275 .Fl 3 .
276 .It Cm rdirplus
277 Same as
278 .Fl l .
279 .It Cm mntudp
280 Same as
281 .Fl U
282 (obsolete).
283 .It Cm resvport
284 Same as
285 .Fl P .
286 .It Cm soft
287 Same as
288 .Fl s .
289 .It Cm tcp
290 Same as
291 .Fl T .
292 .It Cm udp
293 Same as
294 .Fl U .
295 .El
296 .It Fl r
297 Set the read data size to the specified value.
298 It should normally be a power of 2 greater than or equal to 1024.
299 This should be used for UDP mounts when the
300 .Dq "fragments dropped due to timeout"
301 value is getting large while actively using a mount point.
302 (Use
303 .Xr netstat 1
304 with the
305 .Fl s
306 option to see what the
307 .Dq "fragments dropped due to timeout"
308 value is.)
309 See the
310 .Fl w
311 option as well.
312 .It Fl s
313 A soft mount, which implies that file system calls will fail after
314 .Em Retry
315 round trip timeout intervals.
316 .It Fl t
317 Set the initial retransmit timeout to the specified value.
318 May be useful for fine tuning UDP mounts over internetworks
319 with high packet loss rates or an overloaded server.
320 Try increasing the interval if
321 .Xr nfsstat 1
322 shows high retransmit rates while the file system is active or reducing the
323 value if there is a low retransmit rate but long response delay observed.
324 (Normally, the
325 .Fl d
326 option should be specified when using this option to manually
327 tune the timeout
328 interval.)
329 .It Fl w
330 Set the write data size to the specified value.
331 Ditto the comments w.r.t.\& the
332 .Fl r
333 option, but using the
334 .Dq "fragments dropped due to timeout"
335 value on the server instead of the client.
336 Note that both the
337 .Fl r
338 and
339 .Fl w
340 options should only be used as a last ditch effort at improving performance
341 when mounting servers that do not support TCP mounts.
342 .It Fl x
343 Set the retransmit timeout count for soft mounts to the specified value.
344 .El
345 .Sh SEE ALSO
346 .Xr netstat 1 ,
347 .Xr nfsstat 1 ,
348 .Xr mount 2 ,
349 .Xr unmount 2 ,
350 .Xr fstab 5 ,
351 .Xr mount 8 ,
352 .Xr nfsd 8 ,
353 .Xr showmount 8 ,
354 .Xr swapcache 8
355 .Sh BUGS
356 Due to the way that Sun RPC is implemented on top of UDP (unreliable datagram)
357 transport, tuning such mounts is really a black art that can only be expected
358 to have limited success.
359 For clients mounting servers that are not on the same
360 LAN cable or that tend to be overloaded,
361 TCP transport is strongly recommended,
362 but unfortunately this is restricted to mostly
363 .Bx 4.4
364 servers.
365 .Pp
366 NFS does not support
367 .Xr chflags 2 .