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*35a075c3SToomas Soome.\" Copyright 2022 RackTop Systems. 23bbf21555SRichard Lowe.\" 24*35a075c3SToomas Soome.Dd September 15, 2022 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. 82bbf21555SRichard LoweValid values of versions are: 2, 3, and 4. 83bbf21555SRichard LoweDefault minimum version is 84bbf21555SRichard Lowe.Li 2 , 85bbf21555SRichard Lowewhile the default maximum version is 86bbf21555SRichard Lowe.Li 4 . 87bbf21555SRichard Lowe.It Sy server_delegation Ns = Ns Sy on Ns | Ns Sy off 88bbf21555SRichard LoweBy default the NFS server provides delegations to clients. 89bbf21555SRichard LoweThe user can turn off delegations for all exported filesystems by setting this 90bbf21555SRichard Lowevariable to 91bbf21555SRichard Lowe.Li off . 92bbf21555SRichard LoweThis variable only applies to NFS Version 4. 93bbf21555SRichard Lowe.It Sy nfsmapid_domain Ns = Ns Op Ar string 94bbf21555SRichard LoweBy default, the 95bbf21555SRichard Lowe.Nm nfsmapid 96bbf21555SRichard Loweuses the DNS domain of the system. 97bbf21555SRichard LoweThis setting overrides the default. 98bbf21555SRichard LoweThis domain is used for identifying user and group attribute strings in the NFS 99bbf21555SRichard LoweVersion 4 protocol. 100bbf21555SRichard LoweClients and servers must match with this domain for operation to proceed 101bbf21555SRichard Lowenormally. 102bbf21555SRichard LoweThis variable only applies to NFS Version 4. 103bbf21555SRichard LoweSee 104bbf21555SRichard Lowe.Sx Setting nfsmapid_domain 105bbf21555SRichard Lowebelow for further details. 106bbf21555SRichard Lowe.It Sy max_connections Ns = Ns Ar num 107bbf21555SRichard LoweSets the maximum number of concurrent, connection-oriented connections. 108bbf21555SRichard LoweThe default is 109bbf21555SRichard Lowe.Li -1 110bbf21555SRichard Lowe.Pq unlimited . 111bbf21555SRichard LoweEquivalent to the 112bbf21555SRichard Lowe.Fl c 113bbf21555SRichard Loweoption in 114bbf21555SRichard Lowe.Nm nfsd . 115bbf21555SRichard Lowe.It Sy listen_backlog Ns = Ns Ar num 116bbf21555SRichard LoweSet connection queue length for the NFS over a connection-oriented transport. 117bbf21555SRichard LoweThe default value is 118bbf21555SRichard Lowe.Li 32 , 119bbf21555SRichard Lowemeaning 32 entries in the queue. 120bbf21555SRichard LoweEquivalent to the 121bbf21555SRichard Lowe.Fl l 122bbf21555SRichard Loweoption in 123bbf21555SRichard Lowe.Nm nfsd . 124bbf21555SRichard Lowe.It Sy protocol Ns = Ns Op Sy all Ns | Ns Ar protocol 125bbf21555SRichard LoweStart 126bbf21555SRichard Lowe.Nm nfsd 127bbf21555SRichard Loweover the specified protocol only. 128bbf21555SRichard LoweEquivalent to the 129bbf21555SRichard Lowe.Fl p 130bbf21555SRichard Loweoption in 131bbf21555SRichard Lowe.Nm nfsd . 132bbf21555SRichard Lowe.Sy all 133bbf21555SRichard Loweis equivalent to 134bbf21555SRichard Lowe.Fl a 135bbf21555SRichard Loweon the 136bbf21555SRichard Lowe.Nm nfsd 137bbf21555SRichard Lowecommand line. 138bbf21555SRichard LoweMutually exclusive of 139bbf21555SRichard Lowe.Sy device . 140bbf21555SRichard LoweFor the UDP protocol, only version 2 and version 3 service is established. 141bbf21555SRichard LoweNFS Version 4 is not supported for the UDP protocol. 142bbf21555SRichard Lowe.It Sy device Ns = Ns Op Ar devname 143bbf21555SRichard LoweStart NFS daemon for the transport specified by the given device only. 144bbf21555SRichard LoweEquivalent to the 145bbf21555SRichard Lowe.Fl t 146bbf21555SRichard Loweoption in 147bbf21555SRichard Lowe.Nm nfsd . 148bbf21555SRichard LoweMutually exclusive of 149bbf21555SRichard Lowe.Sy protocol . 150bbf21555SRichard Lowe.It Sy servers Ns = Ns Ar num 151bbf21555SRichard LoweMaximum number of concurrent NFS requests. 152bbf21555SRichard LoweEquivalent to last numeric argument on the 153bbf21555SRichard Lowe.Nm nfsd 154bbf21555SRichard Lowecommand line. 155bbf21555SRichard LoweThe default is 156bbf21555SRichard Lowe.Li 1024 . 157bbf21555SRichard Lowe.It Sy lockd_listen_backlog Ns = Ns Ar num 158bbf21555SRichard LoweSet connection queue length for 159bbf21555SRichard Lowe.Nm lockd 160bbf21555SRichard Loweover a connection-oriented transport. 161bbf21555SRichard LoweThe default and minimum value is 162bbf21555SRichard Lowe.Li 32 . 163bbf21555SRichard Lowe.It Sy lockd_servers Ns = Ns Ar num 164bbf21555SRichard LoweMaximum number of concurrent 165bbf21555SRichard Lowe.Nm lockd 166bbf21555SRichard Lowerequests. 167bbf21555SRichard LoweThe default is 256. 168bbf21555SRichard Lowe.It Sy lockd_retransmit_timeout Ns = Ns Ar num 169bbf21555SRichard LoweRetransmit timeout, in seconds, before 170bbf21555SRichard Lowe.Nm lockd 171bbf21555SRichard Loweretries. 172bbf21555SRichard LoweThe default is 173bbf21555SRichard Lowe.Li 5 . 174bbf21555SRichard Lowe.It Sy grace_period Ns = Ns Ar num 175bbf21555SRichard LoweGrace period, in seconds, that all clients 176bbf21555SRichard Lowe.Pq both NLM and NFSv4 177bbf21555SRichard Lowehave to reclaim locks after a server reboot. 178bbf21555SRichard LoweThis parameter also controls the NFSv4 lease interval. 179bbf21555SRichard LoweThe default is 180bbf21555SRichard Lowe.Li 90 . 181bbf21555SRichard Lowe.It Sy mountd_listen_backlog Ns = Ns Ar num 182bbf21555SRichard LoweSet the connection queue length for 183bbf21555SRichard Lowe.Nm mountd 184bbf21555SRichard Loweover a connection-oriented transport. 185bbf21555SRichard LoweThe default value is 186bbf21555SRichard Lowe.Li 64 . 187bbf21555SRichard Lowe.It Sy mountd_max_threads Ns = Ns Ar num 188bbf21555SRichard LoweMaximum number of threads for 189bbf21555SRichard Lowe.Nm mountd . 190bbf21555SRichard LoweThe default value is 191bbf21555SRichard Lowe.Li 16 . 192bbf21555SRichard Lowe.It Sy mountd_port Ns = Ns Ar num 193bbf21555SRichard LoweThe IP port number on which 194bbf21555SRichard Lowe.Nm mountd 195bbf21555SRichard Loweshould listen. 196bbf21555SRichard LoweThe default value is 197bbf21555SRichard Lowe.Li 0 , 198bbf21555SRichard Lowewhich means it should use a default binding. 199*35a075c3SToomas Soome.It Sy mountd_remote_dump Ns = Ns Ar boolean 200*35a075c3SToomas SoomeShould 201*35a075c3SToomas Soome.Nm mountd 202*35a075c3SToomas Soomerespond to remote 203*35a075c3SToomas Soome.Sy MOUNTPROC_DUMP 204*35a075c3SToomas Soomequeries to read the list of remote mounts. 205*35a075c3SToomas SoomeThe default value is 206*35a075c3SToomas Soome.Li false , 207*35a075c3SToomas Soomewhich means only queries from local host will be allowed. 208bbf21555SRichard Lowe.It Sy statd_port Ns = Ns Ar num 209bbf21555SRichard LoweThe IP port number on which 210bbf21555SRichard Lowe.Nm statd 211bbf21555SRichard Loweshould listen. 212bbf21555SRichard LoweThe default value is 213bbf21555SRichard Lowe.Li 0 , 214bbf21555SRichard Lowewhich means it should use a default binding. 215bbf21555SRichard Lowe.El 216bbf21555SRichard Lowe.Ss Setting nfsmapid_domain 217bbf21555SRichard LoweAs described above, the setting for 218bbf21555SRichard Lowe.Sy nfsmapid_domain 219bbf21555SRichard Loweoverrides the domain used by 220bbf21555SRichard Lowe.Xr nfsmapid 8 221bbf21555SRichard Lowefor building and comparing outbound and inbound attribute strings, respectively. 222bbf21555SRichard LoweThis setting overrides any other mechanism for setting the NFSv4 domain. 223bbf21555SRichard LoweIn the absence of a 224bbf21555SRichard Lowe.Sy nfsmapid_domain 225bbf21555SRichard Lowesetting, the 226bbf21555SRichard Lowe.Xr nfsmapid 8 227bbf21555SRichard Lowedaemon determines the NFSv4 domain as follows: 228bbf21555SRichard Lowe.Bl -bullet 229bbf21555SRichard Lowe.It 230bbf21555SRichard LoweIf a properly configured 231bbf21555SRichard Lowe.Pa /etc/resolv.conf 232bbf21555SRichard Lowe.Po see 233bbf21555SRichard Lowe.Xr resolv.conf 5 234bbf21555SRichard Lowe.Pc 235bbf21555SRichard Loweexists, 236bbf21555SRichard Lowe.Nm nfsmapid 237bbf21555SRichard Lowequeries specified nameserver(s) for the domain. 238bbf21555SRichard Lowe.It 239bbf21555SRichard LoweIf a properly configured 240bbf21555SRichard Lowe.Pa /etc/resolv.conf 241bbf21555SRichard Lowe.Po see 242bbf21555SRichard Lowe.Xr resolv.conf 5 243bbf21555SRichard Lowe.Pc 244bbf21555SRichard Loweexists, but the queried nameserver does not have a proper record of the domain 245bbf21555SRichard Lowename, 246bbf21555SRichard Lowe.Nm nfsmapid 247bbf21555SRichard Loweattempts to obtain the domain name through the BIND interface 248bbf21555SRichard Lowe.Po see 249bbf21555SRichard Lowe.Xr resolver 3RESOLV 250bbf21555SRichard Lowe.Pc . 251bbf21555SRichard Lowe.It 252bbf21555SRichard LoweIf no 253bbf21555SRichard Lowe.Pa /etc/resolv.conf 254bbf21555SRichard Loweexists, 255bbf21555SRichard Lowe.Nm nfsmapid 256bbf21555SRichard Lowefalls back on using the configured domain name 257bbf21555SRichard Lowe.Po see 258bbf21555SRichard Lowe.Xr domainname 8 259bbf21555SRichard Lowe.Pc , 260bbf21555SRichard Lowewhich is returned with the leading domain suffix removed. 261bbf21555SRichard LoweFor example, for 262bbf21555SRichard Lowe.Li widgets.sales.example.com , 263bbf21555SRichard Lowe.Li sales.example.com 264bbf21555SRichard Loweis returned. 265bbf21555SRichard Lowe.It 266bbf21555SRichard LoweIf 267bbf21555SRichard Lowe.Pa /etc/resolv.conf 268bbf21555SRichard Lowedoes not exist, no domain name has been configured 269bbf21555SRichard Lowe.Po or no 270bbf21555SRichard Lowe.Pa /etc/defaultdomain 271bbf21555SRichard Loweexists 272bbf21555SRichard Lowe.Pc , 273bbf21555SRichard Lowe.Nm nfsmapid 274bbf21555SRichard Lowefalls back on obtaining the domain name from the host name, if the host name 275bbf21555SRichard Lowecontains a fully qualified domain name 276bbf21555SRichard Lowe.Pq FQDN . 277bbf21555SRichard Lowe.El 278bbf21555SRichard Lowe.Pp 279bbf21555SRichard LoweIf a domainname is still not obtained following all of the preceding steps, 280bbf21555SRichard Lowe.Nm nfsmapid 281bbf21555SRichard Lowewill have no domain configured. 282bbf21555SRichard LoweThis results in the following behavior: 283bbf21555SRichard Lowe.Bl -bullet 284bbf21555SRichard Lowe.It 285bbf21555SRichard LoweOutbound 286bbf21555SRichard Lowe.Qq owner 287bbf21555SRichard Loweand 288bbf21555SRichard Lowe.Qq owner_group 289bbf21555SRichard Loweattribute strings are encoded as literal id's. 290bbf21555SRichard LoweFor example, the UID 12345 is encoded as 291bbf21555SRichard Lowe.Li 12345 . 292bbf21555SRichard Lowe.It 293bbf21555SRichard Lowe.Nm nfsmapid 294bbf21555SRichard Loweignores the 295bbf21555SRichard Lowe.Qq domain 296bbf21555SRichard Loweportion of the inbound attribute string and performs name service lookups only 297bbf21555SRichard Lowefor the user or group. 298bbf21555SRichard LoweIf the user/group exists in the local system name service databases, then the 299bbf21555SRichard Loweproper uid/gid will be mapped even when no domain has been configured. 300bbf21555SRichard Lowe.Pp 301bbf21555SRichard LoweThis behavior implies that the same administrative user/group domain exists 302bbf21555SRichard Lowebetween NFSv4 client and server (that is, the same uid/gid's for users/groups 303bbf21555SRichard Loweon both client and server). 304bbf21555SRichard LoweIn the case of overlapping id spaces, the inbound attribute string could 305bbf21555SRichard Lowepotentially be mapped to the wrong id. 306bbf21555SRichard LoweHowever, this is not functionally different from mapping the inbound string to 307bbf21555SRichard Lowe.Sy nobody , 308bbf21555SRichard Loweyet provides greater flexibility. 309bbf21555SRichard Lowe.El 310bbf21555SRichard Lowe.Sh ZONES 311bbf21555SRichard LoweNFS can be served out of a non-global zone. 312bbf21555SRichard LoweAll of the above documentation applies to an in-zone NFS server. 313bbf21555SRichard LoweFile sharing in zones is restricted to filesystems a zone completely controls. 314bbf21555SRichard LoweSome zone brands (see 315bbf21555SRichard Lowe.Xr brands 7 ) 316bbf21555SRichard Lowedo not give the zone's root its own filesystem, for example. 317bbf21555SRichard LoweDelegated ZFS datasets to a zone are shareable, as well as lofs-remounted 318bbf21555SRichard Lowedirectories. 319bbf21555SRichard LoweThe zone must have sys_nfs privileges; most brands grant this already. 320bbf21555SRichard Lowe.Sh SEE ALSO 321bbf21555SRichard Lowe.Xr brands 7 , 322bbf21555SRichard Lowe.Xr smf 7 , 323bbf21555SRichard Lowe.Xr zones 7 , 324bbf21555SRichard Lowe.Xr lockd 8 , 325bbf21555SRichard Lowe.Xr mount_nfs 8 , 326bbf21555SRichard Lowe.Xr mountd 8 , 327bbf21555SRichard Lowe.Xr nfsd 8 , 328bbf21555SRichard Lowe.Xr nfsmapid 8 , 329bbf21555SRichard Lowe.Xr sharectl 8 330