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