summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/mount_nfs.1m
blob: badd63ca9a54370a54e33996d00f86a4cc5c4ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
'\" te
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 1989 AT&T
.\" 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.
.\" 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
.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MOUNT_NFS 1M "Jun 3, 2015"
.SH NAME
mount_nfs \- mount remote NFS resources
.SH SYNOPSIS
.LP
.nf
\fBmount\fR [\fB-F\fR nfs] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR] [\fB-O\fR] \fIresource\fR
.fi

.LP
.nf
\fBmount\fR [\fB-F\fR nfs] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR] [\fB-O\fR] \fImount_point\fR
.fi

.LP
.nf
\fBmount\fR [\fB-F\fR nfs] [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
     [\fB-O\fR] \fIresource\fR \fImount_point\fR
.fi

.SH DESCRIPTION
.LP
The \fBmount\fR utility attaches a named \fIresource\fR to the file system
hierarchy at the pathname location \fImount_point\fR, which must already exist.
If \fImount_point\fR has any contents prior to the \fBmount\fR operation, the
contents remain hidden until the \fIresource\fR is once again unmounted.
.sp
.LP
\fBmount_nfs\fR starts the \fBlockd\fR(1M) and \fBstatd\fR(1M) daemons if they
are not already running.
.sp
.LP
If the resource is listed in the \fB/etc/vfstab\fR file, the command line can
specify either \fIresource\fR or \fImount_point\fR, and \fBmount\fR consults
\fB/etc/vfstab\fR for more information. If the \fB-F\fR option is omitted,
\fBmount\fR takes the file system type from \fB/etc/vfstab\fR.
.sp
.LP
If the resource is not listed in the \fB/etc/vfstab\fR file, then the command
line must specify both the \fIresource\fR and the \fImount_point\fR.
.sp
.LP
\fIhost\fR can be an IPv4 or IPv6 address string. As IPv6 addresses already
contain colons, enclose \fIhost\fR in a pair of square brackets when specifying
an IPv6 address string. Otherwise the first occurrence of a colon can be
interpreted as the separator between the host name and path, for example,
\fB[1080::8:800:200C:417A]:tmp/file\fR. See \fBinet\fR(7P) and \fBinet6\fR(7P).
.sp
.ne 2
.na
\fB\fIhost\fR:\fIpathname\fR\fR
.ad
.sp .6
.RS 4n
Where \fIhost\fR is the name of the \fBNFS\fR server host, and \fIpathname\fR
is the path name of the directory on the server being mounted. The path name is
interpreted according to the server's path name parsing rules and is not
necessarily slash-separated, though on most servers, this is the case.
.RE

.sp
.ne 2
.na
\fB\fInfs\fR://\fIhost\fR[:\fIport\fR]/\fIpathname\fR\fR
.ad
.sp .6
.RS 4n
This is an \fBNFS\fR \fBURL\fR and follows the standard convention for
\fBNFS\fR \fBURL\fRs as described in \fINFS URL Scheme\fR, RFC 2224. See the
discussion of \fBURL\fR's and the public option under \fBNFS FILE SYSTEMS\fR
for a more detailed discussion.
.RE

.sp
.ne 2
.na
\fB\fIhost\fR:\fIpathname\fR
\fInfs\fR://\fIhost\fR[:\fIport\fR]/\fIpathname\fR\fR
.ad
.br
.na
\fB\fR
.ad
.sp .6
.RS 4n
\fIhost\fR:\fIpathname\fR is a comma-separated list of
\fIhost\fR:\fIpathname\fR.
.sp
See the discussion of replicated file systems and failover under \fBNFS FILE
SYSTEMS\fR for a more detailed discussion.
.RE

.sp
.ne 2
.na
\fB\fIhostlist\fR \fIpathname\fR\fR
.ad
.sp .6
.RS 4n
\fIhostlist\fR is a comma-separated list of hosts.
.sp
See the discussion of replicated file systems and failover under \fBNFS FILE
SYSTEMS\fR for a more detailed discussion.
.RE

.sp
.LP
The \fBmount\fR command maintains a table of mounted file systems in
\fB/etc/mnttab\fR, described in \fBmnttab\fR(4).
.sp
.LP
\fBmount_nfs\fR supports both NFSv3 and NFSv4 mounts. The default NFS version
is NFSv4.
.SH OPTIONS
.LP
See \fBmount\fR(1M) for the list of supported \fIgeneric_options\fR. See
\fBshare_nfs\fR(1M) for a description of server options.
.sp
.ne 2
.na
\fB\fB-o\fR \fIspecific_options\fR\fR
.ad
.sp .6
.RS 4n
Set file system specific options according to a comma-separated list with no
intervening spaces.
.sp
.ne 2
.na
\fB\fBacdirmax=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Hold cached attributes for no more than \fIn\fR seconds after directory update.
The default value is \fB60\fR.
.RE

.sp
.ne 2
.na
\fB\fBacdirmin=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Hold cached attributes for at least \fIn\fR seconds after directory update. The
default value is \fB30\fR.
.RE

.sp
.ne 2
.na
\fB\fBacregmax=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Hold cached attributes for no more than \fIn\fR seconds after file
modification. The default value is \fB60\fR.
.RE

.sp
.ne 2
.na
\fB\fBacregmin=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Hold cached attributes for at least \fIn\fR seconds after file modification.
The default value is \fB3\fR.
.RE

.sp
.ne 2
.na
\fB\fBactimeo=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Set \fImin\fR and \fImax\fR times for regular files and directories to \fIn\fR
seconds. See "File Attributes," below, for a description of the effect of
setting this option to \fB0\fR.
.sp
See "Specifying Values for Attribute Cache Duration Options," below, for a
description of how \fBacdirmax\fR, \fBacdirmin\fR, \fBacregmax\fR,
\fBacregmin\fR, and \fBactimeo\fR are parsed on a \fBmount\fR command line.
.RE

.sp
.ne 2
.na
\fB\fBbg\fR | \fBfg\fR\fR
.ad
.sp .6
.RS 4n
If the first attempt fails, retry in the background, or, in the foreground. The
default is \fBfg\fR.
.RE

.sp
.ne 2
.na
\fB\fBforcedirectio\fR | \fBnoforcedirectio\fR\fR
.ad
.sp .6
.RS 4n
If \fBforcedirectio\fR is specified, then for the duration of the mount, forced
direct \fBI/O\fR is used. If the filesystem is mounted using
\fBforcedirectio\fR, data is transferred directly between client and server,
with no buffering on the client. If the filesystem is mounted using
\fBnoforcedirectio\fR, data is buffered on the client. \fBforcedirectio\fR is a
performance option that is of benefit only in large sequential data transfers.
The default behavior is \fBnoforcedirectio\fR.
.RE

.sp
.ne 2
.na
\fB\fBgrpid\fR\fR
.ad
.sp .6
.RS 4n
By default, the \fBGID\fR associated with a newly created file obeys the System
V semantics; that is, the \fBGID\fR is set to the effective \fBGID\fR of the
calling process. This behavior can be overridden on a per-directory basis by
setting the set-GID bit of the parent directory; in this case, the \fBGID\fR of
a newly created file is set to the \fBGID\fR of the parent directory (see
\fBopen\fR(2) and \fBmkdir\fR(2)). Files created on file systems that are
mounted with the \fBgrpid\fR option obeys \fBBSD\fR semantics independent of
whether the set-GID bit of the parent directory is set; that is, the \fBGID\fR
is unconditionally inherited from that of the parent directory.
.RE

.sp
.ne 2
.na
\fB\fBhard\fR | \fBsoft\fR\fR
.ad
.sp .6
.RS 4n
Continue to retry requests until the server responds (\fBhard\fR) or give up
and return an error (\fBsoft\fR). The default value is \fBhard\fR. Note that
NFSv4 clients do not support soft mounts.
.RE

.sp
.ne 2
.na
\fB\fBintr\fR | \fBnointr\fR\fR
.ad
.sp .6
.RS 4n
Allow (do not allow) keyboard interrupts to kill a process that is hung while
waiting for a response on a hard-mounted file system. The default is
\fBintr\fR, which makes it possible for clients to interrupt applications that
can be waiting for a remote mount.
.RE

.sp
.ne 2
.na
\fB\fBnoac\fR\fR
.ad
.sp .6
.RS 4n
Suppress data and attribute caching. The data caching that is suppressed is the
write-behind. The local page cache is still maintained, but data copied into it
is immediately written to the server.
.RE

.sp
.ne 2
.na
\fB\fBnocto\fR\fR
.ad
.sp .6
.RS 4n
Do not perform the normal close-to-open consistency. When a file is closed, all
modified data associated with the file is flushed to the server and not held on
the client. When a file is opened the client sends a request to the server to
validate the client's local caches. This behavior ensures a file's consistency
across multiple NFS clients. When \fB-nocto\fR is in effect, the client does
not perform the flush on close and the request for validation, allowing the
possiblity of differences among copies of the same file as stored on multiple
clients.
.sp
This option can be used where it can be guaranteed that accesses to a specified
file system are made from only one client and only that client. Under such a
condition, the effect of \fB-nocto\fR can be a slight performance gain.
.RE

.sp
.ne 2
.na
\fB\fBport=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
The server \fBIP\fR port number. The default is \fBNFS_PORT\fR. If the
\fBport\fR option is specified, and if the resource includes one or more
\fBNFS\fR \fBURL\fRs, and if any of the \fBURL\fRs include a \fBport\fR number,
then the \fBport\fR number in the option and in the \fBURL\fR must be the same.
.RE

.sp
.ne 2
.na
\fB\fBposix\fR\fR
.ad
.sp .6
.RS 4n
Request \fBPOSIX.1\fR semantics for the file system. Requires a mount Version 2
\fBmountd\fR(1M) on the server. See \fBstandards\fR(5) for information
regarding POSIX.
.RE

.sp
.ne 2
.na
\fB\fBproto=\fR\fInetid\fR | \fBrdma\fR\fR
.ad
.sp .6
.RS 4n
By default, the transport protocol that the NFS mount uses is the first
available RDMA transport supported both by the client and the server. If no
RDMA transport is found, then it attempts to use a TCP transport or, failing
that, a UDP transport, as ordered in the \fB/etc/netconfig\fR file. If it does
not find a connection oriented transport, it uses the first available
connectionless transport.
.sp
Use this option to override the default behavior.
.sp
\fBproto\fR is set to the value of \fInetid\fR or \fBrdma\fR. \fInetid\fR is
the value of the \fBnetwork_id\fR field entry in the \fB/etc/netconfig\fR file.
.sp
The UDP protocol is not supported for NFS Version 4. If you specify a UDP
protocol with the \fBproto\fR option, NFS version 4 is not used.
.RE

.sp
.ne 2
.na
\fB\fBpublic\fR\fR
.ad
.sp .6
.RS 4n
The \fBpublic\fR option forces the use of the public file handle when
connecting to the \fBNFS\fR server. The resource specified might not have an
\fBNFS\fR \fBURL\fR. See the discussion of \fBURL\fRs and the public option
under \fBNFS FILE SYSTEMS\fR for a more detailed discussion.
.RE

.sp
.ne 2
.na
\fB\fBquota\fR | \fBnoquota\fR\fR
.ad
.sp .6
.RS 4n
Enable or prevent \fBquota\fR(1M) to check whether the user is over quota on
this file system; if the file system has quotas enabled on the server, quotas
are still checked for operations on this file system.
.RE

.sp
.ne 2
.na
\fB\fBremount\fR\fR
.ad
.sp .6
.RS 4n
Remounts a read-only file system as read-write (using the \fBrw\fR option).
This option cannot be used with other \fB-o\fR options, and this option works
only on currently mounted read-only file systems.
.RE

.sp
.ne 2
.na
\fB\fBretrans=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Set the number of \fBNFS\fR retransmissions to \fIn\fR. The default value is
\fB5\fR. For connection-oriented transports, this option has no effect because
it is assumed that the transport performs retransmissions on behalf of NFS.
.RE

.sp
.ne 2
.na
\fB\fBretry=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
The number of times to retry the \fBmount\fR operation. The default for the
\fBmount\fR command is \fB10000\fR.
.sp
The default for the automounter is \fB0\fR, in other words, do not retry. You
might find it useful to increase this value on heavily loaded servers, where
automounter traffic is dropped, causing unnecessary server not responding
errors.
.RE

.sp
.ne 2
.na
\fB\fBrsize=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Set the read buffer size to a maximum of \fIn\fR bytes. The default value is
\fB1048576\fR when using connection-oriented transports with Version 3 or
Version 4 of the \fBNFS\fR protocol, and \fB32768\fR when using connection-less
transports. The default can be negotiated down if the server prefers a smaller
transfer size. "\fBRead\fR" operations may not necessarily use the maximum
buffer size. When using Version 2, the default value is \fB32768\fR for all
transports.
.RE

.sp
.ne 2
.na
\fB\fBsec=\fR\fImode\fR\fR
.ad
.sp .6
.RS 4n
Set the security \fImode\fR for \fBNFS\fR transactions. If \fBsec=\fR is not
specified, then the default action is to use \fBAUTH_SYS\fR over \fBNFS\fR
Version 2 mounts, use a user-configured default \fBauth\fR over NFS version 3
mounts, or to  negotiate a mode over Version 4 mounts.
.sp
The preferred mode for NFS Version 3 mounts is the default mode specified in
\fB/etc/nfssec.conf\fR (see \fBnfssec.conf\fR(4)) on the client. If there is no
default configured in this file or if the server does not export using the
client's default mode, then the client picks the first mode that it supports in
the array of modes returned by the server. These alternatives are limited to
the security flavors listed in \fB/etc/nfssec.conf\fR.
.sp
NFS Version 4 mounts negotiate a security mode when the server returns an array
of security modes. The client attempts the mount with each security mode, in
order, until one is successful.
.sp
Only one mode can be specified with the \fBsec=\fR option. See \fBnfssec\fR(5)
for the available \fImode\fR options.
.RE

.sp
.ne 2
.na
\fB\fBsecure\fR\fR
.ad
.sp .6
.RS 4n
This option has been deprecated in favor of the \fBsec=\fR\fIdh\fR option.
.RE

.sp
.ne 2
.na
\fB\fBtimeo=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Set the \fBNFS\fR timeout to \fIn\fR tenths of a second. The default value is
\fB11\fR tenths of a second for connectionless transports, and \fB600\fR tenths
of a second for connection-oriented transports. This value is ignored for
connectionless transports. Such transports might implement their own timeouts,
which are outside the control of NFS.
.RE

.sp
.ne 2
.na
\fB\fBvers=\fR\fINFS version number\fR\fR
.ad
.sp .6
.RS 4n
By default, the version of \fBNFS\fR protocol used between the client and the
server is the highest one available on both systems. The default maximum for
the client is Version 4. This can be changed by setting the
\fBNFS_CLIENT_VERSMAX\fR parameter in \fB/etc/default/nfs\fR to a valid version
(2, 3, or 4). If the \fBNFS\fR server does not support the client's default
maximum, the next lowest version attempted until a matching version is found.
.RE

.sp
.ne 2
.na
\fB\fBwsize=\fR\fIn\fR\fR
.ad
.sp .6
.RS 4n
Set the write buffer size to a maximum of \fIn\fR bytes. The default value is
\fB1048576\fR when using connection-oriented transports with Version 3 or
Version 4 of the \fBNFS\fR protocol, and \fB32768\fR when using connection-less
transports. The default can be negotiated down if the server prefers a smaller
transfer size. "\fBWrite\fR" operations may not necessarily use the maximum
buffer size. When using Version 2, the default value is \fB32768\fR for all
transports.
.RE

.sp
.ne 2
.na
\fB\fBxattr\fR | \fBnoxattr\fR\fR
.ad
.sp .6
.RS 4n
Allow or disallow the creation and manipulation of extended attributes. The
default is \fBxattr\fR. See \fBfsattr\fR(5) for a description of extended
attributes.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-O\fR\fR
.ad
.sp .6
.RS 4n
Overlay mount. Allow the file system to be mounted over an existing mount
point, making the underlying file system inaccessible. If a mount is attempted
on a pre-existing mount point without setting this flag, the mount fails,
producing the error "device busy."
.RE

.SH NFS FILE SYSTEMS
.ne 2
.na
\fBBackground versus Foreground\fR
.ad
.sp .6
.RS 4n
File systems mounted with the \fBbg\fR option indicate that \fBmount\fR is to
retry in the background if the server's mount daemon (\fBmountd\fR(1M)) does
not respond. \fBmount\fR retries the request up to the count specified in the
\fBretry=\fR\fIn\fR option. (Note that the default value for \fBretry\fR
differs between \fBmount\fR and \fBautomount\fR. See the description of
\fBretry\fR, above.) Once the file system is mounted, each \fBNFS\fR request
made in the kernel waits \fBtimeo=\fR\fIn\fR tenths of a second for a response.
If no response arrives, the time-out is multiplied by \fB2\fR and the request
is retransmitted. When the number of retransmissions has reached the number
specified in the \fBretrans=\fR\fIn\fR option, a file system mounted with the
\fBsoft\fR option returns an error on the request; one mounted with the
\fBhard\fR option prints a warning message and continues to retry the request.
.RE

.sp
.ne 2
.na
\fBHard versus Soft\fR
.ad
.sp .6
.RS 4n
File systems that are mounted read-write or that contain executable files
should always be mounted with the \fBhard\fR option. Applications using
\fBsoft\fR mounted file systems can incur unexpected \fBI/O\fR errors, file
corruption, and unexpected program core dumps. The soft option is not
recommended.
.RE

.sp
.ne 2
.na
\fBAuthenticated requests\fR
.ad
.sp .6
.RS 4n
The server can require authenticated \fBNFS\fR requests from the client.
\fBsec=\fR\fIdh\fR authentication might be required. See \fBnfssec\fR(5).
.RE

.sp
.ne 2
.na
\fBURLs and the public option\fR
.ad
.sp .6
.RS 4n
If the \fBpublic\fR option is specified, or if the \fIresource\fR includes and
\fBNFS\fR \fBURL\fR, \fBmount\fR attempts to connect to the server using the
public file handle lookup protocol. See \fIWebNFS Client Specification\fR, RFC
2054. If the server supports the public file handle, the attempt is successful;
\fBmount\fR does not need to contact the server's \fBrpcbind\fR(1M) and the
\fBmountd\fR(1M) daemons to get the port number of the \fBmount\fR server and
the initial file handle of \fIpathname\fR, respectively. If the \fBNFS\fR
client and server are separated by a firewall that allows all outbound
connections through specific ports, such as \fBNFS_PORT\fR, then this enables
\fBNFS\fR operations through the firewall. The public option and the \fBNFS\fR
\fBURL\fR can be specified independently or together. They interact as
specified in the following matrix:
.sp
.in +2
.nf
                   Resource Style

                    \fIhost\fR:\fIpathname\fR              NFS URL

public option      Force public file          Force public file
                    handle and fail            handle and fail
                    mount if not supported.    mount if not supported.

                    Use Native paths.          Use Canonical paths.

default            Use MOUNT protocol.        Try public file handle
                                               with Canonical paths.
                                               Fall back to MOUNT
                                               protocol if not
                                               supported.
.fi
.in -2

A Native path is a path name that is interpreted according to conventions used
on the native operating system of the \fBNFS\fR server. A Canonical path is a
path name that is interpreted according to the \fBURL\fR rules. See \fIUniform
Resource Locators (URL)\fR, RFC 1738. See  for uses of Native and Canonical
paths.
.RE

.sp
.ne 2
.na
\fBReplicated file systems and failover\fR
.ad
.sp .6
.RS 4n
\fIresource\fR can list multiple read\(mionly file systems to be used to
provide data. These file systems should contain equivalent directory structures
and identical files. It is also recommended that they be created by a utility
such as \fBrdist\fR(1). The file systems can be specified either with a
comma\(miseparated list of \fIhost:/pathname\fR entries and/or \fBNFS\fR
\fBURL\fR entries, or with a comma \(miseparated list of hosts, if all file
system names are the same. If multiple file systems are named and the first
server in the list is down, failover uses the next alternate server to access
files. If the read\(mionly option is not chosen, replication is disabled. File
access, for NFS Versions 2 and 3, is blocked on the original if NFS locks are
active for that file.
.RE

.SS "File Attributes"
.LP
To improve \fBNFS\fR read performance, files and file attributes are cached.
File modification times get updated whenever a write occurs. However, file
access times can be temporarily out-of-date until the cache gets refreshed.
.sp
.LP
The attribute cache retains file attributes on the client. Attributes for a
file are assigned a time to be flushed. If the file is modified before the
flush time, then the flush time is extended by the time since the last
modification (under the assumption that files that changed recently are likely
to change soon). There is a minimum and maximum flush time extension for
regular files and for directories. Setting \fBactimeo=\fR\fIn\fR sets flush
time to \fIn\fR seconds for both regular files and directories.
.sp
.LP
Setting \fBactimeo=0\fR disables attribute caching on the client. This means
that every reference to attributes is satisfied directly from the server though
file data is still cached. While this guarantees that the client always has the
latest file attributes from the server, it has an adverse effect on performance
through additional latency, network load, and server load.
.sp
.LP
Setting the \fBnoac\fR option also disables attribute caching, but has the
further effect of disabling client write caching. While this guarantees that
data written by an application is written directly to a server, where it can be
viewed immediately by other clients, it has a significant adverse effect on
client write performance. Data written into memory-mapped file pages
(\fBmmap\fR(2)) are not written directly to this server.
.SS "Specifying Values for Attribute Cache Duration Options"
.LP
The attribute cache duration options are \fBacdirmax\fR, \fBacdirmin\fR,
\fBacregmax\fR, \fBacregmin\fR, and \fBactimeo\fR, as described under OPTIONS.
A value specified for \fBactimeo\fR sets the values of all attribute cache
duration options except for any of these options specified following
\fBactimeo\fR on a \fBmount\fR command line. For example, consider the
following command:
.sp
.in +2
.nf
example# mount -o acdirmax=10,actimeo=1000 server:/path /localpath
.fi
.in -2

.sp
.LP
Because \fBactimeo\fR is the last duration option in the command line, its
value (\fB1000\fR) becomes the setting for all of the duration options,
including \fBacdirmax\fR. Now consider:
.sp
.in +2
.nf
example# mount -o actimeo=1000,acdirmax=10 server:/path /localpath
.fi
.in -2

.sp
.LP
Because the \fBacdirmax\fR option follows \fBactimeo\fR on the command line, it
is assigned the value specified (\fB10\fR). The remaining duration options are
set to the value of \fBactimeo\fR (\fB1000\fR).
.SH EXAMPLES
.LP
\fBExample 1 \fRMounting an \fBNFS\fR File System
.sp
.LP
To mount an \fBNFS\fR file system:

.sp
.in +2
.nf
example# mount serv:/usr/src /usr/src
.fi
.in -2
.sp

.LP
\fBExample 2 \fRMounting An \fBNFS\fR File System Read-Only With No suid
Privileges
.sp
.LP
To mount an \fBNFS\fR file system read-only with no suid privileges:

.sp
.in +2
.nf
example# mount -r -o nosuid serv:/usr/src /usr/src
.fi
.in -2
.sp

.LP
\fBExample 3 \fRMounting An \fBNFS\fR File System Over Version 2, with the UDP
Transport
.sp
.LP
To mount an \fBNFS\fR file system over Version 2, with the UDP transport:

.sp
.in +2
.nf
example# mount -o vers=2,proto=udp serv:/usr/src /usr/src
.fi
.in -2
.sp

.LP
\fBExample 4 \fRMounting an \fBNFS\fR File System Using An \fBNFS\fR \fBURL\fR
.sp
.LP
To mount an \fBNFS\fR file system using an \fBNFS\fR \fBURL\fR (a canonical
path):

.sp
.in +2
.nf
example# mount nfs://serv/usr/man /usr/man
.fi
.in -2
.sp

.LP
\fBExample 5 \fRMounting An \fBNFS\fR File System Forcing Use Of The Public
File Handle
.sp
.LP
To mount an \fBNFS\fR file system and force the use of the public file handle
and an \fBNFS\fR \fBURL\fR (a canonical path) that has a non 7-bit ASCII escape
sequence:

.sp
.in +2
.nf
example# mount -o public nfs://serv/usr/%A0abc /mnt/test
.fi
.in -2
.sp

.LP
\fBExample 6 \fRMounting an \fBNFS\fR File System Using a Native Path
.sp
.LP
To mount an \fBNFS\fR file system using a native path (where the server uses
colons (":") as the component separator) and the public file handle:

.sp
.in +2
.nf
example# mount -o public serv:C:doc:new /usr/doc
.fi
.in -2
.sp

.LP
\fBExample 7 \fRMounting a Replicated Set of \fBNFS\fR File Systems with the
Same Pathnames
.sp
.LP
To mount a replicated set of \fBNFS\fR file systems with the same pathnames:

.sp
.in +2
.nf
example# mount serv\(mia,serv\(mib,serv\(mic:/usr/man /usr/man
.fi
.in -2
.sp

.LP
\fBExample 8 \fRMounting a Replicated Set of \fBNFS\fR File Systems with
Different Pathnames
.sp
.LP
To mount a replicated set of \fBNFS\fR file systems with different pathnames:

.sp
.in +2
.nf
example# mount serv\(mix:/usr/man,serv\(miy:/var/man,nfs://serv-z/man /usr/man
.fi
.in -2
.sp

.SH FILES
.ne 2
.na
\fB\fB/etc/mnttab\fR\fR
.ad
.sp .6
.RS 4n
table of mounted file systems
.RE

.sp
.ne 2
.na
\fB\fB/etc/dfs/fstypes\fR\fR
.ad
.sp .6
.RS 4n
default distributed file system type
.RE

.sp
.ne 2
.na
\fB\fB/etc/vfstab\fR\fR
.ad
.sp .6
.RS 4n
table of automatically mounted resources
.RE

.SH SEE ALSO
.LP
\fBrdist\fR(1), \fBlockd\fR(1M), \fBmountall\fR(1M), \fBmountd\fR(1M),
\fBnfsd\fR(1M), \fBquota\fR(1M), \fBstatd\fR(1M), \fBmkdir\fR(2),
\fBmmap\fR(2), \fBmount\fR(2), \fBopen\fR(2), \fBumount\fR(2), \fBmnttab\fR(4),
\fBnfs\fR(4), \fBnfssec.conf\fR(4), \fBattributes\fR(5), \fBfsattr\fR(5),
\fBnfssec\fR(5), \fBstandards\fR(5), \fBinet\fR(7P), \fBinet6\fR(7P),
\fBlofs\fR(7FS)
.sp
.LP
Callaghan, Brent, \fIWebNFS Client Specification\fR, RFC 2054, October 1996.
.sp
.LP
Callaghan, Brent, \fINFS URL Scheme\fR, RFC 2224, October 1997.
.sp
.LP
Berners-Lee, Masinter & McCahill , \fIUniform Resource Locators (URL)\fR, RFC
1738, December 1994.
.SH NOTES
.LP
An \fBNFS\fR server should not attempt to mount its own file systems. See
\fBlofs\fR(7FS).
.sp
.LP
If the directory on which a file system is to be mounted is a symbolic link,
the file system is mounted on \fBthe directory to which the symbolic link
refers,\fR rather than being mounted on top of the symbolic link itself.
.sp
.LP
SunOS 4.x used the \fBbiod\fR maintenance procedure to perform parallel
read-ahead and write-behind on \fBNFS\fR clients. SunOS 5.x made \fBbiod\fR
obsolete with multi-threaded processing, which transparently performs parallel
read-ahead and write-behind.
.sp
.LP
Since the root \fB(\fR/\fB)\fR file system is mounted read-only by the kernel
during the boot process, only the \fBremount\fR option (and options that can be
used in conjunction with \fBremount\fR) affect the root (\fB/\fR) entry in the
\fB/etc/vfstab\fR file.
.sp
.LP
\fBmount_cachefs\fR cannot be used with replicated NFS mounts or any NFS
Version 4 mount.
.sp
.LP
The NFS client service is managed by the service management facility,
\fBsmf\fR(5), under the service identifier:
.sp
.in +2
.nf
svc:/network/nfs/client:default
.fi
.in -2
.sp

.sp
.LP
Administrative actions on this service, such as enabling, disabling, or
requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
status can be queried using the \fBsvcs\fR(1) command.