Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/mount_nfs.1m.man.txt
+++ new/usr/src/man/man1m/mount_nfs.1m.man.txt
1 1 MOUNT_NFS(1M) Maintenance Commands MOUNT_NFS(1M)
2 2
3 3
4 4
5 5 NAME
6 6 mount_nfs - mount remote NFS resources
7 7
8 8 SYNOPSIS
9 9 mount [-F nfs] [generic_options] [-o specific_options] [-O] resource
10 10
11 11
12 12 mount [-F nfs] [generic_options] [-o specific_options] [-O] mount_point
13 13
14 14
15 15 mount [-F nfs] [generic_options] [-o specific_options]
16 16 [-O] resource mount_point
17 17
18 18
19 19 DESCRIPTION
20 20 The mount utility attaches a named resource to the file system
21 21 hierarchy at the pathname location mount_point, which must already
22 22 exist. If mount_point has any contents prior to the mount operation,
23 23 the contents remain hidden until the resource is once again unmounted.
24 24
25 25
26 26 mount_nfs starts the lockd(1M) and statd(1M) daemons if they are not
27 27 already running.
28 28
29 29
30 30 If the resource is listed in the /etc/vfstab file, the command line can
31 31 specify either resource or mount_point, and mount consults /etc/vfstab
32 32 for more information. If the -F option is omitted, mount takes the file
33 33 system type from /etc/vfstab.
34 34
35 35
36 36 If the resource is not listed in the /etc/vfstab file, then the command
37 37 line must specify both the resource and the mount_point.
38 38
39 39
40 40 host can be an IPv4 or IPv6 address string. As IPv6 addresses already
41 41 contain colons, enclose host in a pair of square brackets when
42 42 specifying an IPv6 address string. Otherwise the first occurrence of a
43 43 colon can be interpreted as the separator between the host name and
44 44 path, for example, [1080::8:800:200C:417A]:tmp/file. See inet(7P) and
45 45 inet6(7P).
46 46
47 47 host:pathname
48 48 Where host is the name of the NFS server host, and pathname is the
49 49 path name of the directory on the server being mounted. The path
50 50 name is interpreted according to the server's path name parsing
51 51 rules and is not necessarily slash-separated, though on most
52 52 servers, this is the case.
53 53
54 54
55 55 nfs://host[:port]/pathname
56 56 This is an NFS URL and follows the standard convention for NFS URLs
57 57 as described in NFS URL Scheme, RFC 2224. See the discussion of
58 58 URL's and the public option under NFS FILE SYSTEMS for a more
59 59 detailed discussion.
60 60
61 61
62 62 host:pathname nfs://host[:port]/pathname
63 63 host:pathname is a comma-separated list of host:pathname.
64 64
65 65 See the discussion of replicated file systems and failover under
66 66 NFS FILE SYSTEMS for a more detailed discussion.
67 67
68 68
69 69 hostlist pathname
70 70 hostlist is a comma-separated list of hosts.
71 71
72 72 See the discussion of replicated file systems and failover under
73 73 NFS FILE SYSTEMS for a more detailed discussion.
74 74
75 75
76 76
77 77 The mount command maintains a table of mounted file systems in
78 78 /etc/mnttab, described in mnttab(4).
79 79
80 80
81 81 mount_nfs supports both NFSv3 and NFSv4 mounts. The default NFS version
82 82 is NFSv4.
83 83
84 84 OPTIONS
85 85 See mount(1M) for the list of supported generic_options. See
86 86 share_nfs(1M) for a description of server options.
87 87
88 88 -o specific_options
89 89 Set file system specific options according to a comma-separated list
90 90 with no intervening spaces.
91 91
92 92 acdirmax=n
93 93 Hold cached attributes for no more than n seconds after
94 94 directory update. The default value is 60.
95 95
96 96
97 97 acdirmin=n
98 98 Hold cached attributes for at least n seconds after directory
99 99 update. The default value is 30.
100 100
101 101
102 102 acregmax=n
103 103 Hold cached attributes for no more than n seconds after file
104 104 modification. The default value is 60.
105 105
106 106
107 107 acregmin=n
108 108 Hold cached attributes for at least n seconds after file
109 109 modification. The default value is 3.
110 110
111 111
112 112 actimeo=n
113 113 Set min and max times for regular files and directories to n
114 114 seconds. See "File Attributes," below, for a description of the
115 115 effect of setting this option to 0.
116 116
117 117 See "Specifying Values for Attribute Cache Duration Options,"
118 118 below, for a description of how acdirmax, acdirmin, acregmax,
119 119 acregmin, and actimeo are parsed on a mount command line.
120 120
121 121
122 122 bg | fg
123 123 If the first attempt fails, retry in the background, or, in the
124 124 foreground. The default is fg.
125 125
126 126
127 127 forcedirectio | noforcedirectio
128 128 If forcedirectio is specified, then for the duration of the
129 129 mount, forced direct I/O is used. If the filesystem is mounted
130 130 using forcedirectio, data is transferred directly between
131 131 client and server, with no buffering on the client. If the
132 132 filesystem is mounted using noforcedirectio, data is buffered
133 133 on the client. forcedirectio is a performance option that is of
134 134 benefit only in large sequential data transfers. The default
135 135 behavior is noforcedirectio.
136 136
137 137
138 138 grpid
139 139 By default, the GID associated with a newly created file obeys
140 140 the System V semantics; that is, the GID is set to the
141 141 effective GID of the calling process. This behavior can be
142 142 overridden on a per-directory basis by setting the set-GID bit of
143 143 the parent directory; in this case, the GID of a newly created
144 144 file is set to the GID of the parent directory (see open(2) and
145 145 mkdir(2)). Files created on file systems that are mounted with
146 146 the grpid option obeys BSD semantics independent of whether the
147 147 set-GID bit of the parent directory is set; that is, the GID is
148 148 unconditionally inherited from that of the parent directory.
149 149
150 150
151 151 hard | soft
152 152 Continue to retry requests until the server responds (hard) or
153 153 give up and return an error (soft). The default value is hard.
154 154 Note that NFSv4 clients do not support soft mounts.
155 155
156 156
157 157 intr | nointr
158 158 Allow (do not allow) keyboard interrupts to kill a process that
159 159 is hung while waiting for a response on a hard-mounted file
160 160 system. The default is intr, which makes it possible for
161 161 clients to interrupt applications that can be waiting for a
162 162 remote mount.
163 163
164 164
165 165 noac
166 166 Suppress data and attribute caching. The data caching that is
167 167 suppressed is the write-behind. The local page cache is still
168 168 maintained, but data copied into it is immediately written to
169 169 the server.
170 170
171 171
172 172 nocto
173 173 Do not perform the normal close-to-open consistency. When a file
174 174 is closed, all modified data associated with the file is
175 175 flushed to the server and not held on the client. When a file
176 176 is opened the client sends a request to the server to validate
177 177 the client's local caches. This behavior ensures a file's
178 178 consistency across multiple NFS clients. When -nocto is in
179 179 effect, the client does not perform the flush on close and the
180 180 request for validation, allowing the possiblity of differences
181 181 among copies of the same file as stored on multiple clients.
182 182
183 183 This option can be used where it can be guaranteed that
184 184 accesses to a specified file system are made from only one
185 185 client and only that client. Under such a condition, the effect
186 186 of -nocto can be a slight performance gain.
187 187
188 188
189 189 port=n
190 190 The server IP port number. The default is NFS_PORT. If the port
191 191 option is specified, and if the resource includes one or more
192 192 NFS URLs, and if any of the URLs include a port number, then
193 193 the port number in the option and in the URL must be the same.
194 194
195 195
196 196 posix
197 197 Request POSIX.1 semantics for the file system. Requires a mount
198 198 Version 2 mountd(1M) on the server. See standards(5) for
199 199 information regarding POSIX.
200 200
201 201
202 202 proto=netid | rdma
203 203 By default, the transport protocol that the NFS mount uses is
204 204 the first available RDMA transport supported both by the client
205 205 and the server. If no RDMA transport is found, then it attempts
206 206 to use a TCP transport or, failing that, a UDP transport, as
207 207 ordered in the /etc/netconfig file. If it does not find a
208 208 connection oriented transport, it uses the first available
209 209 connectionless transport.
210 210
211 211 Use this option to override the default behavior.
212 212
213 213 proto is set to the value of netid or rdma. netid is the value
214 214 of the network_id field entry in the /etc/netconfig file.
215 215
216 216 The UDP protocol is not supported for NFS Version 4. If you
217 217 specify a UDP protocol with the proto option, NFS version 4 is
218 218 not used.
219 219
220 220
221 221 public
222 222 The public option forces the use of the public file handle when
223 223 connecting to the NFS server. The resource specified might not
224 224 have an NFS URL. See the discussion of URLs and the public
225 225 option under NFS FILE SYSTEMS for a more detailed discussion.
226 226
227 227
228 228 quota | noquota
229 229 Enable or prevent quota(1M) to check whether the user is over
230 230 quota on this file system; if the file system has quotas
231 231 enabled on the server, quotas are still checked for operations
232 232 on this file system.
233 233
234 234
235 235 remount
236 236 Remounts a read-only file system as read-write (using the rw
237 237 option). This option cannot be used with other -o options, and
238 238 this option works only on currently mounted read-only file
239 239 systems.
240 240
241 241
242 242 retrans=n
243 243 Set the number of NFS retransmissions to n. The default value
244 244 is 5. For connection-oriented transports, this option has no
245 245 effect because it is assumed that the transport performs
246 246 retransmissions on behalf of NFS.
247 247
248 248
249 249 retry=n
250 250 The number of times to retry the mount operation. The default
251 251 for the mount command is 10000.
252 252
253 253 The default for the automounter is 0, in other words, do not
254 254 retry. You might find it useful to increase this value on
255 255 heavily loaded servers, where automounter traffic is dropped,
256 256 causing unnecessary server not responding errors.
257 257
258 258
259 259 rsize=n
260 260 Set the read buffer size to a maximum of n bytes. The default
261 261 value is 1048576 when using connection-oriented transports with
262 262 Version 3 or Version 4 of the NFS protocol, and 32768 when
263 263 using connection-less transports. The default can be negotiated
264 264 down if the server prefers a smaller transfer size. "Read"
265 265 operations may not necessarily use the maximum buffer size.
266 266 When using Version 2, the default value is 32768 for all
267 267 transports.
268 268
269 269
270 270 sec=mode
271 271 Set the security mode for NFS transactions. If sec= is not
272 272 specified, then the default action is to use AUTH_SYS over NFS
273 273 Version 2 mounts, use a user-configured default auth over NFS
274 274 version 3 mounts, or to negotiate a mode over Version 4
275 275 mounts.
276 276
277 277 The preferred mode for NFS Version 3 mounts is the default mode
278 278 specified in /etc/nfssec.conf (see nfssec.conf(4)) on the
279 279 client. If there is no default configured in this file or if
280 280 the server does not export using the client's default mode,
281 281 then the client picks the first mode that it supports in the
282 282 array of modes returned by the server. These alternatives are
283 283 limited to the security flavors listed in /etc/nfssec.conf.
284 284
285 285 NFS Version 4 mounts negotiate a security mode when the server
286 286 returns an array of security modes. The client attempts the
287 287 mount with each security mode, in order, until one is
288 288 successful.
289 289
290 290 Only one mode can be specified with the sec= option. See
291 291 nfssec(5) for the available mode options.
292 292
293 293
294 294 secure
295 295 This option has been deprecated in favor of the sec=dh option.
296 296
297 297
298 298 timeo=n
299 299 Set the NFS timeout to n tenths of a second. The default value
300 300 is 11 tenths of a second for connectionless transports, and 600
301 301 tenths of a second for connection-oriented transports. This
302 302 value is ignored for connectionless transports. Such transports
303 303 might implement their own timeouts, which are outside the
304 304 control of NFS.
305 305
306 306
307 307 vers=NFS version number
308 308 By default, the version of NFS protocol used between the client
309 309 and the server is the highest one available on both systems.
310 310 The default maximum for the client is Version 4. This can be
311 311 changed by setting the NFS_CLIENT_VERSMAX parameter in
312 312 /etc/default/nfs to a valid version (2, 3, or 4). If the NFS
313 313 server does not support the client's default maximum, the next
314 314 lowest version attempted until a matching version is found.
315 315
316 316
317 317 wsize=n
318 318 Set the write buffer size to a maximum of n bytes. The default
319 319 value is 1048576 when using connection-oriented transports with
320 320 Version 3 or Version 4 of the NFS protocol, and 32768 when
321 321 using connection-less transports. The default can be negotiated
322 322 down if the server prefers a smaller transfer size. "Write"
323 323 operations may not necessarily use the maximum buffer size.
324 324 When using Version 2, the default value is 32768 for all
325 325 transports.
326 326
327 327
328 328 xattr | noxattr
329 329 Allow or disallow the creation and manipulation of extended
330 330 attributes. The default is xattr. See fsattr(5) for a
331 331 description of extended attributes.
332 332
333 333
334 334
335 335 -O
336 336 Overlay mount. Allow the file system to be mounted over an existing
337 337 mount point, making the underlying file system inaccessible. If a
338 338 mount is attempted on a pre-existing mount point without setting
339 339 this flag, the mount fails, producing the error "device busy."
340 340
341 341
342 342 NFS FILE SYSTEMS
343 343 Background versus Foreground
344 344 File systems mounted with the bg option indicate that mount is to
345 345 retry in the background if the server's mount daemon (mountd(1M))
346 346 does not respond. mount retries the request up to the count
347 347 specified in the retry=n option. (Note that the default value for
348 348 retry differs between mount and automount. See the description of
349 349 retry, above.) Once the file system is mounted, each NFS request
350 350 made in the kernel waits timeo=n tenths of a second for a response.
351 351 If no response arrives, the time-out is multiplied by 2 and the
352 352 request is retransmitted. When the number of retransmissions has
353 353 reached the number specified in the retrans=n option, a file system
354 354 mounted with the soft option returns an error on the request; one
355 355 mounted with the hard option prints a warning message and continues
356 356 to retry the request.
357 357
358 358
359 359 Hard versus Soft
360 360 File systems that are mounted read-write or that contain executable
361 361 files should always be mounted with the hard option. Applications
362 362 using soft mounted file systems can incur unexpected I/O errors,
363 363 file corruption, and unexpected program core dumps. The soft option
364 364 is not recommended.
365 365
366 366
367 367 Authenticated requests
368 368 The server can require authenticated NFS requests from the client.
369 369 sec=dh authentication might be required. See nfssec(5).
370 370
371 371
372 372 URLs and the public option
373 373 If the public option is specified, or if the resource includes and
374 374 NFS URL, mount attempts to connect to the server using the public
375 375 file handle lookup protocol. See WebNFS Client Specification, RFC
376 376 2054. If the server supports the public file handle, the attempt is
377 377 successful; mount does not need to contact the server's rpcbind(1M)
378 378 and the mountd(1M) daemons to get the port number of the mount
379 379 server and the initial file handle of pathname, respectively. If
380 380 the NFS client and server are separated by a firewall that allows
381 381 all outbound connections through specific ports, such as NFS_PORT,
382 382 then this enables NFS operations through the firewall. The public
383 383 option and the NFS URL can be specified independently or together.
384 384 They interact as specified in the following matrix:
385 385
386 386 Resource Style
387 387
388 388 host:pathname NFS URL
389 389
390 390 public option Force public file Force public file
391 391 handle and fail handle and fail
392 392 mount if not supported. mount if not supported.
393 393
394 394 Use Native paths. Use Canonical paths.
395 395
396 396 default Use MOUNT protocol. Try public file handle
397 397 with Canonical paths.
398 398 Fall back to MOUNT
399 399 protocol if not
400 400 supported.
401 401
402 402 A Native path is a path name that is interpreted according to
403 403 conventions used on the native operating system of the NFS server.
404 404 A Canonical path is a path name that is interpreted according to
405 405 the URL rules. See Uniform Resource Locators (URL), RFC 1738. See
406 406 for uses of Native and Canonical paths.
407 407
408 408
409 409 Replicated file systems and failover
410 410 resource can list multiple readonly file systems to be used to
411 411 provide data. These file systems should contain equivalent
412 412 directory structures and identical files. It is also recommended
413 413 that they be created by a utility such as rdist(1). The file
414 414 systems can be specified either with a commaseparated list of
415 415 host:/pathname entries and/or NFS URL entries, or with a comma
416 416 separated list of hosts, if all file system names are the same. If
417 417 multiple file systems are named and the first server in the list is
418 418 down, failover uses the next alternate server to access files. If
419 419 the readonly option is not chosen, replication is disabled. File
420 420 access, for NFS Versions 2 and 3, is blocked on the original if NFS
421 421 locks are active for that file.
422 422
423 423
424 424 File Attributes
425 425 To improve NFS read performance, files and file attributes are cached.
426 426 File modification times get updated whenever a write occurs. However,
427 427 file access times can be temporarily out-of-date until the cache gets
428 428 refreshed.
429 429
430 430
431 431 The attribute cache retains file attributes on the client. Attributes
432 432 for a file are assigned a time to be flushed. If the file is modified
433 433 before the flush time, then the flush time is extended by the time
434 434 since the last modification (under the assumption that files that
435 435 changed recently are likely to change soon). There is a minimum and
436 436 maximum flush time extension for regular files and for directories.
437 437 Setting actimeo=n sets flush time to n seconds for both regular files
438 438 and directories.
439 439
440 440
441 441 Setting actimeo=0 disables attribute caching on the client. This means
442 442 that every reference to attributes is satisfied directly from the
443 443 server though file data is still cached. While this guarantees that the
444 444 client always has the latest file attributes from the server, it has an
445 445 adverse effect on performance through additional latency, network load,
446 446 and server load.
447 447
448 448
449 449 Setting the noac option also disables attribute caching, but has the
450 450 further effect of disabling client write caching. While this guarantees
451 451 that data written by an application is written directly to a server,
452 452 where it can be viewed immediately by other clients, it has a
453 453 significant adverse effect on client write performance. Data written
454 454 into memory-mapped file pages (mmap(2)) are not written directly to this
455 455 server.
456 456
457 457 Specifying Values for Attribute Cache Duration Options
458 458 The attribute cache duration options are acdirmax, acdirmin, acregmax,
459 459 acregmin, and actimeo, as described under OPTIONS. A value specified
460 460 for actimeo sets the values of all attribute cache duration options
461 461 except for any of these options specified following actimeo on a mount
462 462 command line. For example, consider the following command:
463 463
464 464 example# mount -o acdirmax=10,actimeo=1000 server:/path /localpath
465 465
466 466
467 467
468 468 Because actimeo is the last duration option in the command line, its
469 469 value (1000) becomes the setting for all of the duration options,
470 470 including acdirmax. Now consider:
471 471
472 472 example# mount -o actimeo=1000,acdirmax=10 server:/path /localpath
473 473
474 474
475 475
476 476 Because the acdirmax option follows actimeo on the command line, it is
477 477 assigned the value specified (10). The remaining duration options are
478 478 set to the value of actimeo (1000).
479 479
480 480 EXAMPLES
481 481 Example 1 Mounting an NFS File System
482 482
483 483
484 484 To mount an NFS file system:
485 485
486 486
487 487 example# mount serv:/usr/src /usr/src
488 488
489 489
490 490
491 491 Example 2 Mounting An NFS File System Read-Only With No suid Privileges
492 492
493 493
494 494 To mount an NFS file system read-only with no suid privileges:
495 495
496 496
497 497 example# mount -r -o nosuid serv:/usr/src /usr/src
498 498
499 499
500 500
501 501 Example 3 Mounting An NFS File System Over Version 2, with the UDP
502 502 Transport
503 503
504 504
505 505 To mount an NFS file system over Version 2, with the UDP transport:
506 506
507 507
508 508 example# mount -o vers=2,proto=udp serv:/usr/src /usr/src
509 509
510 510
511 511
512 512 Example 4 Mounting an NFS File System Using An NFS URL
513 513
514 514
515 515 To mount an NFS file system using an NFS URL (a canonical path):
516 516
517 517
518 518 example# mount nfs://serv/usr/man /usr/man
519 519
520 520
521 521
522 522 Example 5 Mounting An NFS File System Forcing Use Of The Public File
523 523 Handle
524 524
525 525
526 526 To mount an NFS file system and force the use of the public file handle
527 527 and an NFS URL (a canonical path) that has a non 7-bit ASCII escape
528 528 sequence:
529 529
530 530
531 531 example# mount -o public nfs://serv/usr/%A0abc /mnt/test
532 532
533 533
534 534
535 535 Example 6 Mounting an NFS File System Using a Native Path
536 536
537 537
538 538 To mount an NFS file system using a native path (where the server uses
539 539 colons (":") as the component separator) and the public file handle:
540 540
541 541
542 542 example# mount -o public serv:C:doc:new /usr/doc
543 543
544 544
545 545
546 546 Example 7 Mounting a Replicated Set of NFS File Systems with the Same
547 547 Pathnames
548 548
549 549
550 550 To mount a replicated set of NFS file systems with the same pathnames:
551 551
552 552
553 553 example# mount serva,servb,servc:/usr/man /usr/man
554 554
555 555
556 556
557 557 Example 8 Mounting a Replicated Set of NFS File Systems with Different
558 558 Pathnames
559 559
560 560
561 561 To mount a replicated set of NFS file systems with different pathnames:
562 562
563 563
564 564 example# mount servx:/usr/man,servy:/var/man,nfs://serv-z/man /usr/man
565 565
566 566
567 567
568 568 FILES
569 569 /etc/mnttab
570 570 table of mounted file systems
571 571
572 572
573 573 /etc/dfs/fstypes
574 574 default distributed file system type
575 575
576 576
577 577 /etc/vfstab
578 578 table of automatically mounted resources
579 579
580 580
581 581 SEE ALSO
582 582 rdist(1), lockd(1M), mountall(1M), mountd(1M), nfsd(1M), quota(1M),
583 583 statd(1M), mkdir(2), mmap(2), mount(2), open(2), umount(2), mnttab(4),
584 584 nfs(4), nfssec.conf(4), attributes(5), fsattr(5), nfssec(5),
585 585 standards(5), inet(7P), inet6(7P), lofs(7FS)
586 586
587 587
588 588 Callaghan, Brent, WebNFS Client Specification, RFC 2054, October 1996.
589 589
590 590
591 591 Callaghan, Brent, NFS URL Scheme, RFC 2224, October 1997.
592 592
593 593
594 594 Berners-Lee, Masinter & McCahill , Uniform Resource Locators (URL), RFC
595 595 1738, December 1994.
596 596
597 597 NOTES
598 598 An NFS server should not attempt to mount its own file systems. See
599 599 lofs(7FS).
600 600
601 601
602 602 If the directory on which a file system is to be mounted is a symbolic
603 603 link, the file system is mounted on the directory to which the symbolic
604 604 link refers, rather than being mounted on top of the symbolic link
605 605 itself.
606 606
607 607
608 608 SunOS 4.x used the biod maintenance procedure to perform parallel read-
609 609 ahead and write-behind on NFS clients. SunOS 5.x made biod obsolete with
↓ open down ↓ |
609 lines elided |
↑ open up ↑ |
610 610 multi-threaded processing, which transparently performs parallel read-
611 611 ahead and write-behind.
612 612
613 613
614 614 Since the root (/) file system is mounted read-only by the kernel during
615 615 the boot process, only the remount option (and options that can be used
616 616 in conjunction with remount) affect the root (/) entry in the
617 617 /etc/vfstab file.
618 618
619 619
620 - mount_cachefs cannot be used with replicated NFS mounts or any NFS
621 - Version 4 mount.
622 -
623 -
624 620 The NFS client service is managed by the service management facility,
625 621 smf(5), under the service identifier:
626 622
627 623 svc:/network/nfs/client:default
628 624
629 625
630 626
631 627
632 628 Administrative actions on this service, such as enabling, disabling, or
633 629 requesting restart, can be performed using svcadm(1M). The service's
634 630 status can be queried using the svcs(1) command.
635 631
636 632
637 633
638 - June 3, 2015 MOUNT_NFS(1M)
634 + September 8, 2015 MOUNT_NFS(1M)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX