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