xref: /freebsd/sbin/mount_nfs/mount_nfs.8 (revision afe61c15161c324a7af299a9b8457aba5afc92db)
1.\" Copyright (c) 1992, 1993, 1994
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.2 (Berkeley) 3/27/94
33.\"
34.Dd March 27, 1994
35.Dt MOUNT_NFS 8
36.Os BSD 4.4
37.Sh NAME
38.Nm mount_nfs
39.Nd mount nfs file systems
40.Sh SYNOPSIS
41.Nm mount_nfs
42.Op Fl KMPTbcdiklqs
43.Op Fl D Ar deadthresh
44.Op Fl L Ar leaseterm
45.Op Fl R Ar retrycnt
46.Op Fl a Ar maxreadahead
47.Op Fl g Ar maxgroups
48.Op Fl m Ar realm
49.Op Fl o Ar options
50.Op Fl r Ar readsize
51.Op Fl t Ar timeout
52.Op Fl w Ar writesize
53.Op Fl x Ar retrans
54.Ar rhost:path node
55.Sh DESCRIPTION
56The
57.Nm mount_nfs
58command
59calls the
60.Xr mount 2
61system call to prepare and graft a remote nfs file system (rhost:path)
62on to the file system tree at the point
63.Ar node.
64This command is normally executed by
65.Xr mount 8 .
66It implements the mount protocol as described in RFC 1094, Appendix A.
67.Pp
68The options are:
69.Bl -tag -width indent
70.It Fl D
71Used with NQNFS to set the
72.Dq "dead server threshold"
73to the specified number of round trip timeout intervals.
74After a
75.Dq "dead server threshold"
76of retransmit timeouts,
77cached data for the unresponsive server is assumed to still be valid.
78Values may be set in the range of 1 - 9, with 9 referring to an
79.Dq "infinite dead threshold"
80(i.e. never assume cached data still valid).
81This option is not generally recommended and is really an experimental
82feature.
83.It Fl K
84Pass Kerberos authenticators to the server for client-to-server
85user-credential mapping.
86This may only be used over TCP mounts between 4.4BSD clients and servers.
87.It Fl L
88Used with NQNFS to set the lease term to the specified number of seconds.
89Only use this argument for mounts with a large round trip delay.
90Values are normally in the 10-30 second range.
91.It Fl M
92Assume that other clients are not writing a file concurrently with this client.
93This implements a slightly less strict consistency criteria than 4.3BSD-Reno
94did, that is more in line with most commercial client implementations.
95This is recommended for servers that do not support leasing.
96.It Fl P
97Use a reserved socket port number.
98This is useful for mounting servers that require clients to use a
99reserved port number.
100.It Fl R
101Set the retry count for doing the mount to the specified value.
102.It Fl T
103Use TCP transport instead of UDP.
104This is recommended for servers that are not on the same LAN cable as
105the client.
106(NB: This is NOT supported by most non-BSD servers.)
107.It Fl a
108Set the read-ahead count to the specified value.
109This may be in the range of 0 - 4, and determines how many blocks
110will be read ahead when a large file is being read sequentially.
111This is recommended for mounts with a large bandwidth * delay product.
112.It Fl b
113If an initial attempt to contact the server fails, fork off a child to keep
114trying the mount in the background.
115Useful for
116.Xr fstab 5 ,
117where the filesystem mount is not critical to multiuser operation.
118.It Fl c
119For UDP mount points, do not do a
120.Xr connect 2 .
121This must be used for servers that do not reply to requests from the
122standard port number.
123.It Fl d
124Do not estimate retransmit timeout dynamically.
125This may be useful for UDP mounts that exhibit high retry rates.
126.It Fl g
127Set the maximum size of the group list for the credentials to the
128specified value.
129This should be used for mounts on old servers that cannot handle a
130group list size of 16, as specified in RFC 1057.
131Try 8, if users in a lot of groups cannot get response from the mount
132point.
133.It Fl i
134Make the mount interruptible, which implies that file system calls that
135are delayed due to an unresponsive server will fail with EINTR when a
136termination signal is posted for the process.
137.It Fl k
138Used with NQNFS to specify
139.Dq get a lease
140for the file name being looked up.
141This is recommended unless the server is complaining about excessive
142lease load.
143.It Fl l
144Used with NQNFS to specify that the \fBReaddir_and_Lookup\fR RPC should
145be used.
146This option reduces RPC traffic for cases such as
147.Dq "ls -l" ,
148but increases the lease load on the server.
149This is recommended unless the server is complaining about excessive
150lease load.
151.It Fl m
152Set the Kerberos realm to the string argument.
153Used with the
154.Fl K
155option for mounts to other realms.
156.It Fl o
157Options are specified with a
158.Fl o
159flag followed by a comma separated string of options.
160See the
161.Xr mount 8
162man page for possible options and their meanings.
163.It Fl q
164Use the leasing extensions to the protocol to maintain cache consistency.
165This protocol, referred to as Not Quite Nfs (NQNFS),
166is only supported by 4.4BSD servers.
167.It Fl r
168Set the read data size to the specified value.
169It should be a power of 2 greater than or equal to 1024.
170This should be used for UDP mounts when the
171.Dq "fragments dropped due to timeout"
172value is getting large while actively using a mount point.
173(Use
174.Xr netstat 1
175with the
176.Fl s
177option to see what the
178.Dq "fragments dropped due to timeout"
179value is.)
180See the
181.Fl w
182option as well.
183.It Fl s
184A soft mount, which implies that file system calls will fail
185after \fBRetry\fR round trip timeout intervals.
186.It Fl t
187Set the initial retransmit timeout to the specified value.
188May be useful for fine tuning UDP mounts over internetworks
189with high packet loss rates or an overloaded server.
190Try increasing the interval if
191.Xr nfsstat 1
192shows high retransmit rates while the file system is active or reducing the
193value if there is a low retransmit rate but long response delay observed.
194.It Fl w
195Set the write data size to the specified value.
196Ditto the comments w.r.t. the
197.Fl r
198option, but using the
199.Dq "fragments dropped due to timeout"
200value on the server instead of the client.
201Note that both the
202.Fl r
203and
204.Fl w
205options should only be used as a last ditch effort at improving performance
206when mounting servers that do not support TCP mounts.
207.It Fl x
208Set the retransmit timeout count for soft mounts to the specified value.
209.El
210.Sh SEE ALSO
211.Xr mount 2 ,
212.Xr unmount 2 ,
213.Xr fstab 5 ,
214.Xr mount 8
215.Sh BUGS
216Due to the way that Sun RPC is implemented on top of UDP (unreliable datagram)
217transport, tuning such mounts is really a black art that can only be expected
218to have limited success.
219For clients mounting servers that are not on the same
220LAN cable or that tend to be overloaded,
221TCP transport is strongly recommended,
222but unfortunately this is restricted to mostly 4.4BSD servers.
223