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