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