14a4c5285SPeter Wemm.\" Copyright (c) 1992, 1993, 1994, 1995 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.\" 4. Neither the name of the University nor the names of its contributors 138fae3551SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 148fae3551SRodney W. Grimes.\" without specific prior written permission. 158fae3551SRodney W. Grimes.\" 168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 198fae3551SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 268fae3551SRodney W. Grimes.\" SUCH DAMAGE. 278fae3551SRodney W. Grimes.\" 284a4c5285SPeter Wemm.\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 297f3dea24SPeter Wemm.\" $FreeBSD$ 30a7475cf4SRuslan Ermilov.\" 314a2b331aSCeri Davies.Dd February 11, 2008 328fae3551SRodney W. Grimes.Dt MOUNT_NFS 8 339fe48c6eSRuslan Ermilov.Os 348fae3551SRodney W. Grimes.Sh NAME 358fae3551SRodney W. Grimes.Nm mount_nfs 36a7475cf4SRuslan Ermilov.Nd mount NFS file systems 378fae3551SRodney W. Grimes.Sh SYNOPSIS 387c7fb079SRuslan Ermilov.Nm 398d646af5SRuslan Ermilov.Op Fl 23bcdiLlNPsTU 408fae3551SRodney W. Grimes.Op Fl a Ar maxreadahead 418d646af5SRuslan Ermilov.Op Fl D Ar deadthresh 428fae3551SRodney W. Grimes.Op Fl g Ar maxgroups 438d646af5SRuslan Ermilov.Op Fl I Ar readdirsize 448fae3551SRodney W. Grimes.Op Fl o Ar options 458d646af5SRuslan Ermilov.Op Fl R Ar retrycnt 468fae3551SRodney W. Grimes.Op Fl r Ar readsize 478fae3551SRodney W. Grimes.Op Fl t Ar timeout 488fae3551SRodney W. Grimes.Op Fl w Ar writesize 498fae3551SRodney W. Grimes.Op Fl x Ar retrans 50d0353b83SRuslan Ermilov.Ar rhost : Ns Ar path node 518fae3551SRodney W. Grimes.Sh DESCRIPTION 528fae3551SRodney W. GrimesThe 5346fc8f78SPhilippe Charnier.Nm 54e1205e80SPhilippe Charnierutility calls the 550c269d1fSCraig Rodrigues.Xr nmount 2 56a7475cf4SRuslan Ermilovsystem call to prepare and graft a remote NFS file system 57d0353b83SRuslan Ermilov.Pq Ar rhost : Ns Ar path 588fae3551SRodney W. Grimeson to the file system tree at the point 598fae3551SRodney W. Grimes.Ar node . 608fae3551SRodney W. GrimesThis command is normally executed by 618fae3551SRodney W. Grimes.Xr mount 8 . 62a62dc406SDoug RabsonIt implements the mount protocol as described in RFC 1094, Appendix A and 63a62dc406SDoug Rabson.%T "NFS: Network File System Version 3 Protocol Specification" , 64a62dc406SDoug RabsonAppendix I. 658fae3551SRodney W. Grimes.Pp 662bc53e11SIan DowseBy default, 672bc53e11SIan Dowse.Nm 682bc53e11SIan Dowsekeeps retrying until the mount succeeds. 692bc53e11SIan DowseThis behaviour is intended for file systems listed in 702bc53e11SIan Dowse.Xr fstab 5 712bc53e11SIan Dowsethat are critical to the boot process. 722bc53e11SIan DowseFor non-critical file systems, the 732bc53e11SIan Dowse.Fl b 742bc53e11SIan Dowseand 752bc53e11SIan Dowse.Fl R 762bc53e11SIan Dowseflags provide mechanisms to prevent the boot process from hanging 772bc53e11SIan Dowseif the server is unavailable. 782bc53e11SIan Dowse.Pp 792bc53e11SIan DowseIf the server becomes unresponsive while an NFS file system is 802bc53e11SIan Dowsemounted, any new or outstanding file operations on that file system 812bc53e11SIan Dowsewill hang uninterruptibly until the server comes back. 822bc53e11SIan DowseTo modify this default behaviour, see the 832bc53e11SIan Dowse.Fl i 842bc53e11SIan Dowseand 852bc53e11SIan Dowse.Fl s 862bc53e11SIan Dowseflags. 872bc53e11SIan Dowse.Pp 888fae3551SRodney W. GrimesThe options are: 898fae3551SRodney W. Grimes.Bl -tag -width indent 902cd1c32cSDoug Rabson.It Fl 2 912cd1c32cSDoug RabsonUse the NFS Version 2 protocol (the default is to try version 3 first 92a7475cf4SRuslan Ermilovthen version 2). 93a7475cf4SRuslan ErmilovNote that NFS version 2 has a file size limit of 2 gigabytes. 94a62dc406SDoug Rabson.It Fl 3 952cd1c32cSDoug RabsonUse the NFS Version 3 protocol. 960c269d1fSCraig Rodrigues.It Fl 4 970c269d1fSCraig RodriguesUse the NFS Version 4 protocol. 988fae3551SRodney W. Grimes.It Fl D 9991196234SPeter WemmSet the 1008fae3551SRodney W. Grimes.Dq "dead server threshold" 10191196234SPeter Wemmto the specified number of round trip timeout intervals before a 10291196234SPeter Wemm.Dq "server not responding" 10391196234SPeter Wemmmessage is displayed. 104a62dc406SDoug Rabson.It Fl I 105ef8f7ac9SSheldon HearnSet the readdir read size to the specified value. 106ef8f7ac9SSheldon HearnThe value should normally 107a7475cf4SRuslan Ermilovbe a multiple of 108a7475cf4SRuslan Ermilov.Dv DIRBLKSIZ 109a7475cf4SRuslan Ermilovthat is <= the read size for the mount. 11013190d87SAlfred Perlstein.It Fl L 11113190d87SAlfred PerlsteinDo 11213190d87SAlfred Perlstein.Em not 11313190d87SAlfred Perlsteinforward 11413190d87SAlfred Perlstein.Xr fcntl 2 11513190d87SAlfred Perlsteinlocks over the wire. 11613190d87SAlfred PerlsteinAll locks will be local and not seen by the server 117a7475cf4SRuslan Ermilovand likewise not seen by other NFS clients. 118a7475cf4SRuslan ErmilovThis removes the need to run the 11913190d87SAlfred Perlstein.Xr rpcbind 8 12013190d87SAlfred Perlsteinservice and the 12113190d87SAlfred Perlstein.Xr rpc.statd 8 12213190d87SAlfred Perlsteinand 12313190d87SAlfred Perlstein.Xr rpc.lockd 8 12413190d87SAlfred Perlsteinservers on the client. 1253fd0605eSAlfred PerlsteinNote that this option will only be honored when performing the 1263fd0605eSAlfred Perlsteininitial mount, it will be silently ignored if used while updating 1273fd0605eSAlfred Perlsteinthe mount options. 128cc75b131SJoerg Wunsch.It Fl N 129cc75b131SJoerg WunschDo 130cc75b131SJoerg Wunsch.Em not 131cc75b131SJoerg Wunschuse a reserved socket port number (see below). 1328fae3551SRodney W. Grimes.It Fl P 1338fae3551SRodney W. GrimesUse a reserved socket port number. 134cc75b131SJoerg WunschThis flag is obsolete, and only retained for compatibility reasons. 135cc75b131SJoerg WunschReserved port numbers are used by default now. 1364e86fcacSSheldon Hearn(For the rare case where the client has a trusted root account 137e71057d8SMike Pritchardbut untrustworthy users and the network cables are in secure areas this does 138a62dc406SDoug Rabsonhelp, but for normal desktop clients this does not apply.) 1398fae3551SRodney W. Grimes.It Fl R 140e16873daSIan DowseSet the mount retry count to the specified value. 1412bc53e11SIan DowseThe default is a retry count of zero, which means to keep retrying 1422bc53e11SIan Dowseforever. 143e16873daSIan DowseThere is a 60 second delay between each attempt. 1448fae3551SRodney W. Grimes.It Fl T 1452427fa19SKris KennawayUse TCP transport. 1462427fa19SKris KennawayThis is the default option, as it provides for increased reliability on both 1472427fa19SKris KennawayLAN and WAN configurations compared to UDP. 1482427fa19SKris KennawaySome old NFS servers do not support this method; UDP mounts may be required 1492427fa19SKris Kennawayfor interoperability. 150a62dc406SDoug Rabson.It Fl U 151a62dc406SDoug RabsonForce the mount protocol to use UDP transport, even for TCP NFS mounts. 152753d686dSRuslan Ermilov(Necessary for some old 153753d686dSRuslan Ermilov.Bx 154753d686dSRuslan Ermilovservers.) 1558fae3551SRodney W. Grimes.It Fl a 1568fae3551SRodney W. GrimesSet the read-ahead count to the specified value. 1578fae3551SRodney W. GrimesThis may be in the range of 0 - 4, and determines how many blocks 1588fae3551SRodney W. Grimeswill be read ahead when a large file is being read sequentially. 159a62dc406SDoug RabsonTrying a value greater than 1 for this is suggested for 160a62dc406SDoug Rabsonmounts with a large bandwidth * delay product. 1618fae3551SRodney W. Grimes.It Fl b 1628fae3551SRodney W. GrimesIf an initial attempt to contact the server fails, fork off a child to keep 1638fae3551SRodney W. Grimestrying the mount in the background. 1648fae3551SRodney W. GrimesUseful for 1658fae3551SRodney W. Grimes.Xr fstab 5 , 1668fae3551SRodney W. Grimeswhere the file system mount is not critical to multiuser operation. 1678fae3551SRodney W. Grimes.It Fl c 1688fae3551SRodney W. GrimesFor UDP mount points, do not do a 1698fae3551SRodney W. Grimes.Xr connect 2 . 170091e0b14SMatthew DillonThis must be used if the server does not reply to requests from the standard 171091e0b14SMatthew DillonNFS port number 2049 or replies to requests using a different IP address 172091e0b14SMatthew Dillon(which can occur if the server is multi-homed). 173091e0b14SMatthew DillonSetting the 174091e0b14SMatthew Dillon.Va vfs.nfs.nfs_ip_paranoia 175091e0b14SMatthew Dillonsysctl to 0 will make this option the default. 1768fae3551SRodney W. Grimes.It Fl d 177a62dc406SDoug RabsonTurn off the dynamic retransmit timeout estimator. 178a62dc406SDoug RabsonThis may be useful for UDP mounts that exhibit high retry rates, 179a62dc406SDoug Rabsonsince it is possible that the dynamically estimated timeout interval is too 180a62dc406SDoug Rabsonshort. 1818fae3551SRodney W. Grimes.It Fl g 1828fae3551SRodney W. GrimesSet the maximum size of the group list for the credentials to the 1838fae3551SRodney W. Grimesspecified value. 1848fae3551SRodney W. GrimesThis should be used for mounts on old servers that cannot handle a 1858fae3551SRodney W. Grimesgroup list size of 16, as specified in RFC 1057. 1868fae3551SRodney W. GrimesTry 8, if users in a lot of groups cannot get response from the mount 1878fae3551SRodney W. Grimespoint. 1888fae3551SRodney W. Grimes.It Fl i 1898fae3551SRodney W. GrimesMake the mount interruptible, which implies that file system calls that 1908fae3551SRodney W. Grimesare delayed due to an unresponsive server will fail with EINTR when a 1918fae3551SRodney W. Grimestermination signal is posted for the process. 1928fae3551SRodney W. Grimes.It Fl l 193a62dc406SDoug RabsonUsed with NQNFS and NFSV3 to specify that the \fBReaddirPlus\fR RPC should 1948fae3551SRodney W. Grimesbe used. 1958fae3551SRodney W. GrimesThis option reduces RPC traffic for cases such as 1968fae3551SRodney W. Grimes.Dq "ls -l" , 197a62dc406SDoug Rabsonbut tends to flood the attribute and name caches with prefetched entries. 198ef8f7ac9SSheldon HearnTry this option and see whether performance improves or degrades. 199ef8f7ac9SSheldon HearnProbably 200a62dc406SDoug Rabsonmost useful for client to server network interconnects with a large bandwidth 201a62dc406SDoug Rabsontimes delay product. 2028fae3551SRodney W. Grimes.It Fl o 2038fae3551SRodney W. GrimesOptions are specified with a 2048fae3551SRodney W. Grimes.Fl o 2058fae3551SRodney W. Grimesflag followed by a comma separated string of options. 2068fae3551SRodney W. GrimesSee the 2078fae3551SRodney W. Grimes.Xr mount 8 2088fae3551SRodney W. Grimesman page for possible options and their meanings. 209a7475cf4SRuslan ErmilovThe following NFS specific options are also available: 210bc2cfd71SKarl Strickland.Bl -tag -width indent 211a7475cf4SRuslan Ermilov.It Cm port Ns = Ns Aq Ar port_number 212bc2cfd71SKarl StricklandUse specified port number for NFS requests. 213bc2cfd71SKarl StricklandThe default is to query the portmapper for the NFS port. 214a7475cf4SRuslan Ermilov.It Cm acregmin Ns = Ns Aq Ar seconds 215a7475cf4SRuslan Ermilov.It Cm acregmax Ns = Ns Aq Ar seconds 216a7475cf4SRuslan Ermilov.It Cm acdirmin Ns = Ns Aq Ar seconds 217a7475cf4SRuslan Ermilov.It Cm acdirmax Ns = Ns Aq Ar seconds 21846fc8f78SPhilippe CharnierWhen attributes of files are cached, a timeout calculated to determine 219a7475cf4SRuslan Ermilovwhether a given cache entry has expired. 220a7475cf4SRuslan ErmilovThese four values determine the upper and lower bounds of the timeouts for 221a7475cf4SRuslan Ermilov.Dq directory 222a7475cf4SRuslan Ermilovattributes and 223a7475cf4SRuslan Ermilov.Dq regular 224a7475cf4SRuslan Ermilov(ie: everything else). 225a7475cf4SRuslan ErmilovThe default values are 3 -> 60 seconds 226a7475cf4SRuslan Ermilovfor regular files, and 30 -> 60 seconds for directories. 227a7475cf4SRuslan ErmilovThe algorithm to calculate the timeout is based on the age of the file. 228a7475cf4SRuslan ErmilovThe older the file, 229c92e3fa5SPeter Wemmthe longer the cache is considered valid, subject to the limits above. 230a7475cf4SRuslan Ermilov.It Cm noinet4 , noinet6 231a7475cf4SRuslan ErmilovDisables 232a7475cf4SRuslan Ermilov.Dv AF_INET 233a7475cf4SRuslan Ermilovor 234a7475cf4SRuslan Ermilov.Dv AF_INET6 235a7475cf4SRuslan Ermilovconnections. 236a7475cf4SRuslan ErmilovUseful for hosts that have 237302f15f9SMatthew N. Doddboth an A record and an AAAA record for the same name. 238bc2cfd71SKarl Strickland.El 2398236257cSRuslan Ermilov.Pp 2408236257cSRuslan Ermilov.Sy Historic Fl o Sy Options 2418236257cSRuslan Ermilov.Pp 242f9dc1926SJoerg WunschUse of these options is deprecated, they are only mentioned here for 243f9dc1926SJoerg Wunschcompatibility with historic versions of 2447c7fb079SRuslan Ermilov.Nm . 2458236257cSRuslan Ermilov.Bl -tag -width ".Cm dumbtimer" 246a7475cf4SRuslan Ermilov.It Cm bg 247f9dc1926SJoerg WunschSame as 248f9dc1926SJoerg Wunsch.Fl b . 2493bbd554aSThomas Quinot.It Cm fg 2503bbd554aSThomas QuinotSame as not specifying 2513bbd554aSThomas Quinot.Fl b . 252a7475cf4SRuslan Ermilov.It Cm conn 253a34f78d1SJoseph KoshySame as not specifying 254f9dc1926SJoerg Wunsch.Fl c . 255a7475cf4SRuslan Ermilov.It Cm dumbtimer 256f9dc1926SJoerg WunschSame as 257f9dc1926SJoerg Wunsch.Fl d . 258a7475cf4SRuslan Ermilov.It Cm intr 259f9dc1926SJoerg WunschSame as 260f9dc1926SJoerg Wunsch.Fl i . 261a7475cf4SRuslan Ermilov.It Cm lockd 26213190d87SAlfred PerlsteinSame as not specifying 26313190d87SAlfred Perlstein.Fl L . 264a7475cf4SRuslan Ermilov.It Cm nfsv2 2652cd1c32cSDoug RabsonSame as 2662cd1c32cSDoug Rabson.Fl 2 . 267a7475cf4SRuslan Ermilov.It Cm nfsv3 268f9dc1926SJoerg WunschSame as 269f9dc1926SJoerg Wunsch.Fl 3 . 270a7475cf4SRuslan Ermilov.It Cm rdirplus 271f9dc1926SJoerg WunschSame as 272f9dc1926SJoerg Wunsch.Fl l . 273a7475cf4SRuslan Ermilov.It Cm mntudp 274f9dc1926SJoerg WunschSame as 275f9dc1926SJoerg Wunsch.Fl U . 276a7475cf4SRuslan Ermilov.It Cm resvport 277f9dc1926SJoerg WunschSame as 278f9dc1926SJoerg Wunsch.Fl P . 279a7475cf4SRuslan Ermilov.It Cm soft 280f9dc1926SJoerg WunschSame as 281f9dc1926SJoerg Wunsch.Fl s . 2823bbd554aSThomas Quinot.It Cm hard 2833bbd554aSThomas QuinotSame as not specifying 2843bbd554aSThomas Quinot.Fl s . 285a7475cf4SRuslan Ermilov.It Cm tcp 286f9dc1926SJoerg WunschSame as 287f9dc1926SJoerg Wunsch.Fl T . 288f9dc1926SJoerg Wunsch.El 2898fae3551SRodney W. Grimes.It Fl r 2908fae3551SRodney W. GrimesSet the read data size to the specified value. 291a62dc406SDoug RabsonIt should normally be a power of 2 greater than or equal to 1024. 2928fae3551SRodney W. GrimesThis should be used for UDP mounts when the 2938fae3551SRodney W. Grimes.Dq "fragments dropped due to timeout" 2948fae3551SRodney W. Grimesvalue is getting large while actively using a mount point. 2958fae3551SRodney W. Grimes(Use 2968fae3551SRodney W. Grimes.Xr netstat 1 2978fae3551SRodney W. Grimeswith the 2988fae3551SRodney W. Grimes.Fl s 2998fae3551SRodney W. Grimesoption to see what the 3008fae3551SRodney W. Grimes.Dq "fragments dropped due to timeout" 3018fae3551SRodney W. Grimesvalue is.) 3028fae3551SRodney W. GrimesSee the 3038fae3551SRodney W. Grimes.Fl w 3048fae3551SRodney W. Grimesoption as well. 3058fae3551SRodney W. Grimes.It Fl s 3068fae3551SRodney W. GrimesA soft mount, which implies that file system calls will fail 307a7475cf4SRuslan Ermilovafter 308a7475cf4SRuslan Ermilov.Ar retrycnt 309a7475cf4SRuslan Ermilovround trip timeout intervals. 3108fae3551SRodney W. Grimes.It Fl t 3118fae3551SRodney W. GrimesSet the initial retransmit timeout to the specified value. 3128fae3551SRodney W. GrimesMay be useful for fine tuning UDP mounts over internetworks 3138fae3551SRodney W. Grimeswith high packet loss rates or an overloaded server. 3148fae3551SRodney W. GrimesTry increasing the interval if 3158fae3551SRodney W. Grimes.Xr nfsstat 1 3168fae3551SRodney W. Grimesshows high retransmit rates while the file system is active or reducing the 3178fae3551SRodney W. Grimesvalue if there is a low retransmit rate but long response delay observed. 318a7475cf4SRuslan Ermilov(Normally, the 319a7475cf4SRuslan Ermilov.Fl d 320a7475cf4SRuslan Ermilovoption should be specified when using this option to manually 321a62dc406SDoug Rabsontune the timeout 322a62dc406SDoug Rabsoninterval.) 3238fae3551SRodney W. Grimes.It Fl w 3248fae3551SRodney W. GrimesSet the write data size to the specified value. 3259806e231SRuslan ErmilovDitto the comments w.r.t.\& the 3268fae3551SRodney W. Grimes.Fl r 3278fae3551SRodney W. Grimesoption, but using the 3288fae3551SRodney W. Grimes.Dq "fragments dropped due to timeout" 3298fae3551SRodney W. Grimesvalue on the server instead of the client. 3308fae3551SRodney W. GrimesNote that both the 3318fae3551SRodney W. Grimes.Fl r 3328fae3551SRodney W. Grimesand 3338fae3551SRodney W. Grimes.Fl w 3348fae3551SRodney W. Grimesoptions should only be used as a last ditch effort at improving performance 3358fae3551SRodney W. Grimeswhen mounting servers that do not support TCP mounts. 3368fae3551SRodney W. Grimes.It Fl x 3378fae3551SRodney W. GrimesSet the retransmit timeout count for soft mounts to the specified value. 3388fae3551SRodney W. Grimes.El 3398fae3551SRodney W. Grimes.Sh SEE ALSO 3400c269d1fSCraig Rodrigues.Xr nmount 2 , 3418fae3551SRodney W. Grimes.Xr unmount 2 , 3428fae3551SRodney W. Grimes.Xr fstab 5 , 3432a2d4405SMatthew Dillon.Xr mount 8 , 344ffc717e2SSheldon Hearn.Xr nfsd 8 , 345893d2b85SSheldon Hearn.Xr nfsiod 8 , 346893d2b85SSheldon Hearn.Xr showmount 8 347