]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/sbin/mount_nfs4/mount_nfs4.8
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / 6 / sbin / mount_nfs4 / mount_nfs4.8
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 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95
29 .\" $FreeBSD$
30 .\"
31 .Dd November 14, 2003
32 .Dt MOUNT_NFS4 8
33 .Os
34 .Sh NAME
35 .Nm mount_nfs4
36 .Nd mount NFSv4 file systems
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl biNPsTU
40 .Op Fl a Ar maxreadahead
41 .Op Fl D Ar deadthresh
42 .Op Fl I Ar readdirsize
43 .Op Fl o Ar options
44 .Op Fl R Ar retrycnt
45 .Op Fl t Ar timeout
46 .Op Fl x Ar retrans
47 .Ar rhost : Ns Ar path node
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility calls the
52 .Xr mount 2
53 system call to prepare and graft a remote NFSv4 file system
54 .Pq Ar rhost : Ns Ar path
55 on to the file system tree at the point
56 .Ar node .
57 This command is normally executed by
58 .Xr mount 8 .
59 It implements the NFSv4 protocol as described in RFC 3530,
60 .%T "NFS version 4 Protocol" .
61 .Pp
62 If the server becomes unresponsive while an NFSv4 file system is
63 mounted, any new or outstanding file operations on that file system
64 will hang uninterruptibly until the server comes back.
65 To modify this default behaviour, see the
66 .Fl i
67 and
68 .Fl s
69 flags.
70 .Pp
71 The options are:
72 .Bl -tag -width indent
73 .It Fl D
74 Set the
75 .Dq "dead server threshold"
76 to the specified number of round trip timeout intervals before a
77 .Dq "server not responding"
78 message is displayed.
79 .It Fl I
80 Set the readdir read size to the specified value.
81 The value should normally
82 be a multiple of
83 .Dv DIRBLKSIZ
84 that is \[<=] the read size for the mount.
85 .It Fl N
86 Do
87 .Em not
88 use a reserved socket port number (see below).
89 .It Fl P
90 Use a reserved socket port number.
91 This flag is obsolete, and only retained for compatibility reasons.
92 Reserved port numbers are used by default now.
93 (For the rare case where the client has a trusted root account
94 but untrustworthy users and the network cables are in secure areas this does
95 help, but for normal desktop clients this does not apply.)
96 .It Fl R
97 Set the mount retry count to the specified value.
98 The default is a retry count of zero, which means to keep retrying
99 forever.
100 There is a 60 second delay between each attempt.
101 .It Fl T
102 Use TCP transport.
103 This is the default.
104 .It Fl U
105 Force the mount protocol to use UDP transport.
106 This is not supported by the version 4 protocol and is provided only for
107 debugging purposes.
108 .It Fl a
109 Set the read-ahead count to the specified value.
110 This may be in the range of 0 - 4, and determines how many blocks
111 will be read ahead when a large file is being read sequentially.
112 Trying a value greater than 1 for this is suggested for
113 mounts with a large bandwidth * delay product.
114 .It Fl b
115 If an initial attempt to contact the server fails, fork off a child to keep
116 trying the mount in the background.
117 Useful for
118 .Xr fstab 5 ,
119 where the file system mount is not critical to multiuser operation.
120 .It Fl i
121 Make the mount interruptible, which implies that file system calls that
122 are delayed due to an unresponsive server will fail with
123 .Er EINTR
124 when a
125 termination signal is posted for the process.
126 .It Fl o
127 Options are specified with a
128 .Fl o
129 flag followed by a comma separated string of options.
130 See the
131 .Xr mount 8
132 man page for possible options and their meanings.
133 The following NFS specific options are also available:
134 .Pp
135 .Bl -tag -width indent -compact
136 .It Cm port Ns = Ns Aq Ar port_number
137 Use specified port number for NFSv4 requests.
138 The default is to use port 2049.
139 Set this to 0 to query the portmapper for the NFSv4 port.
140 .Pp
141 .It Cm acregmin Ns = Ns Aq Ar seconds
142 .It Cm acregmax Ns = Ns Aq Ar seconds
143 .It Cm acdirmin Ns = Ns Aq Ar seconds
144 .It Cm acdirmax Ns = Ns Aq Ar seconds
145 When attributes of files are cached, a timeout calculated to determine
146 whether a given cache entry has expired.
147 These four values determine the upper and lower bounds of the timeouts for
148 .Dq directory
149 attributes and
150 .Dq regular
151 (i.e., everything else).
152 The default values are 3 -> 60 seconds
153 for regular files, and 30 -> 60 seconds for directories.
154 The algorithm to calculate the timeout is based on the age of the file.
155 The older the file,
156 the longer the cache is considered valid, subject to the limits above.
157 .Pp
158 .It Cm noinet4 , noinet6
159 Disables
160 .Dv AF_INET
161 or
162 .Dv AF_INET6
163 connections.
164 Useful for hosts that have
165 both an A record and an AAAA record for the same name.
166 .El
167 .It Fl s
168 A soft mount, which implies that file system calls will fail
169 after
170 .Ar retrycnt
171 round trip timeout intervals.
172 .It Fl t
173 Set the initial retransmit timeout to the specified value.
174 May be useful for fine tuning UDP mounts over internetworks
175 with high packet loss rates or an overloaded server.
176 Try increasing the interval if
177 .Xr nfsstat 1
178 shows high retransmit rates while the file system is active or reducing the
179 value if there is a low retransmit rate but long response delay observed.
180 (Normally, the
181 .Fl d
182 option should be specified when using this option to manually
183 tune the timeout
184 interval.)
185 .It Fl x
186 Set the retransmit timeout count for soft mounts to the specified value.
187 .El
188 .Sh SEE ALSO
189 .Xr mount 2 ,
190 .Xr unmount 2 ,
191 .Xr fstab 5 ,
192 .Xr idmapd 8 ,
193 .Xr mount 8 ,
194 .Xr mount_nfs 8 ,
195 .Xr nfsd 8 ,
196 .Xr nfsiod 8
197 .Sh BUGS
198 This version of the NFSv4 client, while functional, is a long way
199 from compliance with RFC 3530.
200 It lacks lock state, reboot recovery,
201 delegation, GSS, and many other mandatory items from the RFC.