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