Merge from vendor branch GDB:
[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.2 2003/06/17 04:27:33 dillon 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 23KNPTUbcdilqs
46 .Op Fl D Ar deadthresh
47 .Op Fl I Ar readdirsize
48 .Op Fl L Ar leaseterm
49 .Op Fl R Ar retrycnt
50 .Op Fl a Ar maxreadahead
51 .Op Fl g Ar maxgroups
52 .Op Fl m Ar realm
53 .Op Fl o Ar options
54 .Op Fl r Ar readsize
55 .Op Fl t Ar timeout
56 .Op Fl w Ar writesize
57 .Op Fl x Ar retrans
58 .Ar rhost : Ns Ar path node
59 .Sh DESCRIPTION
60 The
61 .Nm
62 command
63 calls the
64 .Xr mount 2
65 system call to prepare and graft a remote nfs file system
66 .Pq Ar rhost : Ns Ar path
67 on to the file system tree at the point
68 .Ar node .
69 This command is normally executed by
70 .Xr mount 8 .
71 It implements the mount protocol as described in RFC 1094, Appendix A and
72 .%T "NFS: Network File System Version 3 Protocol Specification" ,
73 Appendix I.
74 .Pp
75 By default,
76 .Nm
77 keeps retrying until the mount succeeds.
78 This behaviour is intended for filesystems listed in
79 .Xr fstab 5
80 that are critical to the boot process.
81 For non-critical filesystems, the
82 .Fl b
83 and
84 .Fl R
85 flags provide mechanisms to prevent the boot process from hanging
86 if the server is unavailable.
87 .Pp
88 If the server becomes unresponsive while an NFS filesystem is
89 mounted, any new or outstanding file operations on that filesystem
90 will hang uninterruptibly until the server comes back.
91 To modify this default behaviour, see the
92 .Fl i
93 and
94 .Fl s
95 flags.
96 .Pp
97 The options are:
98 .Bl -tag -width indent
99 .It Fl 2
100 Use the NFS Version 2 protocol (the default is to try version 3 first
101 then version 2).  Note that NFS version 2 has a file size limit of 2
102 gigabytes.
103 .It Fl 3
104 Use the NFS Version 3 protocol.
105 .It Fl D
106 Used with NQNFS to set the
107 .Dq "dead server threshold"
108 to the specified number of round trip timeout intervals.
109 After a
110 .Dq "dead server threshold"
111 of retransmit timeouts,
112 cached data for the unresponsive server is assumed to still be valid.
113 Values may be set in the range of 1 - 9, with 9 referring to an
114 .Dq "infinite dead threshold"
115 (i.e. never assume cached data still valid).
116 This option is not generally recommended and is really an experimental
117 feature.
118 .It Fl I
119 Set the readdir read size to the specified value.
120 The value should normally
121 be a multiple of DIRBLKSIZ that is <= the read size for the mount.
122 .It Fl K
123 Pass Kerberos authenticators to the server for client-to-server
124 user-credential mapping.
125 This requires that the kernel be built with the NFSKERB option.
126 The use of this option will prevent the kernel from compiling
127 unless calls to the appropriate Kerberos encryption routines
128 are provided in the NFS source.
129 (Refer to the INTERNET-DRAFT titled
130 .%T "Authentication Mechanisms for ONC RPC" ,
131 for more information.)
132 .It Fl L
133 Used with NQNFS to set the lease term to the specified number of seconds.
134 Only use this argument for mounts with a large round trip delay.
135 Values are normally in the 10-30 second range.
136 .It Fl N
137 Do
138 .Em not
139 use a reserved socket port number (see below).
140 .It Fl P
141 Use a reserved socket port number.
142 This flag is obsolete, and only retained for compatibility reasons.
143 Reserved port numbers are used by default now.
144 (For the rare case where the client has a trusted root account
145 but untrustworthy users and the network cables are in secure areas this does
146 help, but for normal desktop clients this does not apply.)
147 .It Fl R
148 Set the mount retry count to the specified value.
149 The default is a retry count of zero, which means to keep retrying
150 forever.
151 There is a 60 second delay between each attempt.
152 .It Fl T
153 Use TCP transport instead of UDP.
154 This is recommended for servers that are not on the same LAN cable as
155 the client.
156 (NB: This is NOT supported by most
157 .No non- Ns Bx
158 servers.)
159 .It Fl U
160 Force the mount protocol to use UDP transport, even for TCP NFS mounts.
161 (Necessary for some old
162 .Bx
163 servers.)
164 .It Fl a
165 Set the read-ahead count to the specified value.
166 This may be in the range of 0 - 4, and determines how many blocks
167 will be read ahead when a large file is being read sequentially.
168 Trying a value greater than 1 for this is suggested for
169 mounts with a large bandwidth * delay product.
170 .It Fl b
171 If an initial attempt to contact the server fails, fork off a child to keep
172 trying the mount in the background.
173 Useful for
174 .Xr fstab 5 ,
175 where the filesystem mount is not critical to multiuser operation.
176 .It Fl c
177 For UDP mount points, do not do a
178 .Xr connect 2 .
179 This must be used if the server does not reply to requests from the standard
180 NFS port number 2049 or replies to requests using a different IP address
181 (which can occur if the server is multi-homed).
182 Setting the
183 .Va vfs.nfs.nfs_ip_paranoia
184 sysctl to 0 will make this option the default.
185 .It Fl d
186 Turn off the dynamic retransmit timeout estimator.
187 This may be useful for UDP mounts that exhibit high retry rates,
188 since it is possible that the dynamically estimated timeout interval is too
189 short.
190 .It Fl g
191 Set the maximum size of the group list for the credentials to the
192 specified value.
193 This should be used for mounts on old servers that cannot handle a
194 group list size of 16, as specified in RFC 1057.
195 Try 8, if users in a lot of groups cannot get response from the mount
196 point.
197 .It Fl i
198 Make the mount interruptible, which implies that file system calls that
199 are delayed due to an unresponsive server will fail with EINTR when a
200 termination signal is posted for the process.
201 .It Fl l
202 Used with NQNFS and NFSV3 to specify that the \fBReaddirPlus\fR RPC should
203 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 .It Fl m
212 Set the Kerberos realm to the string argument.
213 Used with the
214 .Fl K
215 option for mounts to other realms.
216 .It Fl o
217 Options are specified with a
218 .Fl o
219 flag followed by a comma separated string of options.
220 See the
221 .Xr mount 8
222 man page for possible options and their meanings.
223 The following NFS specific option is also available:
224 .Bl -tag -width indent
225 .It port=<port_number>
226 Use specified port number for NFS requests.
227 The default is to query the portmapper for the NFS port.
228 .It acregmin=<seconds>
229 .It acregmax=<seconds>
230 .It acdirmin=<seconds>
231 .It acdirmax=<seconds>
232 When attributes of files are cached, a timeout calculated to determine
233 whether a given cache entry has expired.  These four values determine the
234 upper and lower bounds of the timeouts for ``directory'' attributes and
235 ``regular'' (ie: everything else).  The default values are 3 -> 60 seconds
236 for regular files, and 30 -> 60 seconds for directories.  The algorithm to
237 calculate the timeout is based on the age of the file.  The older the file,
238 the longer the cache is considered valid, subject to the limits above.
239 .El
240 .Pp
241 .Bl -tag -width "dumbtimerXX"
242 \fBHistoric \&-o options\fR
243 .Pp
244 Use of these options is deprecated, they are only mentioned here for
245 compatibility with historic versions of
246 .Nm .
247 .It bg
248 Same as
249 .Fl b .
250 .It conn
251 Same as not specifying
252 .Fl c .
253 .It dumbtimer
254 Same as
255 .Fl d .
256 .It intr
257 Same as
258 .Fl i .
259 .It kerb
260 Same as
261 .Fl K .
262 .It nfsv2
263 Same as
264 .Fl 2 .
265 .It nfsv3
266 Same as
267 .Fl 3 .
268 .It rdirplus
269 Same as
270 .Fl l .
271 .It mntudp
272 Same as
273 .Fl U .
274 .It resvport
275 Same as
276 .Fl P .
277 .It nqnfs
278 Same as
279 .Fl q .
280 .It soft
281 Same as
282 .Fl s .
283 .It tcp
284 Same as
285 .Fl T .
286 .El
287 .It Fl q
288 Use the Not Quite NFS (NQNFS) protocol.
289 This experimental protocol is NFS Version 2 with leasing extensions
290 similar to those found in NFS Version 3.
291 The interoperability of this protocol with other systems is
292 very limited and its implementation is not widely used.
293 Do not use this option unless you know exactly what you are doing!
294 .It Fl r
295 Set the read data size to the specified value.
296 It should normally be a power of 2 greater than or equal to 1024.
297 This should be used for UDP mounts when the
298 .Dq "fragments dropped due to timeout"
299 value is getting large while actively using a mount point.
300 (Use
301 .Xr netstat 1
302 with the
303 .Fl s
304 option to see what the
305 .Dq "fragments dropped due to timeout"
306 value is.)
307 See the
308 .Fl w
309 option as well.
310 .It Fl s
311 A soft mount, which implies that file system calls will fail
312 after \fBRetry\fR round trip timeout intervals.
313 .It Fl t
314 Set the initial retransmit timeout to the specified value.
315 May be useful for fine tuning UDP mounts over internetworks
316 with high packet loss rates or an overloaded server.
317 Try increasing the interval if
318 .Xr nfsstat 1
319 shows high retransmit rates while the file system is active or reducing the
320 value if there is a low retransmit rate but long response delay observed.
321 (Normally, the -d option should be specified when using this option to manually
322 tune the timeout
323 interval.)
324 .It Fl w
325 Set the write data size to the specified value.
326 Ditto the comments w.r.t. the
327 .Fl r
328 option, but using the
329 .Dq "fragments dropped due to timeout"
330 value on the server instead of the client.
331 Note that both the
332 .Fl r
333 and
334 .Fl w
335 options should only be used as a last ditch effort at improving performance
336 when mounting servers that do not support TCP mounts.
337 .It Fl x
338 Set the retransmit timeout count for soft mounts to the specified value.
339 .El
340 .Sh SEE ALSO
341 .Xr mount 2 ,
342 .Xr unmount 2 ,
343 .Xr fstab 5 ,
344 .Xr mount 8 ,
345 .Xr nfsd 8 ,
346 .Xr nfsiod 8 ,
347 .Xr showmount 8
348 .Sh BUGS
349 Due to the way that Sun RPC is implemented on top of UDP (unreliable datagram)
350 transport, tuning such mounts is really a black art that can only be expected
351 to have limited success.
352 For clients mounting servers that are not on the same
353 LAN cable or that tend to be overloaded,
354 TCP transport is strongly recommended,
355 but unfortunately this is restricted to mostly
356 .Bx 4.4
357 servers.