Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/mount_nfs.1m
+++ new/usr/src/man/man1m/mount_nfs.1m
1 1 '\" te
2 2 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved
3 +.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
3 4 .\" Copyright 1989 AT&T
4 5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
5 6 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
6 7 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 -.TH MOUNT_NFS 1M "Jun 3, 2015"
8 +.TH MOUNT_NFS 1M "Sep 8, 2015"
8 9 .SH NAME
9 10 mount_nfs \- mount remote NFS resources
10 11 .SH SYNOPSIS
11 12 .LP
12 13 .nf
13 14 \fBmount\fR [\fB-F\fR nfs] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR] [\fB-O\fR] \fIresource\fR
14 15 .fi
15 16
16 17 .LP
17 18 .nf
18 19 \fBmount\fR [\fB-F\fR nfs] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR] [\fB-O\fR] \fImount_point\fR
19 20 .fi
20 21
21 22 .LP
22 23 .nf
23 24 \fBmount\fR [\fB-F\fR nfs] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
24 25 [\fB-O\fR] \fIresource\fR \fImount_point\fR
25 26 .fi
26 27
27 28 .SH DESCRIPTION
28 29 .LP
29 30 The \fBmount\fR utility attaches a named \fIresource\fR to the file system
30 31 hierarchy at the pathname location \fImount_point\fR, which must already exist.
31 32 If \fImount_point\fR has any contents prior to the \fBmount\fR operation, the
32 33 contents remain hidden until the \fIresource\fR is once again unmounted.
33 34 .sp
34 35 .LP
35 36 \fBmount_nfs\fR starts the \fBlockd\fR(1M) and \fBstatd\fR(1M) daemons if they
36 37 are not already running.
37 38 .sp
38 39 .LP
39 40 If the resource is listed in the \fB/etc/vfstab\fR file, the command line can
40 41 specify either \fIresource\fR or \fImount_point\fR, and \fBmount\fR consults
41 42 \fB/etc/vfstab\fR for more information. If the \fB-F\fR option is omitted,
42 43 \fBmount\fR takes the file system type from \fB/etc/vfstab\fR.
43 44 .sp
44 45 .LP
45 46 If the resource is not listed in the \fB/etc/vfstab\fR file, then the command
46 47 line must specify both the \fIresource\fR and the \fImount_point\fR.
47 48 .sp
48 49 .LP
49 50 \fIhost\fR can be an IPv4 or IPv6 address string. As IPv6 addresses already
50 51 contain colons, enclose \fIhost\fR in a pair of square brackets when specifying
51 52 an IPv6 address string. Otherwise the first occurrence of a colon can be
52 53 interpreted as the separator between the host name and path, for example,
53 54 \fB[1080::8:800:200C:417A]:tmp/file\fR. See \fBinet\fR(7P) and \fBinet6\fR(7P).
54 55 .sp
55 56 .ne 2
56 57 .na
57 58 \fB\fIhost\fR:\fIpathname\fR\fR
58 59 .ad
59 60 .sp .6
60 61 .RS 4n
61 62 Where \fIhost\fR is the name of the \fBNFS\fR server host, and \fIpathname\fR
62 63 is the path name of the directory on the server being mounted. The path name is
63 64 interpreted according to the server's path name parsing rules and is not
64 65 necessarily slash-separated, though on most servers, this is the case.
65 66 .RE
66 67
67 68 .sp
68 69 .ne 2
69 70 .na
70 71 \fB\fInfs\fR://\fIhost\fR[:\fIport\fR]/\fIpathname\fR\fR
71 72 .ad
72 73 .sp .6
73 74 .RS 4n
74 75 This is an \fBNFS\fR \fBURL\fR and follows the standard convention for
75 76 \fBNFS\fR \fBURL\fRs as described in \fINFS URL Scheme\fR, RFC 2224. See the
76 77 discussion of \fBURL\fR's and the public option under \fBNFS FILE SYSTEMS\fR
77 78 for a more detailed discussion.
78 79 .RE
79 80
80 81 .sp
81 82 .ne 2
82 83 .na
83 84 \fB\fIhost\fR:\fIpathname\fR
84 85 \fInfs\fR://\fIhost\fR[:\fIport\fR]/\fIpathname\fR\fR
85 86 .ad
86 87 .br
87 88 .na
88 89 \fB\fR
89 90 .ad
90 91 .sp .6
91 92 .RS 4n
92 93 \fIhost\fR:\fIpathname\fR is a comma-separated list of
93 94 \fIhost\fR:\fIpathname\fR.
94 95 .sp
95 96 See the discussion of replicated file systems and failover under \fBNFS FILE
96 97 SYSTEMS\fR for a more detailed discussion.
97 98 .RE
98 99
99 100 .sp
100 101 .ne 2
101 102 .na
102 103 \fB\fIhostlist\fR \fIpathname\fR\fR
103 104 .ad
104 105 .sp .6
105 106 .RS 4n
106 107 \fIhostlist\fR is a comma-separated list of hosts.
107 108 .sp
108 109 See the discussion of replicated file systems and failover under \fBNFS FILE
109 110 SYSTEMS\fR for a more detailed discussion.
110 111 .RE
111 112
112 113 .sp
113 114 .LP
114 115 The \fBmount\fR command maintains a table of mounted file systems in
115 116 \fB/etc/mnttab\fR, described in \fBmnttab\fR(4).
116 117 .sp
117 118 .LP
118 119 \fBmount_nfs\fR supports both NFSv3 and NFSv4 mounts. The default NFS version
119 120 is NFSv4.
120 121 .SH OPTIONS
121 122 .LP
122 123 See \fBmount\fR(1M) for the list of supported \fIgeneric_options\fR. See
123 124 \fBshare_nfs\fR(1M) for a description of server options.
124 125 .sp
125 126 .ne 2
126 127 .na
127 128 \fB\fB-o\fR \fIspecific_options\fR\fR
128 129 .ad
129 130 .sp .6
130 131 .RS 4n
131 132 Set file system specific options according to a comma-separated list with no
132 133 intervening spaces.
133 134 .sp
134 135 .ne 2
135 136 .na
136 137 \fB\fBacdirmax=\fR\fIn\fR\fR
137 138 .ad
138 139 .sp .6
139 140 .RS 4n
140 141 Hold cached attributes for no more than \fIn\fR seconds after directory update.
141 142 The default value is \fB60\fR.
142 143 .RE
143 144
144 145 .sp
145 146 .ne 2
146 147 .na
147 148 \fB\fBacdirmin=\fR\fIn\fR\fR
148 149 .ad
149 150 .sp .6
150 151 .RS 4n
151 152 Hold cached attributes for at least \fIn\fR seconds after directory update. The
152 153 default value is \fB30\fR.
153 154 .RE
154 155
155 156 .sp
156 157 .ne 2
157 158 .na
158 159 \fB\fBacregmax=\fR\fIn\fR\fR
159 160 .ad
160 161 .sp .6
161 162 .RS 4n
162 163 Hold cached attributes for no more than \fIn\fR seconds after file
163 164 modification. The default value is \fB60\fR.
164 165 .RE
165 166
166 167 .sp
167 168 .ne 2
168 169 .na
169 170 \fB\fBacregmin=\fR\fIn\fR\fR
170 171 .ad
171 172 .sp .6
172 173 .RS 4n
173 174 Hold cached attributes for at least \fIn\fR seconds after file modification.
174 175 The default value is \fB3\fR.
175 176 .RE
176 177
177 178 .sp
178 179 .ne 2
179 180 .na
180 181 \fB\fBactimeo=\fR\fIn\fR\fR
181 182 .ad
182 183 .sp .6
183 184 .RS 4n
184 185 Set \fImin\fR and \fImax\fR times for regular files and directories to \fIn\fR
185 186 seconds. See "File Attributes," below, for a description of the effect of
186 187 setting this option to \fB0\fR.
187 188 .sp
188 189 See "Specifying Values for Attribute Cache Duration Options," below, for a
189 190 description of how \fBacdirmax\fR, \fBacdirmin\fR, \fBacregmax\fR,
190 191 \fBacregmin\fR, and \fBactimeo\fR are parsed on a \fBmount\fR command line.
191 192 .RE
192 193
193 194 .sp
194 195 .ne 2
195 196 .na
196 197 \fB\fBbg\fR | \fBfg\fR\fR
197 198 .ad
198 199 .sp .6
199 200 .RS 4n
200 201 If the first attempt fails, retry in the background, or, in the foreground. The
201 202 default is \fBfg\fR.
202 203 .RE
203 204
204 205 .sp
205 206 .ne 2
206 207 .na
207 208 \fB\fBforcedirectio\fR | \fBnoforcedirectio\fR\fR
208 209 .ad
209 210 .sp .6
210 211 .RS 4n
211 212 If \fBforcedirectio\fR is specified, then for the duration of the mount, forced
212 213 direct \fBI/O\fR is used. If the filesystem is mounted using
213 214 \fBforcedirectio\fR, data is transferred directly between client and server,
214 215 with no buffering on the client. If the filesystem is mounted using
215 216 \fBnoforcedirectio\fR, data is buffered on the client. \fBforcedirectio\fR is a
216 217 performance option that is of benefit only in large sequential data transfers.
217 218 The default behavior is \fBnoforcedirectio\fR.
218 219 .RE
219 220
220 221 .sp
221 222 .ne 2
222 223 .na
223 224 \fB\fBgrpid\fR\fR
224 225 .ad
225 226 .sp .6
226 227 .RS 4n
227 228 By default, the \fBGID\fR associated with a newly created file obeys the System
228 229 V semantics; that is, the \fBGID\fR is set to the effective \fBGID\fR of the
229 230 calling process. This behavior can be overridden on a per-directory basis by
230 231 setting the set-GID bit of the parent directory; in this case, the \fBGID\fR of
231 232 a newly created file is set to the \fBGID\fR of the parent directory (see
232 233 \fBopen\fR(2) and \fBmkdir\fR(2)). Files created on file systems that are
233 234 mounted with the \fBgrpid\fR option obeys \fBBSD\fR semantics independent of
234 235 whether the set-GID bit of the parent directory is set; that is, the \fBGID\fR
235 236 is unconditionally inherited from that of the parent directory.
236 237 .RE
237 238
238 239 .sp
239 240 .ne 2
240 241 .na
241 242 \fB\fBhard\fR | \fBsoft\fR\fR
242 243 .ad
243 244 .sp .6
244 245 .RS 4n
245 246 Continue to retry requests until the server responds (\fBhard\fR) or give up
246 247 and return an error (\fBsoft\fR). The default value is \fBhard\fR. Note that
247 248 NFSv4 clients do not support soft mounts.
248 249 .RE
249 250
250 251 .sp
251 252 .ne 2
252 253 .na
253 254 \fB\fBintr\fR | \fBnointr\fR\fR
254 255 .ad
255 256 .sp .6
256 257 .RS 4n
257 258 Allow (do not allow) keyboard interrupts to kill a process that is hung while
258 259 waiting for a response on a hard-mounted file system. The default is
259 260 \fBintr\fR, which makes it possible for clients to interrupt applications that
260 261 can be waiting for a remote mount.
261 262 .RE
262 263
263 264 .sp
264 265 .ne 2
265 266 .na
266 267 \fB\fBnoac\fR\fR
267 268 .ad
268 269 .sp .6
269 270 .RS 4n
270 271 Suppress data and attribute caching. The data caching that is suppressed is the
271 272 write-behind. The local page cache is still maintained, but data copied into it
272 273 is immediately written to the server.
273 274 .RE
274 275
275 276 .sp
276 277 .ne 2
277 278 .na
278 279 \fB\fBnocto\fR\fR
279 280 .ad
280 281 .sp .6
281 282 .RS 4n
282 283 Do not perform the normal close-to-open consistency. When a file is closed, all
283 284 modified data associated with the file is flushed to the server and not held on
284 285 the client. When a file is opened the client sends a request to the server to
285 286 validate the client's local caches. This behavior ensures a file's consistency
286 287 across multiple NFS clients. When \fB-nocto\fR is in effect, the client does
287 288 not perform the flush on close and the request for validation, allowing the
288 289 possiblity of differences among copies of the same file as stored on multiple
289 290 clients.
290 291 .sp
291 292 This option can be used where it can be guaranteed that accesses to a specified
292 293 file system are made from only one client and only that client. Under such a
293 294 condition, the effect of \fB-nocto\fR can be a slight performance gain.
294 295 .RE
295 296
296 297 .sp
297 298 .ne 2
298 299 .na
299 300 \fB\fBport=\fR\fIn\fR\fR
300 301 .ad
301 302 .sp .6
302 303 .RS 4n
303 304 The server \fBIP\fR port number. The default is \fBNFS_PORT\fR. If the
304 305 \fBport\fR option is specified, and if the resource includes one or more
305 306 \fBNFS\fR \fBURL\fRs, and if any of the \fBURL\fRs include a \fBport\fR number,
306 307 then the \fBport\fR number in the option and in the \fBURL\fR must be the same.
307 308 .RE
308 309
309 310 .sp
310 311 .ne 2
311 312 .na
312 313 \fB\fBposix\fR\fR
313 314 .ad
314 315 .sp .6
315 316 .RS 4n
316 317 Request \fBPOSIX.1\fR semantics for the file system. Requires a mount Version 2
317 318 \fBmountd\fR(1M) on the server. See \fBstandards\fR(5) for information
318 319 regarding POSIX.
319 320 .RE
320 321
321 322 .sp
322 323 .ne 2
323 324 .na
324 325 \fB\fBproto=\fR\fInetid\fR | \fBrdma\fR\fR
325 326 .ad
326 327 .sp .6
327 328 .RS 4n
328 329 By default, the transport protocol that the NFS mount uses is the first
329 330 available RDMA transport supported both by the client and the server. If no
330 331 RDMA transport is found, then it attempts to use a TCP transport or, failing
331 332 that, a UDP transport, as ordered in the \fB/etc/netconfig\fR file. If it does
332 333 not find a connection oriented transport, it uses the first available
333 334 connectionless transport.
334 335 .sp
335 336 Use this option to override the default behavior.
336 337 .sp
337 338 \fBproto\fR is set to the value of \fInetid\fR or \fBrdma\fR. \fInetid\fR is
338 339 the value of the \fBnetwork_id\fR field entry in the \fB/etc/netconfig\fR file.
339 340 .sp
340 341 The UDP protocol is not supported for NFS Version 4. If you specify a UDP
341 342 protocol with the \fBproto\fR option, NFS version 4 is not used.
342 343 .RE
343 344
344 345 .sp
345 346 .ne 2
346 347 .na
347 348 \fB\fBpublic\fR\fR
348 349 .ad
349 350 .sp .6
350 351 .RS 4n
351 352 The \fBpublic\fR option forces the use of the public file handle when
352 353 connecting to the \fBNFS\fR server. The resource specified might not have an
353 354 \fBNFS\fR \fBURL\fR. See the discussion of \fBURL\fRs and the public option
354 355 under \fBNFS FILE SYSTEMS\fR for a more detailed discussion.
355 356 .RE
356 357
357 358 .sp
358 359 .ne 2
359 360 .na
360 361 \fB\fBquota\fR | \fBnoquota\fR\fR
361 362 .ad
362 363 .sp .6
363 364 .RS 4n
364 365 Enable or prevent \fBquota\fR(1M) to check whether the user is over quota on
365 366 this file system; if the file system has quotas enabled on the server, quotas
366 367 are still checked for operations on this file system.
367 368 .RE
368 369
369 370 .sp
370 371 .ne 2
371 372 .na
372 373 \fB\fBremount\fR\fR
373 374 .ad
374 375 .sp .6
375 376 .RS 4n
376 377 Remounts a read-only file system as read-write (using the \fBrw\fR option).
377 378 This option cannot be used with other \fB-o\fR options, and this option works
378 379 only on currently mounted read-only file systems.
379 380 .RE
380 381
381 382 .sp
382 383 .ne 2
383 384 .na
384 385 \fB\fBretrans=\fR\fIn\fR\fR
385 386 .ad
386 387 .sp .6
387 388 .RS 4n
388 389 Set the number of \fBNFS\fR retransmissions to \fIn\fR. The default value is
389 390 \fB5\fR. For connection-oriented transports, this option has no effect because
390 391 it is assumed that the transport performs retransmissions on behalf of NFS.
391 392 .RE
392 393
393 394 .sp
394 395 .ne 2
395 396 .na
396 397 \fB\fBretry=\fR\fIn\fR\fR
397 398 .ad
398 399 .sp .6
399 400 .RS 4n
400 401 The number of times to retry the \fBmount\fR operation. The default for the
401 402 \fBmount\fR command is \fB10000\fR.
402 403 .sp
403 404 The default for the automounter is \fB0\fR, in other words, do not retry. You
404 405 might find it useful to increase this value on heavily loaded servers, where
405 406 automounter traffic is dropped, causing unnecessary server not responding
406 407 errors.
407 408 .RE
408 409
409 410 .sp
410 411 .ne 2
411 412 .na
412 413 \fB\fBrsize=\fR\fIn\fR\fR
413 414 .ad
414 415 .sp .6
415 416 .RS 4n
416 417 Set the read buffer size to a maximum of \fIn\fR bytes. The default value is
417 418 \fB1048576\fR when using connection-oriented transports with Version 3 or
418 419 Version 4 of the \fBNFS\fR protocol, and \fB32768\fR when using connection-less
419 420 transports. The default can be negotiated down if the server prefers a smaller
420 421 transfer size. "\fBRead\fR" operations may not necessarily use the maximum
421 422 buffer size. When using Version 2, the default value is \fB32768\fR for all
422 423 transports.
423 424 .RE
424 425
425 426 .sp
426 427 .ne 2
427 428 .na
428 429 \fB\fBsec=\fR\fImode\fR\fR
429 430 .ad
430 431 .sp .6
431 432 .RS 4n
432 433 Set the security \fImode\fR for \fBNFS\fR transactions. If \fBsec=\fR is not
433 434 specified, then the default action is to use \fBAUTH_SYS\fR over \fBNFS\fR
434 435 Version 2 mounts, use a user-configured default \fBauth\fR over NFS version 3
435 436 mounts, or to negotiate a mode over Version 4 mounts.
436 437 .sp
437 438 The preferred mode for NFS Version 3 mounts is the default mode specified in
438 439 \fB/etc/nfssec.conf\fR (see \fBnfssec.conf\fR(4)) on the client. If there is no
439 440 default configured in this file or if the server does not export using the
440 441 client's default mode, then the client picks the first mode that it supports in
441 442 the array of modes returned by the server. These alternatives are limited to
442 443 the security flavors listed in \fB/etc/nfssec.conf\fR.
443 444 .sp
444 445 NFS Version 4 mounts negotiate a security mode when the server returns an array
445 446 of security modes. The client attempts the mount with each security mode, in
446 447 order, until one is successful.
447 448 .sp
448 449 Only one mode can be specified with the \fBsec=\fR option. See \fBnfssec\fR(5)
449 450 for the available \fImode\fR options.
450 451 .RE
451 452
452 453 .sp
453 454 .ne 2
454 455 .na
455 456 \fB\fBsecure\fR\fR
456 457 .ad
457 458 .sp .6
458 459 .RS 4n
459 460 This option has been deprecated in favor of the \fBsec=\fR\fIdh\fR option.
460 461 .RE
461 462
462 463 .sp
463 464 .ne 2
464 465 .na
465 466 \fB\fBtimeo=\fR\fIn\fR\fR
466 467 .ad
467 468 .sp .6
468 469 .RS 4n
469 470 Set the \fBNFS\fR timeout to \fIn\fR tenths of a second. The default value is
470 471 \fB11\fR tenths of a second for connectionless transports, and \fB600\fR tenths
471 472 of a second for connection-oriented transports. This value is ignored for
472 473 connectionless transports. Such transports might implement their own timeouts,
473 474 which are outside the control of NFS.
474 475 .RE
475 476
476 477 .sp
477 478 .ne 2
478 479 .na
479 480 \fB\fBvers=\fR\fINFS version number\fR\fR
480 481 .ad
481 482 .sp .6
482 483 .RS 4n
483 484 By default, the version of \fBNFS\fR protocol used between the client and the
484 485 server is the highest one available on both systems. The default maximum for
485 486 the client is Version 4. This can be changed by setting the
486 487 \fBNFS_CLIENT_VERSMAX\fR parameter in \fB/etc/default/nfs\fR to a valid version
487 488 (2, 3, or 4). If the \fBNFS\fR server does not support the client's default
488 489 maximum, the next lowest version attempted until a matching version is found.
489 490 .RE
490 491
491 492 .sp
492 493 .ne 2
493 494 .na
494 495 \fB\fBwsize=\fR\fIn\fR\fR
495 496 .ad
496 497 .sp .6
497 498 .RS 4n
498 499 Set the write buffer size to a maximum of \fIn\fR bytes. The default value is
499 500 \fB1048576\fR when using connection-oriented transports with Version 3 or
500 501 Version 4 of the \fBNFS\fR protocol, and \fB32768\fR when using connection-less
501 502 transports. The default can be negotiated down if the server prefers a smaller
502 503 transfer size. "\fBWrite\fR" operations may not necessarily use the maximum
503 504 buffer size. When using Version 2, the default value is \fB32768\fR for all
504 505 transports.
505 506 .RE
506 507
507 508 .sp
508 509 .ne 2
509 510 .na
510 511 \fB\fBxattr\fR | \fBnoxattr\fR\fR
511 512 .ad
512 513 .sp .6
513 514 .RS 4n
514 515 Allow or disallow the creation and manipulation of extended attributes. The
515 516 default is \fBxattr\fR. See \fBfsattr\fR(5) for a description of extended
516 517 attributes.
517 518 .RE
518 519
519 520 .RE
520 521
521 522 .sp
522 523 .ne 2
523 524 .na
524 525 \fB\fB-O\fR\fR
525 526 .ad
526 527 .sp .6
527 528 .RS 4n
528 529 Overlay mount. Allow the file system to be mounted over an existing mount
529 530 point, making the underlying file system inaccessible. If a mount is attempted
530 531 on a pre-existing mount point without setting this flag, the mount fails,
531 532 producing the error "device busy."
532 533 .RE
533 534
534 535 .SH NFS FILE SYSTEMS
535 536 .ne 2
536 537 .na
537 538 \fBBackground versus Foreground\fR
538 539 .ad
539 540 .sp .6
540 541 .RS 4n
541 542 File systems mounted with the \fBbg\fR option indicate that \fBmount\fR is to
542 543 retry in the background if the server's mount daemon (\fBmountd\fR(1M)) does
543 544 not respond. \fBmount\fR retries the request up to the count specified in the
544 545 \fBretry=\fR\fIn\fR option. (Note that the default value for \fBretry\fR
545 546 differs between \fBmount\fR and \fBautomount\fR. See the description of
546 547 \fBretry\fR, above.) Once the file system is mounted, each \fBNFS\fR request
547 548 made in the kernel waits \fBtimeo=\fR\fIn\fR tenths of a second for a response.
548 549 If no response arrives, the time-out is multiplied by \fB2\fR and the request
549 550 is retransmitted. When the number of retransmissions has reached the number
550 551 specified in the \fBretrans=\fR\fIn\fR option, a file system mounted with the
551 552 \fBsoft\fR option returns an error on the request; one mounted with the
552 553 \fBhard\fR option prints a warning message and continues to retry the request.
553 554 .RE
554 555
555 556 .sp
556 557 .ne 2
557 558 .na
558 559 \fBHard versus Soft\fR
559 560 .ad
560 561 .sp .6
561 562 .RS 4n
562 563 File systems that are mounted read-write or that contain executable files
563 564 should always be mounted with the \fBhard\fR option. Applications using
564 565 \fBsoft\fR mounted file systems can incur unexpected \fBI/O\fR errors, file
565 566 corruption, and unexpected program core dumps. The soft option is not
566 567 recommended.
567 568 .RE
568 569
569 570 .sp
570 571 .ne 2
571 572 .na
572 573 \fBAuthenticated requests\fR
573 574 .ad
574 575 .sp .6
575 576 .RS 4n
576 577 The server can require authenticated \fBNFS\fR requests from the client.
577 578 \fBsec=\fR\fIdh\fR authentication might be required. See \fBnfssec\fR(5).
578 579 .RE
579 580
580 581 .sp
581 582 .ne 2
582 583 .na
583 584 \fBURLs and the public option\fR
584 585 .ad
585 586 .sp .6
586 587 .RS 4n
587 588 If the \fBpublic\fR option is specified, or if the \fIresource\fR includes and
588 589 \fBNFS\fR \fBURL\fR, \fBmount\fR attempts to connect to the server using the
589 590 public file handle lookup protocol. See \fIWebNFS Client Specification\fR, RFC
590 591 2054. If the server supports the public file handle, the attempt is successful;
591 592 \fBmount\fR does not need to contact the server's \fBrpcbind\fR(1M) and the
592 593 \fBmountd\fR(1M) daemons to get the port number of the \fBmount\fR server and
593 594 the initial file handle of \fIpathname\fR, respectively. If the \fBNFS\fR
594 595 client and server are separated by a firewall that allows all outbound
595 596 connections through specific ports, such as \fBNFS_PORT\fR, then this enables
596 597 \fBNFS\fR operations through the firewall. The public option and the \fBNFS\fR
597 598 \fBURL\fR can be specified independently or together. They interact as
598 599 specified in the following matrix:
599 600 .sp
600 601 .in +2
601 602 .nf
602 603 Resource Style
603 604
604 605 \fIhost\fR:\fIpathname\fR NFS URL
605 606
606 607 public option Force public file Force public file
607 608 handle and fail handle and fail
608 609 mount if not supported. mount if not supported.
609 610
610 611 Use Native paths. Use Canonical paths.
611 612
612 613 default Use MOUNT protocol. Try public file handle
613 614 with Canonical paths.
614 615 Fall back to MOUNT
615 616 protocol if not
616 617 supported.
617 618 .fi
618 619 .in -2
619 620
620 621 A Native path is a path name that is interpreted according to conventions used
621 622 on the native operating system of the \fBNFS\fR server. A Canonical path is a
622 623 path name that is interpreted according to the \fBURL\fR rules. See \fIUniform
623 624 Resource Locators (URL)\fR, RFC 1738. See for uses of Native and Canonical
624 625 paths.
625 626 .RE
626 627
627 628 .sp
628 629 .ne 2
629 630 .na
630 631 \fBReplicated file systems and failover\fR
631 632 .ad
632 633 .sp .6
633 634 .RS 4n
634 635 \fIresource\fR can list multiple read\(mionly file systems to be used to
635 636 provide data. These file systems should contain equivalent directory structures
636 637 and identical files. It is also recommended that they be created by a utility
637 638 such as \fBrdist\fR(1). The file systems can be specified either with a
638 639 comma\(miseparated list of \fIhost:/pathname\fR entries and/or \fBNFS\fR
639 640 \fBURL\fR entries, or with a comma \(miseparated list of hosts, if all file
640 641 system names are the same. If multiple file systems are named and the first
641 642 server in the list is down, failover uses the next alternate server to access
642 643 files. If the read\(mionly option is not chosen, replication is disabled. File
643 644 access, for NFS Versions 2 and 3, is blocked on the original if NFS locks are
644 645 active for that file.
645 646 .RE
646 647
647 648 .SS "File Attributes"
648 649 .LP
649 650 To improve \fBNFS\fR read performance, files and file attributes are cached.
650 651 File modification times get updated whenever a write occurs. However, file
651 652 access times can be temporarily out-of-date until the cache gets refreshed.
652 653 .sp
653 654 .LP
654 655 The attribute cache retains file attributes on the client. Attributes for a
655 656 file are assigned a time to be flushed. If the file is modified before the
656 657 flush time, then the flush time is extended by the time since the last
657 658 modification (under the assumption that files that changed recently are likely
658 659 to change soon). There is a minimum and maximum flush time extension for
659 660 regular files and for directories. Setting \fBactimeo=\fR\fIn\fR sets flush
660 661 time to \fIn\fR seconds for both regular files and directories.
661 662 .sp
662 663 .LP
663 664 Setting \fBactimeo=0\fR disables attribute caching on the client. This means
664 665 that every reference to attributes is satisfied directly from the server though
665 666 file data is still cached. While this guarantees that the client always has the
666 667 latest file attributes from the server, it has an adverse effect on performance
667 668 through additional latency, network load, and server load.
668 669 .sp
669 670 .LP
670 671 Setting the \fBnoac\fR option also disables attribute caching, but has the
671 672 further effect of disabling client write caching. While this guarantees that
672 673 data written by an application is written directly to a server, where it can be
673 674 viewed immediately by other clients, it has a significant adverse effect on
674 675 client write performance. Data written into memory-mapped file pages
675 676 (\fBmmap\fR(2)) are not written directly to this server.
676 677 .SS "Specifying Values for Attribute Cache Duration Options"
677 678 .LP
678 679 The attribute cache duration options are \fBacdirmax\fR, \fBacdirmin\fR,
679 680 \fBacregmax\fR, \fBacregmin\fR, and \fBactimeo\fR, as described under OPTIONS.
680 681 A value specified for \fBactimeo\fR sets the values of all attribute cache
681 682 duration options except for any of these options specified following
682 683 \fBactimeo\fR on a \fBmount\fR command line. For example, consider the
683 684 following command:
684 685 .sp
685 686 .in +2
686 687 .nf
687 688 example# mount -o acdirmax=10,actimeo=1000 server:/path /localpath
688 689 .fi
689 690 .in -2
690 691
691 692 .sp
692 693 .LP
693 694 Because \fBactimeo\fR is the last duration option in the command line, its
694 695 value (\fB1000\fR) becomes the setting for all of the duration options,
695 696 including \fBacdirmax\fR. Now consider:
696 697 .sp
697 698 .in +2
698 699 .nf
699 700 example# mount -o actimeo=1000,acdirmax=10 server:/path /localpath
700 701 .fi
701 702 .in -2
702 703
703 704 .sp
704 705 .LP
705 706 Because the \fBacdirmax\fR option follows \fBactimeo\fR on the command line, it
706 707 is assigned the value specified (\fB10\fR). The remaining duration options are
707 708 set to the value of \fBactimeo\fR (\fB1000\fR).
708 709 .SH EXAMPLES
709 710 .LP
710 711 \fBExample 1 \fRMounting an \fBNFS\fR File System
711 712 .sp
712 713 .LP
713 714 To mount an \fBNFS\fR file system:
714 715
715 716 .sp
716 717 .in +2
717 718 .nf
718 719 example# mount serv:/usr/src /usr/src
719 720 .fi
720 721 .in -2
721 722 .sp
722 723
723 724 .LP
724 725 \fBExample 2 \fRMounting An \fBNFS\fR File System Read-Only With No suid
725 726 Privileges
726 727 .sp
727 728 .LP
728 729 To mount an \fBNFS\fR file system read-only with no suid privileges:
729 730
730 731 .sp
731 732 .in +2
732 733 .nf
733 734 example# mount -r -o nosuid serv:/usr/src /usr/src
734 735 .fi
735 736 .in -2
736 737 .sp
737 738
738 739 .LP
739 740 \fBExample 3 \fRMounting An \fBNFS\fR File System Over Version 2, with the UDP
740 741 Transport
741 742 .sp
742 743 .LP
743 744 To mount an \fBNFS\fR file system over Version 2, with the UDP transport:
744 745
745 746 .sp
746 747 .in +2
747 748 .nf
748 749 example# mount -o vers=2,proto=udp serv:/usr/src /usr/src
749 750 .fi
750 751 .in -2
751 752 .sp
752 753
753 754 .LP
754 755 \fBExample 4 \fRMounting an \fBNFS\fR File System Using An \fBNFS\fR \fBURL\fR
755 756 .sp
756 757 .LP
757 758 To mount an \fBNFS\fR file system using an \fBNFS\fR \fBURL\fR (a canonical
758 759 path):
759 760
760 761 .sp
761 762 .in +2
762 763 .nf
763 764 example# mount nfs://serv/usr/man /usr/man
764 765 .fi
765 766 .in -2
766 767 .sp
767 768
768 769 .LP
769 770 \fBExample 5 \fRMounting An \fBNFS\fR File System Forcing Use Of The Public
770 771 File Handle
771 772 .sp
772 773 .LP
773 774 To mount an \fBNFS\fR file system and force the use of the public file handle
774 775 and an \fBNFS\fR \fBURL\fR (a canonical path) that has a non 7-bit ASCII escape
775 776 sequence:
776 777
777 778 .sp
778 779 .in +2
779 780 .nf
780 781 example# mount -o public nfs://serv/usr/%A0abc /mnt/test
781 782 .fi
782 783 .in -2
783 784 .sp
784 785
785 786 .LP
786 787 \fBExample 6 \fRMounting an \fBNFS\fR File System Using a Native Path
787 788 .sp
788 789 .LP
789 790 To mount an \fBNFS\fR file system using a native path (where the server uses
790 791 colons (":") as the component separator) and the public file handle:
791 792
792 793 .sp
793 794 .in +2
794 795 .nf
795 796 example# mount -o public serv:C:doc:new /usr/doc
796 797 .fi
797 798 .in -2
798 799 .sp
799 800
800 801 .LP
801 802 \fBExample 7 \fRMounting a Replicated Set of \fBNFS\fR File Systems with the
802 803 Same Pathnames
803 804 .sp
804 805 .LP
805 806 To mount a replicated set of \fBNFS\fR file systems with the same pathnames:
806 807
807 808 .sp
808 809 .in +2
809 810 .nf
810 811 example# mount serv\(mia,serv\(mib,serv\(mic:/usr/man /usr/man
811 812 .fi
812 813 .in -2
813 814 .sp
814 815
815 816 .LP
816 817 \fBExample 8 \fRMounting a Replicated Set of \fBNFS\fR File Systems with
817 818 Different Pathnames
818 819 .sp
819 820 .LP
820 821 To mount a replicated set of \fBNFS\fR file systems with different pathnames:
821 822
822 823 .sp
823 824 .in +2
824 825 .nf
825 826 example# mount serv\(mix:/usr/man,serv\(miy:/var/man,nfs://serv-z/man /usr/man
826 827 .fi
827 828 .in -2
828 829 .sp
829 830
830 831 .SH FILES
831 832 .ne 2
832 833 .na
833 834 \fB\fB/etc/mnttab\fR\fR
834 835 .ad
835 836 .sp .6
836 837 .RS 4n
837 838 table of mounted file systems
838 839 .RE
839 840
840 841 .sp
841 842 .ne 2
842 843 .na
843 844 \fB\fB/etc/dfs/fstypes\fR\fR
844 845 .ad
845 846 .sp .6
846 847 .RS 4n
847 848 default distributed file system type
848 849 .RE
849 850
850 851 .sp
851 852 .ne 2
852 853 .na
853 854 \fB\fB/etc/vfstab\fR\fR
854 855 .ad
855 856 .sp .6
856 857 .RS 4n
857 858 table of automatically mounted resources
858 859 .RE
859 860
860 861 .SH SEE ALSO
861 862 .LP
862 863 \fBrdist\fR(1), \fBlockd\fR(1M), \fBmountall\fR(1M), \fBmountd\fR(1M),
863 864 \fBnfsd\fR(1M), \fBquota\fR(1M), \fBstatd\fR(1M), \fBmkdir\fR(2),
864 865 \fBmmap\fR(2), \fBmount\fR(2), \fBopen\fR(2), \fBumount\fR(2), \fBmnttab\fR(4),
865 866 \fBnfs\fR(4), \fBnfssec.conf\fR(4), \fBattributes\fR(5), \fBfsattr\fR(5),
866 867 \fBnfssec\fR(5), \fBstandards\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P),
867 868 \fBlofs\fR(7FS)
868 869 .sp
869 870 .LP
870 871 Callaghan, Brent, \fIWebNFS Client Specification\fR, RFC 2054, October 1996.
871 872 .sp
872 873 .LP
873 874 Callaghan, Brent, \fINFS URL Scheme\fR, RFC 2224, October 1997.
874 875 .sp
875 876 .LP
876 877 Berners-Lee, Masinter & McCahill , \fIUniform Resource Locators (URL)\fR, RFC
877 878 1738, December 1994.
878 879 .SH NOTES
879 880 .LP
880 881 An \fBNFS\fR server should not attempt to mount its own file systems. See
881 882 \fBlofs\fR(7FS).
882 883 .sp
883 884 .LP
884 885 If the directory on which a file system is to be mounted is a symbolic link,
885 886 the file system is mounted on \fBthe directory to which the symbolic link
886 887 refers,\fR rather than being mounted on top of the symbolic link itself.
887 888 .sp
888 889 .LP
889 890 SunOS 4.x used the \fBbiod\fR maintenance procedure to perform parallel
890 891 read-ahead and write-behind on \fBNFS\fR clients. SunOS 5.x made \fBbiod\fR
↓ open down ↓ |
873 lines elided |
↑ open up ↑ |
891 892 obsolete with multi-threaded processing, which transparently performs parallel
892 893 read-ahead and write-behind.
893 894 .sp
894 895 .LP
895 896 Since the root \fB(\fR/\fB)\fR file system is mounted read-only by the kernel
896 897 during the boot process, only the \fBremount\fR option (and options that can be
897 898 used in conjunction with \fBremount\fR) affect the root (\fB/\fR) entry in the
898 899 \fB/etc/vfstab\fR file.
899 900 .sp
900 901 .LP
901 -\fBmount_cachefs\fR cannot be used with replicated NFS mounts or any NFS
902 -Version 4 mount.
903 -.sp
904 -.LP
905 902 The NFS client service is managed by the service management facility,
906 903 \fBsmf\fR(5), under the service identifier:
907 904 .sp
908 905 .in +2
909 906 .nf
910 907 svc:/network/nfs/client:default
911 908 .fi
912 909 .in -2
913 910 .sp
914 911
915 912 .sp
916 913 .LP
917 914 Administrative actions on this service, such as enabling, disabling, or
918 915 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
919 916 status can be queried using the \fBsvcs\fR(1) command.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX