]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/mount_nfs/mount_nfs.8
Since revision 1.40/1.41, the default behaviour for mount_nfs is
[FreeBSD/FreeBSD.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$
35 .\""
36 .Dd March 29, 1995
37 .Dt MOUNT_NFS 8
38 .Os
39 .Sh NAME
40 .Nm mount_nfs
41 .Nd mount nfs file systems
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl 23KNPTUbcdilqs
45 .Op Fl D Ar deadthresh
46 .Op Fl I Ar readdirsize
47 .Op Fl L Ar leaseterm
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 The options are:
75 .Bl -tag -width indent
76 .It Fl 2
77 Use the NFS Version 2 protocol (the default is to try version 3 first
78 then version 2).  Note that NFS version 2 has a file size limit of 2
79 gigabytes.
80 .It Fl 3
81 Use the NFS Version 3 protocol.
82 .It Fl D
83 Used with NQNFS to set the
84 .Dq "dead server threshold"
85 to the specified number of round trip timeout intervals.
86 After a
87 .Dq "dead server threshold"
88 of retransmit timeouts,
89 cached data for the unresponsive server is assumed to still be valid.
90 Values may be set in the range of 1 - 9, with 9 referring to an
91 .Dq "infinite dead threshold"
92 (i.e. never assume cached data still valid).
93 This option is not generally recommended and is really an experimental
94 feature.
95 .It Fl I
96 Set the readdir read size to the specified value.
97 The value should normally
98 be a multiple of DIRBLKSIZ that is <= the read size for the mount.
99 .It Fl K
100 Pass Kerberos authenticators to the server for client-to-server
101 user-credential mapping.
102 This requires that the kernel be built with the NFSKERB option.
103 The use of this option will prevent the kernel from compiling
104 unless calls to the appropriate Kerberos encryption routines
105 are provided in the NFS source.
106 (Refer to the INTERNET-DRAFT titled
107 .%T "Authentication Mechanisms for ONC RPC" ,
108 for more information.)
109 .It Fl L
110 Used with NQNFS to set the lease term to the specified number of seconds.
111 Only use this argument for mounts with a large round trip delay.
112 Values are normally in the 10-30 second range.
113 .It Fl N
114 Do
115 .Em not
116 use a reserved socket port number (see below).
117 .It Fl P
118 Use a reserved socket port number.
119 This flag is obsolete, and only retained for compatibility reasons.
120 Reserved port numbers are used by default now.
121 This is useful for mounting servers that require clients to use a
122 reserved port number on the mistaken belief that this makes NFS
123 more secure.
124 (For the rare case where the client has a trusted root account
125 but untrustworthy users and the network cables are in secure areas this does
126 help, but for normal desktop clients this does not apply.)
127 .It Fl R
128 Set the mount retry count to the specified value.
129 A retry count of zero means to keep retrying forever.
130 By default,
131 .Nm
132 retries forever on background mounts (see the
133 .Fl b
134 option), and otherwise tries just once.
135 There is a 60 second delay between each attempt.
136 .It Fl T
137 Use TCP transport instead of UDP.
138 This is recommended for servers that are not on the same LAN cable as
139 the client.
140 (NB: This is NOT supported by most non-BSD servers.)
141 .It Fl U
142 Force the mount protocol to use UDP transport, even for TCP NFS mounts.
143 (Necessary for some old BSD servers.)
144 .It Fl a
145 Set the read-ahead count to the specified value.
146 This may be in the range of 0 - 4, and determines how many blocks
147 will be read ahead when a large file is being read sequentially.
148 Trying a value greater than 1 for this is suggested for
149 mounts with a large bandwidth * delay product.
150 .It Fl b
151 If an initial attempt to contact the server fails, fork off a child to keep
152 trying the mount in the background.
153 Useful for
154 .Xr fstab 5 ,
155 where the filesystem mount is not critical to multiuser operation.
156 .It Fl c
157 For UDP mount points, do not do a
158 .Xr connect 2 .
159 This must be used for servers that do not reply to requests from the
160 standard NFS port number 2049.
161 .It Fl d
162 Turn off the dynamic retransmit timeout estimator.
163 This may be useful for UDP mounts that exhibit high retry rates,
164 since it is possible that the dynamically estimated timeout interval is too
165 short.
166 .It Fl g
167 Set the maximum size of the group list for the credentials to the
168 specified value.
169 This should be used for mounts on old servers that cannot handle a
170 group list size of 16, as specified in RFC 1057.
171 Try 8, if users in a lot of groups cannot get response from the mount
172 point.
173 .It Fl i
174 Make the mount interruptible, which implies that file system calls that
175 are delayed due to an unresponsive server will fail with EINTR when a
176 termination signal is posted for the process.
177 .It Fl l
178 Used with NQNFS and NFSV3 to specify that the \fBReaddirPlus\fR RPC should
179 be used.
180 This option reduces RPC traffic for cases such as
181 .Dq "ls -l" ,
182 but tends to flood the attribute and name caches with prefetched entries.
183 Try this option and see whether performance improves or degrades.
184 Probably
185 most useful for client to server network interconnects with a large bandwidth
186 times delay product.
187 .It Fl m
188 Set the Kerberos realm to the string argument.
189 Used with the
190 .Fl K
191 option for mounts to other realms.
192 .It Fl o
193 Options are specified with a
194 .Fl o
195 flag followed by a comma separated string of options.
196 See the
197 .Xr mount 8
198 man page for possible options and their meanings.
199 The following NFS specific option is also available:
200 .Bl -tag -width indent
201 .It port=<port_number>
202 Use specified port number for NFS requests.
203 The default is to query the portmapper for the NFS port.
204 .It acregmin=<seconds>
205 .It acregmax=<seconds>
206 .It acdirmin=<seconds>
207 .It acdirmax=<seconds>
208 When attributes of files are cached, a timeout calculated to determine
209 whether a given cache entry has expired.  These four values determine the
210 upper and lower bounds of the timeouts for ``directory'' attributes and
211 ``regular'' (ie: everything else).  The default values are 3 -> 60 seconds
212 for regular files, and 30 -> 60 seconds for directories.  The algorithm to
213 calculate the timeout is based on the age of the file.  The older the file,
214 the longer the cache is considered valid, subject to the limits above.
215 .El
216 .Pp
217 .Bl -tag -width "dumbtimerXX"
218 \fBHistoric \&-o options\fR
219 .Pp
220 Use of these options is deprecated, they are only mentioned here for
221 compatibility with historic versions of
222 .Nm .
223 .It bg
224 Same as
225 .Fl b .
226 .It conn
227 Same as not specifying
228 .Fl c .
229 .It dumbtimer
230 Same as
231 .Fl d .
232 .It intr
233 Same as
234 .Fl i .
235 .It kerb
236 Same as
237 .Fl K .
238 .It nfsv2
239 Same as
240 .Fl 2 .
241 .It nfsv3
242 Same as
243 .Fl 3 .
244 .It rdirplus
245 Same as
246 .Fl l .
247 .It mntudp
248 Same as
249 .Fl U .
250 .It resvport
251 Same as
252 .Fl P .
253 .It seqpacket
254 Same as
255 .Fl p .
256 .It nqnfs
257 Same as
258 .Fl q .
259 .It soft
260 Same as
261 .Fl s .
262 .It tcp
263 Same as
264 .Fl T .
265 .El
266 .It Fl q
267 Use the Not Quite NFS (NQNFS) protocol.
268 This experimental protocol is NFS Version 2 with leasing extensions
269 similar to those found in NFS Version 3.
270 The interoperability of this protocol with other systems is
271 very limited and its implementation is not widely used.
272 Do not use this option unless you know exactly what you are doing!
273 .It Fl r
274 Set the read data size to the specified value.
275 It should normally be a power of 2 greater than or equal to 1024.
276 This should be used for UDP mounts when the
277 .Dq "fragments dropped due to timeout"
278 value is getting large while actively using a mount point.
279 (Use
280 .Xr netstat 1
281 with the
282 .Fl s
283 option to see what the
284 .Dq "fragments dropped due to timeout"
285 value is.)
286 See the
287 .Fl w
288 option as well.
289 .It Fl s
290 A soft mount, which implies that file system calls will fail
291 after \fBRetry\fR round trip timeout intervals.
292 .It Fl t
293 Set the initial retransmit timeout to the specified value.
294 May be useful for fine tuning UDP mounts over internetworks
295 with high packet loss rates or an overloaded server.
296 Try increasing the interval if
297 .Xr nfsstat 1
298 shows high retransmit rates while the file system is active or reducing the
299 value if there is a low retransmit rate but long response delay observed.
300 (Normally, the -d option should be specified when using this option to manually
301 tune the timeout
302 interval.)
303 .It Fl w
304 Set the write data size to the specified value.
305 Ditto the comments w.r.t. the
306 .Fl r
307 option, but using the
308 .Dq "fragments dropped due to timeout"
309 value on the server instead of the client.
310 Note that both the
311 .Fl r
312 and
313 .Fl w
314 options should only be used as a last ditch effort at improving performance
315 when mounting servers that do not support TCP mounts.
316 .It Fl x
317 Set the retransmit timeout count for soft mounts to the specified value.
318 .El
319 .Sh SEE ALSO
320 .Xr mount 2 ,
321 .Xr unmount 2 ,
322 .Xr fstab 5 ,
323 .Xr mount 8 ,
324 .Xr nfsd 8 ,
325 .Xr nfsiod 8 ,
326 .Xr showmount 8
327 .Sh BUGS
328 Due to the way that Sun RPC is implemented on top of UDP (unreliable datagram)
329 transport, tuning such mounts is really a black art that can only be expected
330 to have limited success.
331 For clients mounting servers that are not on the same
332 LAN cable or that tend to be overloaded,
333 TCP transport is strongly recommended,
334 but unfortunately this is restricted to mostly 4.4BSD servers.