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.4 2006/02/28 02:25:10 swildner 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 200.Er EINTR 201when a 202termination signal is posted for the process. 203.It Fl l 204Used with NQNFS and NFSV3 to specify that the \fBReaddirPlus\fR RPC should 205be used. 206This option reduces RPC traffic for cases such as 207.Dq "ls -l" , 208but tends to flood the attribute and name caches with prefetched entries. 209Try this option and see whether performance improves or degrades. 210Probably 211most useful for client to server network interconnects with a large bandwidth 212times delay product. 213.It Fl m 214Set the Kerberos realm to the string argument. 215Used with the 216.Fl K 217option for mounts to other realms. 218.It Fl o 219Options are specified with a 220.Fl o 221flag followed by a comma separated string of options. 222See the 223.Xr mount 8 224man page for possible options and their meanings. 225The following NFS specific option is also available: 226.Bl -tag -width indent 227.It port=<port_number> 228Use specified port number for NFS requests. 229The default is to query the portmapper for the NFS port. 230.It acregmin=<seconds> 231.It acregmax=<seconds> 232.It acdirmin=<seconds> 233.It acdirmax=<seconds> 234When attributes of files are cached, a timeout calculated to determine 235whether a given cache entry has expired. These four values determine the 236upper and lower bounds of the timeouts for ``directory'' attributes and 237``regular'' (ie: everything else). The default values are 3 -> 60 seconds 238for regular files, and 30 -> 60 seconds for directories. The algorithm to 239calculate the timeout is based on the age of the file. The older the file, 240the longer the cache is considered valid, subject to the limits above. 241.El 242.Pp 243.Bl -tag -width "dumbtimerXX" 244\fBHistoric \&-o options\fR 245.Pp 246Use of these options is deprecated, they are only mentioned here for 247compatibility with historic versions of 248.Nm . 249.It bg 250Same as 251.Fl b . 252.It conn 253Same as not specifying 254.Fl c . 255.It dumbtimer 256Same as 257.Fl d . 258.It intr 259Same as 260.Fl i . 261.It kerb 262Same as 263.Fl K . 264.It nfsv2 265Same as 266.Fl 2 . 267.It nfsv3 268Same as 269.Fl 3 . 270.It rdirplus 271Same as 272.Fl l . 273.It mntudp 274Same as 275.Fl U . 276.It resvport 277Same as 278.Fl P . 279.It nqnfs 280Same as 281.Fl q . 282.It soft 283Same as 284.Fl s . 285.It tcp 286Same as 287.Fl T . 288.El 289.It Fl q 290Use the Not Quite NFS (NQNFS) protocol. 291This experimental protocol is NFS Version 2 with leasing extensions 292similar to those found in NFS Version 3. 293The interoperability of this protocol with other systems is 294very limited and its implementation is not widely used. 295Do not use this option unless you know exactly what you are doing! 296.It Fl r 297Set the read data size to the specified value. 298It should normally be a power of 2 greater than or equal to 1024. 299This should be used for UDP mounts when the 300.Dq "fragments dropped due to timeout" 301value is getting large while actively using a mount point. 302(Use 303.Xr netstat 1 304with the 305.Fl s 306option to see what the 307.Dq "fragments dropped due to timeout" 308value is.) 309See the 310.Fl w 311option as well. 312.It Fl s 313A soft mount, which implies that file system calls will fail 314after \fBRetry\fR round trip timeout intervals. 315.It Fl t 316Set the initial retransmit timeout to the specified value. 317May be useful for fine tuning UDP mounts over internetworks 318with high packet loss rates or an overloaded server. 319Try increasing the interval if 320.Xr nfsstat 1 321shows high retransmit rates while the file system is active or reducing the 322value if there is a low retransmit rate but long response delay observed. 323(Normally, the -d option should be specified when using this option to manually 324tune the timeout 325interval.) 326.It Fl w 327Set the write data size to the specified value. 328Ditto the comments w.r.t. the 329.Fl r 330option, but using the 331.Dq "fragments dropped due to timeout" 332value on the server instead of the client. 333Note that both the 334.Fl r 335and 336.Fl w 337options should only be used as a last ditch effort at improving performance 338when mounting servers that do not support TCP mounts. 339.It Fl x 340Set the retransmit timeout count for soft mounts to the specified value. 341.El 342.Sh SEE ALSO 343.Xr mount 2 , 344.Xr unmount 2 , 345.Xr fstab 5 , 346.Xr mount 8 , 347.Xr nfsd 8 , 348.Xr nfsiod 8 , 349.Xr showmount 8 350.Sh BUGS 351Due to the way that Sun RPC is implemented on top of UDP (unreliable datagram) 352transport, tuning such mounts is really a black art that can only be expected 353to have limited success. 354For clients mounting servers that are not on the same 355LAN cable or that tend to be overloaded, 356TCP transport is strongly recommended, 357but unfortunately this is restricted to mostly 358.Bx 4.4 359servers. 360