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