xref: /illumos-gate/usr/src/man/man5/nfs.5 (revision ceaafe383f5fd593cad28cce64def973b6e60f53)
1bbf21555SRichard Lowe.\"
2bbf21555SRichard Lowe.\" The contents of this file are subject to the terms of the
3bbf21555SRichard Lowe.\" Common Development and Distribution License (the "License").
4bbf21555SRichard Lowe.\" You may not use this file except in compliance with the License.
5bbf21555SRichard Lowe.\"
6bbf21555SRichard Lowe.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7bbf21555SRichard Lowe.\" or http://www.opensolaris.org/os/licensing.
8bbf21555SRichard Lowe.\" See the License for the specific language governing permissions
9bbf21555SRichard Lowe.\" and limitations under the License.
10bbf21555SRichard Lowe.\"
11bbf21555SRichard Lowe.\" When distributing Covered Code, include this CDDL HEADER in each
12bbf21555SRichard Lowe.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13bbf21555SRichard Lowe.\" If applicable, add the following below this CDDL HEADER, with the
14bbf21555SRichard Lowe.\" fields enclosed by brackets "[]" replaced with your own identifying
15bbf21555SRichard Lowe.\" information: Portions Copyright [yyyy] [name of copyright owner]
16bbf21555SRichard Lowe.\"
17bbf21555SRichard Lowe.\"
18bbf21555SRichard Lowe.\" Copyright 1989 AT&T
19bbf21555SRichard Lowe.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
20bbf21555SRichard Lowe.\" Copyright 2016 Nexenta Systems, Inc.
21bbf21555SRichard Lowe.\" Copyright 2020 Joyent, Inc.
22*ceaafe38SToomas Soome.\" Copyright 2022-2024 RackTop Systems.
23bbf21555SRichard Lowe.\"
24*ceaafe38SToomas Soome.Dd March 23, 2024
25bbf21555SRichard Lowe.Dt NFS 5
26bbf21555SRichard Lowe.Os
27bbf21555SRichard Lowe.Sh NAME
28bbf21555SRichard Lowe.Nm nfs
29bbf21555SRichard Lowe.Nd NFS configuration properties
30bbf21555SRichard Lowe.Sh DESCRIPTION
31bbf21555SRichard LoweThe behavior of the
32bbf21555SRichard Lowe.Xr nfsd 8 ,
33bbf21555SRichard Lowe.Xr nfsmapid 8 ,
34bbf21555SRichard Lowe.Xr lockd 8 ,
35bbf21555SRichard Loweand
36bbf21555SRichard Lowe.Xr mountd 8
37bbf21555SRichard Lowedaemons and
38bbf21555SRichard Lowe.Xr mount_nfs 8
39bbf21555SRichard Lowecommand is controlled by property values that are stored in the Service
40bbf21555SRichard LoweManagement Facility, smf(7).
41bbf21555SRichard LoweThe
42bbf21555SRichard Lowe.Xr sharectl 8
43bbf21555SRichard Lowecommand should be used to query or change values for these properties.
44bbf21555SRichard Lowe.Pp
45bbf21555SRichard LoweChanges made to
46bbf21555SRichard Lowe.Nm
47bbf21555SRichard Loweproperty values on the
48bbf21555SRichard Lowe.Nm nfsd ,
49bbf21555SRichard Lowe.Nm lockd ,
50bbf21555SRichard Lowe.Nm mountd ,
51bbf21555SRichard Loweor
52bbf21555SRichard Lowe.Nm mount_nfs
53bbf21555SRichard Lowecommand line override the values set using
54bbf21555SRichard Lowe.Xr sharectl 8 .
55bbf21555SRichard Lowe.Pp
56bbf21555SRichard LoweThe following list describes the properties:
57bbf21555SRichard Lowe.Bl -tag -width Ds
58bbf21555SRichard Lowe.It Xo
59bbf21555SRichard Lowe.Sy client_versmin Ns = Ns Ar num
60bbf21555SRichard Lowe.br
61bbf21555SRichard Lowe.Sy client_versmax Ns = Ns Ar num
62bbf21555SRichard Lowe.Xc
63bbf21555SRichard LoweThe NFS client only uses NFS versions in the range specified by these
64bbf21555SRichard Loweproperties.
65bbf21555SRichard LoweValid values of versions are: 2, 3, and 4.
66bbf21555SRichard LoweDefault minimum version is
67bbf21555SRichard Lowe.Li 2 ,
68bbf21555SRichard Lowewhile default maximum is
69bbf21555SRichard Lowe.Li 4 .
70bbf21555SRichard Lowe.Pp
71bbf21555SRichard LoweYou can override this range on a per-mount basis by using the
72bbf21555SRichard Lowe.Fl o Sy vers Ns =
73bbf21555SRichard Loweoption to
74bbf21555SRichard Lowe.Xr mount_nfs 8 .
75bbf21555SRichard Lowe.It Xo
76bbf21555SRichard Lowe.Sy server_versmin Ns = Ns Ar num
77bbf21555SRichard Lowe.br
78bbf21555SRichard Lowe.Sy server_versmax Ns = Ns Ar num
79bbf21555SRichard Lowe.Xc
80bbf21555SRichard LoweThe NFS server only uses NFS versions in the range specified by these
81bbf21555SRichard Loweproperties.
82*ceaafe38SToomas SoomeValid values of versions are: 2, 3, 4, 4.0, 4.1 and 4.2.
83*ceaafe38SToomas SoomeVersion 4 is an alias for 4.0.
84bbf21555SRichard LoweDefault minimum version is
85bbf21555SRichard Lowe.Li 2 ,
86bbf21555SRichard Lowewhile the default maximum version is
87bbf21555SRichard Lowe.Li 4 .
88bbf21555SRichard Lowe.It Sy server_delegation Ns = Ns Sy on Ns | Ns Sy off
89bbf21555SRichard LoweBy default the NFS server provides delegations to clients.
90bbf21555SRichard LoweThe user can turn off delegations for all exported filesystems by setting this
91bbf21555SRichard Lowevariable to
92bbf21555SRichard Lowe.Li off .
93bbf21555SRichard LoweThis variable only applies to NFS Version 4.
94bbf21555SRichard Lowe.It Sy nfsmapid_domain Ns = Ns Op Ar string
95bbf21555SRichard LoweBy default, the
96bbf21555SRichard Lowe.Nm nfsmapid
97bbf21555SRichard Loweuses the DNS domain of the system.
98bbf21555SRichard LoweThis setting overrides the default.
99bbf21555SRichard LoweThis domain is used for identifying user and group attribute strings in the NFS
100bbf21555SRichard LoweVersion 4 protocol.
101bbf21555SRichard LoweClients and servers must match with this domain for operation to proceed
102bbf21555SRichard Lowenormally.
103bbf21555SRichard LoweThis variable only applies to NFS Version 4.
104bbf21555SRichard LoweSee
105bbf21555SRichard Lowe.Sx Setting nfsmapid_domain
106bbf21555SRichard Lowebelow for further details.
107bbf21555SRichard Lowe.It Sy max_connections Ns = Ns Ar num
108bbf21555SRichard LoweSets the maximum number of concurrent, connection-oriented connections.
109bbf21555SRichard LoweThe default is
110bbf21555SRichard Lowe.Li -1
111bbf21555SRichard Lowe.Pq unlimited .
112bbf21555SRichard LoweEquivalent to the
113bbf21555SRichard Lowe.Fl c
114bbf21555SRichard Loweoption in
115bbf21555SRichard Lowe.Nm nfsd .
116bbf21555SRichard Lowe.It Sy listen_backlog Ns = Ns Ar num
117bbf21555SRichard LoweSet connection queue length for the NFS over a connection-oriented transport.
118bbf21555SRichard LoweThe default value is
119bbf21555SRichard Lowe.Li 32 ,
120bbf21555SRichard Lowemeaning 32 entries in the queue.
121bbf21555SRichard LoweEquivalent to the
122bbf21555SRichard Lowe.Fl l
123bbf21555SRichard Loweoption in
124bbf21555SRichard Lowe.Nm nfsd .
125bbf21555SRichard Lowe.It Sy protocol Ns = Ns Op Sy all Ns | Ns Ar protocol
126bbf21555SRichard LoweStart
127bbf21555SRichard Lowe.Nm nfsd
128bbf21555SRichard Loweover the specified protocol only.
129bbf21555SRichard LoweEquivalent to the
130bbf21555SRichard Lowe.Fl p
131bbf21555SRichard Loweoption in
132bbf21555SRichard Lowe.Nm nfsd .
133bbf21555SRichard Lowe.Sy all
134bbf21555SRichard Loweis equivalent to
135bbf21555SRichard Lowe.Fl a
136bbf21555SRichard Loweon the
137bbf21555SRichard Lowe.Nm nfsd
138bbf21555SRichard Lowecommand line.
139bbf21555SRichard LoweMutually exclusive of
140bbf21555SRichard Lowe.Sy device .
141bbf21555SRichard LoweFor the UDP protocol, only version 2 and version 3 service is established.
142bbf21555SRichard LoweNFS Version 4 is not supported for the UDP protocol.
143bbf21555SRichard Lowe.It Sy device Ns = Ns Op Ar devname
144bbf21555SRichard LoweStart NFS daemon for the transport specified by the given device only.
145bbf21555SRichard LoweEquivalent to the
146bbf21555SRichard Lowe.Fl t
147bbf21555SRichard Loweoption in
148bbf21555SRichard Lowe.Nm nfsd .
149bbf21555SRichard LoweMutually exclusive of
150bbf21555SRichard Lowe.Sy protocol .
151bbf21555SRichard Lowe.It Sy servers Ns = Ns Ar num
152bbf21555SRichard LoweMaximum number of concurrent NFS requests.
153bbf21555SRichard LoweEquivalent to last numeric argument on the
154bbf21555SRichard Lowe.Nm nfsd
155bbf21555SRichard Lowecommand line.
156bbf21555SRichard LoweThe default is
157bbf21555SRichard Lowe.Li 1024 .
158bbf21555SRichard Lowe.It Sy lockd_listen_backlog Ns = Ns Ar num
159bbf21555SRichard LoweSet connection queue length for
160bbf21555SRichard Lowe.Nm lockd
161bbf21555SRichard Loweover a connection-oriented transport.
162bbf21555SRichard LoweThe default and minimum value is
163bbf21555SRichard Lowe.Li 32 .
164bbf21555SRichard Lowe.It Sy lockd_servers Ns = Ns Ar num
165bbf21555SRichard LoweMaximum number of concurrent
166bbf21555SRichard Lowe.Nm lockd
167bbf21555SRichard Lowerequests.
168bbf21555SRichard LoweThe default is 256.
169bbf21555SRichard Lowe.It Sy lockd_retransmit_timeout Ns = Ns Ar num
170bbf21555SRichard LoweRetransmit timeout, in seconds, before
171bbf21555SRichard Lowe.Nm lockd
172bbf21555SRichard Loweretries.
173bbf21555SRichard LoweThe default is
174bbf21555SRichard Lowe.Li 5 .
175bbf21555SRichard Lowe.It Sy grace_period Ns = Ns Ar num
176bbf21555SRichard LoweGrace period, in seconds, that all clients
177bbf21555SRichard Lowe.Pq both NLM and NFSv4
178bbf21555SRichard Lowehave to reclaim locks after a server reboot.
179bbf21555SRichard LoweThis parameter also controls the NFSv4 lease interval.
180bbf21555SRichard LoweThe default is
181bbf21555SRichard Lowe.Li 90 .
182bbf21555SRichard Lowe.It Sy mountd_listen_backlog Ns = Ns Ar num
183bbf21555SRichard LoweSet the connection queue length for
184bbf21555SRichard Lowe.Nm mountd
185bbf21555SRichard Loweover a connection-oriented transport.
186bbf21555SRichard LoweThe default value is
187bbf21555SRichard Lowe.Li 64 .
188bbf21555SRichard Lowe.It Sy mountd_max_threads Ns = Ns Ar num
189bbf21555SRichard LoweMaximum number of threads for
190bbf21555SRichard Lowe.Nm mountd .
191bbf21555SRichard LoweThe default value is
192bbf21555SRichard Lowe.Li 16 .
193bbf21555SRichard Lowe.It Sy mountd_port Ns = Ns Ar num
194bbf21555SRichard LoweThe IP port number on which
195bbf21555SRichard Lowe.Nm mountd
196bbf21555SRichard Loweshould listen.
197bbf21555SRichard LoweThe default value is
198bbf21555SRichard Lowe.Li 0 ,
199bbf21555SRichard Lowewhich means it should use a default binding.
20035a075c3SToomas Soome.It Sy mountd_remote_dump Ns = Ns Ar boolean
20135a075c3SToomas SoomeShould
20235a075c3SToomas Soome.Nm mountd
20335a075c3SToomas Soomerespond to remote
20435a075c3SToomas Soome.Sy MOUNTPROC_DUMP
20535a075c3SToomas Soomequeries to read the list of remote mounts.
20635a075c3SToomas SoomeThe default value is
20735a075c3SToomas Soome.Li false ,
20835a075c3SToomas Soomewhich means only queries from local host will be allowed.
209bbf21555SRichard Lowe.It Sy statd_port Ns = Ns Ar num
210bbf21555SRichard LoweThe IP port number on which
211bbf21555SRichard Lowe.Nm statd
212bbf21555SRichard Loweshould listen.
213bbf21555SRichard LoweThe default value is
214bbf21555SRichard Lowe.Li 0 ,
215bbf21555SRichard Lowewhich means it should use a default binding.
216bbf21555SRichard Lowe.El
217bbf21555SRichard Lowe.Ss Setting nfsmapid_domain
218bbf21555SRichard LoweAs described above, the setting for
219bbf21555SRichard Lowe.Sy nfsmapid_domain
220bbf21555SRichard Loweoverrides the domain used by
221bbf21555SRichard Lowe.Xr nfsmapid 8
222bbf21555SRichard Lowefor building and comparing outbound and inbound attribute strings, respectively.
223bbf21555SRichard LoweThis setting overrides any other mechanism for setting the NFSv4 domain.
224bbf21555SRichard LoweIn the absence of a
225bbf21555SRichard Lowe.Sy nfsmapid_domain
226bbf21555SRichard Lowesetting, the
227bbf21555SRichard Lowe.Xr nfsmapid 8
228bbf21555SRichard Lowedaemon determines the NFSv4 domain as follows:
229bbf21555SRichard Lowe.Bl -bullet
230bbf21555SRichard Lowe.It
231bbf21555SRichard LoweIf a properly configured
232bbf21555SRichard Lowe.Pa /etc/resolv.conf
233bbf21555SRichard Lowe.Po see
234bbf21555SRichard Lowe.Xr resolv.conf 5
235bbf21555SRichard Lowe.Pc
236bbf21555SRichard Loweexists,
237bbf21555SRichard Lowe.Nm nfsmapid
238bbf21555SRichard Lowequeries specified nameserver(s) for the domain.
239bbf21555SRichard Lowe.It
240bbf21555SRichard LoweIf a properly configured
241bbf21555SRichard Lowe.Pa /etc/resolv.conf
242bbf21555SRichard Lowe.Po see
243bbf21555SRichard Lowe.Xr resolv.conf 5
244bbf21555SRichard Lowe.Pc
245bbf21555SRichard Loweexists, but the queried nameserver does not have a proper record of the domain
246bbf21555SRichard Lowename,
247bbf21555SRichard Lowe.Nm nfsmapid
248bbf21555SRichard Loweattempts to obtain the domain name through the BIND interface
249bbf21555SRichard Lowe.Po see
250bbf21555SRichard Lowe.Xr resolver 3RESOLV
251bbf21555SRichard Lowe.Pc .
252bbf21555SRichard Lowe.It
253bbf21555SRichard LoweIf no
254bbf21555SRichard Lowe.Pa /etc/resolv.conf
255bbf21555SRichard Loweexists,
256bbf21555SRichard Lowe.Nm nfsmapid
257bbf21555SRichard Lowefalls back on using the configured domain name
258bbf21555SRichard Lowe.Po see
259bbf21555SRichard Lowe.Xr domainname 8
260bbf21555SRichard Lowe.Pc ,
261bbf21555SRichard Lowewhich is returned with the leading domain suffix removed.
262bbf21555SRichard LoweFor example, for
263bbf21555SRichard Lowe.Li widgets.sales.example.com ,
264bbf21555SRichard Lowe.Li sales.example.com
265bbf21555SRichard Loweis returned.
266bbf21555SRichard Lowe.It
267bbf21555SRichard LoweIf
268bbf21555SRichard Lowe.Pa /etc/resolv.conf
269bbf21555SRichard Lowedoes not exist, no domain name has been configured
270bbf21555SRichard Lowe.Po or no
271bbf21555SRichard Lowe.Pa /etc/defaultdomain
272bbf21555SRichard Loweexists
273bbf21555SRichard Lowe.Pc ,
274bbf21555SRichard Lowe.Nm nfsmapid
275bbf21555SRichard Lowefalls back on obtaining the domain name from the host name, if the host name
276bbf21555SRichard Lowecontains a fully qualified domain name
277bbf21555SRichard Lowe.Pq FQDN .
278bbf21555SRichard Lowe.El
279bbf21555SRichard Lowe.Pp
280bbf21555SRichard LoweIf a domainname is still not obtained following all of the preceding steps,
281bbf21555SRichard Lowe.Nm nfsmapid
282bbf21555SRichard Lowewill have no domain configured.
283bbf21555SRichard LoweThis results in the following behavior:
284bbf21555SRichard Lowe.Bl -bullet
285bbf21555SRichard Lowe.It
286bbf21555SRichard LoweOutbound
287bbf21555SRichard Lowe.Qq owner
288bbf21555SRichard Loweand
289bbf21555SRichard Lowe.Qq owner_group
290bbf21555SRichard Loweattribute strings are encoded as literal id's.
291bbf21555SRichard LoweFor example, the UID 12345 is encoded as
292bbf21555SRichard Lowe.Li 12345 .
293bbf21555SRichard Lowe.It
294bbf21555SRichard Lowe.Nm nfsmapid
295bbf21555SRichard Loweignores the
296bbf21555SRichard Lowe.Qq domain
297bbf21555SRichard Loweportion of the inbound attribute string and performs name service lookups only
298bbf21555SRichard Lowefor the user or group.
299bbf21555SRichard LoweIf the user/group exists in the local system name service databases, then the
300bbf21555SRichard Loweproper uid/gid will be mapped even when no domain has been configured.
301bbf21555SRichard Lowe.Pp
302bbf21555SRichard LoweThis behavior implies that the same administrative user/group domain exists
303bbf21555SRichard Lowebetween NFSv4 client and server (that is, the same uid/gid's for users/groups
304bbf21555SRichard Loweon both client and server).
305bbf21555SRichard LoweIn the case of overlapping id spaces, the inbound attribute string could
306bbf21555SRichard Lowepotentially be mapped to the wrong id.
307bbf21555SRichard LoweHowever, this is not functionally different from mapping the inbound string to
308bbf21555SRichard Lowe.Sy nobody ,
309bbf21555SRichard Loweyet provides greater flexibility.
310bbf21555SRichard Lowe.El
311bbf21555SRichard Lowe.Sh ZONES
312bbf21555SRichard LoweNFS can be served out of a non-global zone.
313bbf21555SRichard LoweAll of the above documentation applies to an in-zone NFS server.
314bbf21555SRichard LoweFile sharing in zones is restricted to filesystems a zone completely controls.
315bbf21555SRichard LoweSome zone brands (see
316bbf21555SRichard Lowe.Xr brands 7 )
317bbf21555SRichard Lowedo not give the zone's root its own filesystem, for example.
318bbf21555SRichard LoweDelegated ZFS datasets to a zone are shareable, as well as lofs-remounted
319bbf21555SRichard Lowedirectories.
320bbf21555SRichard LoweThe zone must have sys_nfs privileges; most brands grant this already.
321bbf21555SRichard Lowe.Sh SEE ALSO
322bbf21555SRichard Lowe.Xr brands 7 ,
323bbf21555SRichard Lowe.Xr smf 7 ,
324bbf21555SRichard Lowe.Xr zones 7 ,
325bbf21555SRichard Lowe.Xr lockd 8 ,
326bbf21555SRichard Lowe.Xr mount_nfs 8 ,
327bbf21555SRichard Lowe.Xr mountd 8 ,
328bbf21555SRichard Lowe.Xr nfsd 8 ,
329bbf21555SRichard Lowe.Xr nfsmapid 8 ,
330bbf21555SRichard Lowe.Xr sharectl 8
331