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