xref: /freebsd/sbin/mount_nfs/mount_nfs.8 (revision bc2cfd713102edb487362be1bf5493bcb924194a)
18fae3551SRodney W. Grimes.\" Copyright (c) 1992, 1993, 1994
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
68fae3551SRodney W. Grimes.\" are met:
78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
88fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
108fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
118fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
128fae3551SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
138fae3551SRodney W. Grimes.\"    must display the following acknowledgement:
148fae3551SRodney W. Grimes.\"	This product includes software developed by the University of
158fae3551SRodney W. Grimes.\"	California, Berkeley and its contributors.
168fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
178fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
188fae3551SRodney W. Grimes.\"    without specific prior written permission.
198fae3551SRodney W. Grimes.\"
208fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
218fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
228fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
238fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
248fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
258fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
268fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
278fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
288fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
298fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
308fae3551SRodney W. Grimes.\" SUCH DAMAGE.
318fae3551SRodney W. Grimes.\"
328fae3551SRodney W. Grimes.\"	@(#)mount_nfs.8	8.2 (Berkeley) 3/27/94
338fae3551SRodney W. Grimes.\"
348fae3551SRodney W. Grimes.Dd March 27, 1994
358fae3551SRodney W. Grimes.Dt MOUNT_NFS 8
368fae3551SRodney W. Grimes.Os BSD 4.4
378fae3551SRodney W. Grimes.Sh NAME
388fae3551SRodney W. Grimes.Nm mount_nfs
398fae3551SRodney W. Grimes.Nd mount nfs file systems
408fae3551SRodney W. Grimes.Sh SYNOPSIS
418fae3551SRodney W. Grimes.Nm mount_nfs
428fae3551SRodney W. Grimes.Op Fl KMPTbcdiklqs
438fae3551SRodney W. Grimes.Op Fl D Ar deadthresh
448fae3551SRodney W. Grimes.Op Fl L Ar leaseterm
458fae3551SRodney W. Grimes.Op Fl R Ar retrycnt
468fae3551SRodney W. Grimes.Op Fl a Ar maxreadahead
478fae3551SRodney W. Grimes.Op Fl g Ar maxgroups
488fae3551SRodney W. Grimes.Op Fl m Ar realm
498fae3551SRodney W. Grimes.Op Fl o Ar options
508fae3551SRodney W. Grimes.Op Fl r Ar readsize
518fae3551SRodney W. Grimes.Op Fl t Ar timeout
528fae3551SRodney W. Grimes.Op Fl w Ar writesize
538fae3551SRodney W. Grimes.Op Fl x Ar retrans
548fae3551SRodney W. Grimes.Ar rhost:path node
558fae3551SRodney W. Grimes.Sh DESCRIPTION
568fae3551SRodney W. GrimesThe
578fae3551SRodney W. Grimes.Nm mount_nfs
588fae3551SRodney W. Grimescommand
598fae3551SRodney W. Grimescalls the
608fae3551SRodney W. Grimes.Xr mount 2
618fae3551SRodney W. Grimessystem call to prepare and graft a remote nfs file system (rhost:path)
628fae3551SRodney W. Grimeson to the file system tree at the point
638fae3551SRodney W. Grimes.Ar node.
648fae3551SRodney W. GrimesThis command is normally executed by
658fae3551SRodney W. Grimes.Xr mount 8 .
668fae3551SRodney W. GrimesIt implements the mount protocol as described in RFC 1094, Appendix A.
678fae3551SRodney W. Grimes.Pp
688fae3551SRodney W. GrimesThe options are:
698fae3551SRodney W. Grimes.Bl -tag -width indent
708fae3551SRodney W. Grimes.It Fl D
718fae3551SRodney W. GrimesUsed with NQNFS to set the
728fae3551SRodney W. Grimes.Dq "dead server threshold"
738fae3551SRodney W. Grimesto the specified number of round trip timeout intervals.
748fae3551SRodney W. GrimesAfter a
758fae3551SRodney W. Grimes.Dq "dead server threshold"
768fae3551SRodney W. Grimesof retransmit timeouts,
778fae3551SRodney W. Grimescached data for the unresponsive server is assumed to still be valid.
788fae3551SRodney W. GrimesValues may be set in the range of 1 - 9, with 9 referring to an
798fae3551SRodney W. Grimes.Dq "infinite dead threshold"
808fae3551SRodney W. Grimes(i.e. never assume cached data still valid).
818fae3551SRodney W. GrimesThis option is not generally recommended and is really an experimental
828fae3551SRodney W. Grimesfeature.
838fae3551SRodney W. Grimes.It Fl K
848fae3551SRodney W. GrimesPass Kerberos authenticators to the server for client-to-server
858fae3551SRodney W. Grimesuser-credential mapping.
868fae3551SRodney W. GrimesThis may only be used over TCP mounts between 4.4BSD clients and servers.
878fae3551SRodney W. Grimes.It Fl L
888fae3551SRodney W. GrimesUsed with NQNFS to set the lease term to the specified number of seconds.
898fae3551SRodney W. GrimesOnly use this argument for mounts with a large round trip delay.
908fae3551SRodney W. GrimesValues are normally in the 10-30 second range.
918fae3551SRodney W. Grimes.It Fl M
928fae3551SRodney W. GrimesAssume that other clients are not writing a file concurrently with this client.
938fae3551SRodney W. GrimesThis implements a slightly less strict consistency criteria than 4.3BSD-Reno
948fae3551SRodney W. Grimesdid, that is more in line with most commercial client implementations.
958fae3551SRodney W. GrimesThis is recommended for servers that do not support leasing.
968fae3551SRodney W. Grimes.It Fl P
978fae3551SRodney W. GrimesUse a reserved socket port number.
988fae3551SRodney W. GrimesThis is useful for mounting servers that require clients to use a
998fae3551SRodney W. Grimesreserved port number.
1008fae3551SRodney W. Grimes.It Fl R
1018fae3551SRodney W. GrimesSet the retry count for doing the mount to the specified value.
1028fae3551SRodney W. Grimes.It Fl T
1038fae3551SRodney W. GrimesUse TCP transport instead of UDP.
1048fae3551SRodney W. GrimesThis is recommended for servers that are not on the same LAN cable as
1058fae3551SRodney W. Grimesthe client.
1068fae3551SRodney W. Grimes(NB: This is NOT supported by most non-BSD servers.)
1078fae3551SRodney W. Grimes.It Fl a
1088fae3551SRodney W. GrimesSet the read-ahead count to the specified value.
1098fae3551SRodney W. GrimesThis may be in the range of 0 - 4, and determines how many blocks
1108fae3551SRodney W. Grimeswill be read ahead when a large file is being read sequentially.
1118fae3551SRodney W. GrimesThis is recommended for mounts with a large bandwidth * delay product.
1128fae3551SRodney W. Grimes.It Fl b
1138fae3551SRodney W. GrimesIf an initial attempt to contact the server fails, fork off a child to keep
1148fae3551SRodney W. Grimestrying the mount in the background.
1158fae3551SRodney W. GrimesUseful for
1168fae3551SRodney W. Grimes.Xr fstab 5 ,
1178fae3551SRodney W. Grimeswhere the filesystem mount is not critical to multiuser operation.
1188fae3551SRodney W. Grimes.It Fl c
1198fae3551SRodney W. GrimesFor UDP mount points, do not do a
1208fae3551SRodney W. Grimes.Xr connect 2 .
1218fae3551SRodney W. GrimesThis must be used for servers that do not reply to requests from the
1228fae3551SRodney W. Grimesstandard port number.
1238fae3551SRodney W. Grimes.It Fl d
1248fae3551SRodney W. GrimesDo not estimate retransmit timeout dynamically.
1258fae3551SRodney W. GrimesThis may be useful for UDP mounts that exhibit high retry rates.
1268fae3551SRodney W. Grimes.It Fl g
1278fae3551SRodney W. GrimesSet the maximum size of the group list for the credentials to the
1288fae3551SRodney W. Grimesspecified value.
1298fae3551SRodney W. GrimesThis should be used for mounts on old servers that cannot handle a
1308fae3551SRodney W. Grimesgroup list size of 16, as specified in RFC 1057.
1318fae3551SRodney W. GrimesTry 8, if users in a lot of groups cannot get response from the mount
1328fae3551SRodney W. Grimespoint.
1338fae3551SRodney W. Grimes.It Fl i
1348fae3551SRodney W. GrimesMake the mount interruptible, which implies that file system calls that
1358fae3551SRodney W. Grimesare delayed due to an unresponsive server will fail with EINTR when a
1368fae3551SRodney W. Grimestermination signal is posted for the process.
1378fae3551SRodney W. Grimes.It Fl k
1388fae3551SRodney W. GrimesUsed with NQNFS to specify
1398fae3551SRodney W. Grimes.Dq get a lease
1408fae3551SRodney W. Grimesfor the file name being looked up.
1418fae3551SRodney W. GrimesThis is recommended unless the server is complaining about excessive
1428fae3551SRodney W. Grimeslease load.
1438fae3551SRodney W. Grimes.It Fl l
1448fae3551SRodney W. GrimesUsed with NQNFS to specify that the \fBReaddir_and_Lookup\fR RPC should
1458fae3551SRodney W. Grimesbe used.
1468fae3551SRodney W. GrimesThis option reduces RPC traffic for cases such as
1478fae3551SRodney W. Grimes.Dq "ls -l" ,
1488fae3551SRodney W. Grimesbut increases the lease load on the server.
1498fae3551SRodney W. GrimesThis is recommended unless the server is complaining about excessive
1508fae3551SRodney W. Grimeslease load.
1518fae3551SRodney W. Grimes.It Fl m
1528fae3551SRodney W. GrimesSet the Kerberos realm to the string argument.
1538fae3551SRodney W. GrimesUsed with the
1548fae3551SRodney W. Grimes.Fl K
1558fae3551SRodney W. Grimesoption for mounts to other realms.
1568fae3551SRodney W. Grimes.It Fl o
1578fae3551SRodney W. GrimesOptions are specified with a
1588fae3551SRodney W. Grimes.Fl o
1598fae3551SRodney W. Grimesflag followed by a comma separated string of options.
1608fae3551SRodney W. GrimesSee the
1618fae3551SRodney W. Grimes.Xr mount 8
1628fae3551SRodney W. Grimesman page for possible options and their meanings.
163bc2cfd71SKarl StricklandThe following NFS specific option is also available:
164bc2cfd71SKarl Strickland.Bl -tag -width indent
165bc2cfd71SKarl Strickland.It port=<port_number>
166bc2cfd71SKarl StricklandUse specified port number for NFS requests.
167bc2cfd71SKarl StricklandThe default is to query the portmapper for the NFS port.
168bc2cfd71SKarl Strickland.El
1698fae3551SRodney W. Grimes.It Fl q
1708fae3551SRodney W. GrimesUse the leasing extensions to the protocol to maintain cache consistency.
1718fae3551SRodney W. GrimesThis protocol, referred to as Not Quite Nfs (NQNFS),
1728fae3551SRodney W. Grimesis only supported by 4.4BSD servers.
1738fae3551SRodney W. Grimes.It Fl r
1748fae3551SRodney W. GrimesSet the read data size to the specified value.
1758fae3551SRodney W. GrimesIt should be a power of 2 greater than or equal to 1024.
1768fae3551SRodney W. GrimesThis should be used for UDP mounts when the
1778fae3551SRodney W. Grimes.Dq "fragments dropped due to timeout"
1788fae3551SRodney W. Grimesvalue is getting large while actively using a mount point.
1798fae3551SRodney W. Grimes(Use
1808fae3551SRodney W. Grimes.Xr netstat 1
1818fae3551SRodney W. Grimeswith the
1828fae3551SRodney W. Grimes.Fl s
1838fae3551SRodney W. Grimesoption to see what the
1848fae3551SRodney W. Grimes.Dq "fragments dropped due to timeout"
1858fae3551SRodney W. Grimesvalue is.)
1868fae3551SRodney W. GrimesSee the
1878fae3551SRodney W. Grimes.Fl w
1888fae3551SRodney W. Grimesoption as well.
1898fae3551SRodney W. Grimes.It Fl s
1908fae3551SRodney W. GrimesA soft mount, which implies that file system calls will fail
1918fae3551SRodney W. Grimesafter \fBRetry\fR round trip timeout intervals.
1928fae3551SRodney W. Grimes.It Fl t
1938fae3551SRodney W. GrimesSet the initial retransmit timeout to the specified value.
1948fae3551SRodney W. GrimesMay be useful for fine tuning UDP mounts over internetworks
1958fae3551SRodney W. Grimeswith high packet loss rates or an overloaded server.
1968fae3551SRodney W. GrimesTry increasing the interval if
1978fae3551SRodney W. Grimes.Xr nfsstat 1
1988fae3551SRodney W. Grimesshows high retransmit rates while the file system is active or reducing the
1998fae3551SRodney W. Grimesvalue if there is a low retransmit rate but long response delay observed.
2008fae3551SRodney W. Grimes.It Fl w
2018fae3551SRodney W. GrimesSet the write data size to the specified value.
2028fae3551SRodney W. GrimesDitto the comments w.r.t. the
2038fae3551SRodney W. Grimes.Fl r
2048fae3551SRodney W. Grimesoption, but using the
2058fae3551SRodney W. Grimes.Dq "fragments dropped due to timeout"
2068fae3551SRodney W. Grimesvalue on the server instead of the client.
2078fae3551SRodney W. GrimesNote that both the
2088fae3551SRodney W. Grimes.Fl r
2098fae3551SRodney W. Grimesand
2108fae3551SRodney W. Grimes.Fl w
2118fae3551SRodney W. Grimesoptions should only be used as a last ditch effort at improving performance
2128fae3551SRodney W. Grimeswhen mounting servers that do not support TCP mounts.
2138fae3551SRodney W. Grimes.It Fl x
2148fae3551SRodney W. GrimesSet the retransmit timeout count for soft mounts to the specified value.
2158fae3551SRodney W. Grimes.El
2168fae3551SRodney W. Grimes.Sh SEE ALSO
2178fae3551SRodney W. Grimes.Xr mount 2 ,
2188fae3551SRodney W. Grimes.Xr unmount 2 ,
2198fae3551SRodney W. Grimes.Xr fstab 5 ,
2208fae3551SRodney W. Grimes.Xr mount 8
2218fae3551SRodney W. Grimes.Sh BUGS
2228fae3551SRodney W. GrimesDue to the way that Sun RPC is implemented on top of UDP (unreliable datagram)
2238fae3551SRodney W. Grimestransport, tuning such mounts is really a black art that can only be expected
2248fae3551SRodney W. Grimesto have limited success.
2258fae3551SRodney W. GrimesFor clients mounting servers that are not on the same
2268fae3551SRodney W. GrimesLAN cable or that tend to be overloaded,
2278fae3551SRodney W. GrimesTCP transport is strongly recommended,
2288fae3551SRodney W. Grimesbut unfortunately this is restricted to mostly 4.4BSD servers.
229