1c7709595SYuri Pankov.\" 2c7709595SYuri Pankov.\" The contents of this file are subject to the terms of the 3c7709595SYuri Pankov.\" Common Development and Distribution License (the "License"). 4c7709595SYuri Pankov.\" You may not use this file except in compliance with the License. 5c7709595SYuri Pankov.\" 6c7709595SYuri Pankov.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 7c7709595SYuri Pankov.\" or http://www.opensolaris.org/os/licensing. 8c7709595SYuri Pankov.\" See the License for the specific language governing permissions 9c7709595SYuri Pankov.\" and limitations under the License. 10c7709595SYuri Pankov.\" 11c7709595SYuri Pankov.\" When distributing Covered Code, include this CDDL HEADER in each 12c7709595SYuri Pankov.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 13c7709595SYuri Pankov.\" If applicable, add the following below this CDDL HEADER, with the 14c7709595SYuri Pankov.\" fields enclosed by brackets "[]" replaced with your own identifying 15c7709595SYuri Pankov.\" information: Portions Copyright [yyyy] [name of copyright owner] 16c7709595SYuri Pankov.\" 17c7709595SYuri Pankov.\" 18c7709595SYuri Pankov.\" Copyright 1989 AT&T 19c7709595SYuri Pankov.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved. 20c7709595SYuri Pankov.\" Copyright 2016 Nexenta Systems, Inc. 21c90a6cb9SDan McDonald.\" Copyright 2020 Joyent, Inc. 22*ceaafe38SToomas Soome.\" Copyright 2022-2024 RackTop Systems. 23c7709595SYuri Pankov.\" 24*ceaafe38SToomas Soome.Dd March 23, 2024 25bbf21555SRichard Lowe.Dt NFS 5 26c7709595SYuri Pankov.Os 27c7709595SYuri Pankov.Sh NAME 28c7709595SYuri Pankov.Nm nfs 29c7709595SYuri Pankov.Nd NFS configuration properties 30c7709595SYuri Pankov.Sh DESCRIPTION 31c7709595SYuri PankovThe behavior of the 32bbf21555SRichard Lowe.Xr nfsd 8 , 33bbf21555SRichard Lowe.Xr nfsmapid 8 , 34bbf21555SRichard Lowe.Xr lockd 8 , 35c7709595SYuri Pankovand 36bbf21555SRichard Lowe.Xr mountd 8 37c7709595SYuri Pankovdaemons and 38bbf21555SRichard Lowe.Xr mount_nfs 8 39c7709595SYuri Pankovcommand is controlled by property values that are stored in the Service 40bbf21555SRichard LoweManagement Facility, smf(7). 4172d3dbb9SYuri PankovThe 42bbf21555SRichard Lowe.Xr sharectl 8 43c7709595SYuri Pankovcommand should be used to query or change values for these properties. 44c7709595SYuri Pankov.Pp 45c7709595SYuri PankovChanges made to 46c7709595SYuri Pankov.Nm 47c7709595SYuri Pankovproperty values on the 48c7709595SYuri Pankov.Nm nfsd , 49c7709595SYuri Pankov.Nm lockd , 50c7709595SYuri Pankov.Nm mountd , 51c7709595SYuri Pankovor 52c7709595SYuri Pankov.Nm mount_nfs 53c7709595SYuri Pankovcommand line override the values set using 54bbf21555SRichard Lowe.Xr sharectl 8 . 55c7709595SYuri Pankov.Pp 56c7709595SYuri PankovThe following list describes the properties: 57c7709595SYuri Pankov.Bl -tag -width Ds 58c7709595SYuri Pankov.It Xo 59c7709595SYuri Pankov.Sy client_versmin Ns = Ns Ar num 60c10c16deSRichard Lowe.br 61c7709595SYuri Pankov.Sy client_versmax Ns = Ns Ar num 62c7709595SYuri Pankov.Xc 63c10c16deSRichard LoweThe NFS client only uses NFS versions in the range specified by these 6472d3dbb9SYuri Pankovproperties. 6572d3dbb9SYuri PankovValid values of versions are: 2, 3, and 4. 6672d3dbb9SYuri PankovDefault minimum version is 67c7709595SYuri Pankov.Li 2 , 68c7709595SYuri Pankovwhile default maximum is 69c7709595SYuri Pankov.Li 4 . 70c7709595SYuri Pankov.Pp 71c7709595SYuri PankovYou can override this range on a per-mount basis by using the 72c7709595SYuri Pankov.Fl o Sy vers Ns = 73c7709595SYuri Pankovoption to 74bbf21555SRichard Lowe.Xr mount_nfs 8 . 75c7709595SYuri Pankov.It Xo 76c7709595SYuri Pankov.Sy server_versmin Ns = Ns Ar num 77c10c16deSRichard Lowe.br 78c7709595SYuri Pankov.Sy server_versmax Ns = Ns Ar num 79c7709595SYuri Pankov.Xc 80c10c16deSRichard LoweThe NFS server only uses NFS versions in the range specified by these 8172d3dbb9SYuri Pankovproperties. 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. 8472d3dbb9SYuri PankovDefault minimum version is 85c7709595SYuri Pankov.Li 2 , 86c7709595SYuri Pankovwhile the default maximum version is 87c7709595SYuri Pankov.Li 4 . 88386be055SMarcel Telka.It Sy server_delegation Ns = Ns Sy on Ns | Ns Sy off 8972d3dbb9SYuri PankovBy default the NFS server provides delegations to clients. 9072d3dbb9SYuri PankovThe user can turn off delegations for all exported filesystems by setting this 9172d3dbb9SYuri Pankovvariable to 92c7709595SYuri Pankov.Li off . 93c7709595SYuri PankovThis variable only applies to NFS Version 4. 94c7709595SYuri Pankov.It Sy nfsmapid_domain Ns = Ns Op Ar string 95c7709595SYuri PankovBy default, the 96c7709595SYuri Pankov.Nm nfsmapid 9772d3dbb9SYuri Pankovuses the DNS domain of the system. 9872d3dbb9SYuri PankovThis setting overrides the default. 9972d3dbb9SYuri PankovThis domain is used for identifying user and group attribute strings in the NFS 10072d3dbb9SYuri PankovVersion 4 protocol. 10172d3dbb9SYuri PankovClients and servers must match with this domain for operation to proceed 10272d3dbb9SYuri Pankovnormally. 10372d3dbb9SYuri PankovThis variable only applies to NFS Version 4. 10472d3dbb9SYuri PankovSee 105c7709595SYuri Pankov.Sx Setting nfsmapid_domain 106c7709595SYuri Pankovbelow for further details. 107c7709595SYuri Pankov.It Sy max_connections Ns = Ns Ar num 10872d3dbb9SYuri PankovSets the maximum number of concurrent, connection-oriented connections. 10972d3dbb9SYuri PankovThe default is 110c7709595SYuri Pankov.Li -1 111c7709595SYuri Pankov.Pq unlimited . 112c7709595SYuri PankovEquivalent to the 113c7709595SYuri Pankov.Fl c 114c7709595SYuri Pankovoption in 115c7709595SYuri Pankov.Nm nfsd . 116c7709595SYuri Pankov.It Sy listen_backlog Ns = Ns Ar num 117c10c16deSRichard LoweSet connection queue length for the NFS over a connection-oriented transport. 118c7709595SYuri PankovThe default value is 119c7709595SYuri Pankov.Li 32 , 12072d3dbb9SYuri Pankovmeaning 32 entries in the queue. 12172d3dbb9SYuri PankovEquivalent to the 122c7709595SYuri Pankov.Fl l 123c7709595SYuri Pankovoption in 124c7709595SYuri Pankov.Nm nfsd . 125c7709595SYuri Pankov.It Sy protocol Ns = Ns Op Sy all Ns | Ns Ar protocol 126c7709595SYuri PankovStart 127c7709595SYuri Pankov.Nm nfsd 12872d3dbb9SYuri Pankovover the specified protocol only. 12972d3dbb9SYuri PankovEquivalent to the 130c7709595SYuri Pankov.Fl p 131c7709595SYuri Pankovoption in 132c7709595SYuri Pankov.Nm nfsd . 133c7709595SYuri Pankov.Sy all 134c7709595SYuri Pankovis equivalent to 135c7709595SYuri Pankov.Fl a 136c7709595SYuri Pankovon the 137c7709595SYuri Pankov.Nm nfsd 13872d3dbb9SYuri Pankovcommand line. 1390a554e9fSPeter TribbleMutually exclusive of 140c7709595SYuri Pankov.Sy device . 14172d3dbb9SYuri PankovFor the UDP protocol, only version 2 and version 3 service is established. 14272d3dbb9SYuri PankovNFS Version 4 is not supported for the UDP protocol. 143c7709595SYuri Pankov.It Sy device Ns = Ns Op Ar devname 144c10c16deSRichard LoweStart NFS daemon for the transport specified by the given device only. 145c7709595SYuri PankovEquivalent to the 146c7709595SYuri Pankov.Fl t 147c7709595SYuri Pankovoption in 148c7709595SYuri Pankov.Nm nfsd . 149c7709595SYuri PankovMutually exclusive of 150c7709595SYuri Pankov.Sy protocol . 151c7709595SYuri Pankov.It Sy servers Ns = Ns Ar num 15272d3dbb9SYuri PankovMaximum number of concurrent NFS requests. 15372d3dbb9SYuri PankovEquivalent to last numeric argument on the 154c7709595SYuri Pankov.Nm nfsd 15572d3dbb9SYuri Pankovcommand line. 15672d3dbb9SYuri PankovThe default is 157201f5ebaSSebastien Roy.Li 1024 . 158c7709595SYuri Pankov.It Sy lockd_listen_backlog Ns = Ns Ar num 159c7709595SYuri PankovSet connection queue length for 160c7709595SYuri Pankov.Nm lockd 16172d3dbb9SYuri Pankovover a connection-oriented transport. 16272d3dbb9SYuri PankovThe default and minimum value is 163c7709595SYuri Pankov.Li 32 . 164c7709595SYuri Pankov.It Sy lockd_servers Ns = Ns Ar num 165c7709595SYuri PankovMaximum number of concurrent 166c7709595SYuri Pankov.Nm lockd 16772d3dbb9SYuri Pankovrequests. 16872d3dbb9SYuri PankovThe default is 256. 169c7709595SYuri Pankov.It Sy lockd_retransmit_timeout Ns = Ns Ar num 170c7709595SYuri PankovRetransmit timeout, in seconds, before 171c7709595SYuri Pankov.Nm lockd 17272d3dbb9SYuri Pankovretries. 17372d3dbb9SYuri PankovThe default is 174c7709595SYuri Pankov.Li 5 . 175c7709595SYuri Pankov.It Sy grace_period Ns = Ns Ar num 176c7709595SYuri PankovGrace period, in seconds, that all clients 177c7709595SYuri Pankov.Pq both NLM and NFSv4 17872d3dbb9SYuri Pankovhave to reclaim locks after a server reboot. 17972d3dbb9SYuri PankovThis parameter also controls the NFSv4 lease interval. 18072d3dbb9SYuri PankovThe default is 181c7709595SYuri Pankov.Li 90 . 182c7709595SYuri Pankov.It Sy mountd_listen_backlog Ns = Ns Ar num 183c7709595SYuri PankovSet the connection queue length for 184c7709595SYuri Pankov.Nm mountd 18572d3dbb9SYuri Pankovover a connection-oriented transport. 18672d3dbb9SYuri PankovThe default value is 187c7709595SYuri Pankov.Li 64 . 188c7709595SYuri Pankov.It Sy mountd_max_threads Ns = Ns Ar num 189c7709595SYuri PankovMaximum number of threads for 190c7709595SYuri Pankov.Nm mountd . 191c7709595SYuri PankovThe default value is 192c7709595SYuri Pankov.Li 16 . 1932c3ccf74SGordon Ross.It Sy mountd_port Ns = Ns Ar num 1942c3ccf74SGordon RossThe IP port number on which 1952c3ccf74SGordon Ross.Nm mountd 1962c3ccf74SGordon Rossshould listen. 1972c3ccf74SGordon RossThe default value is 1982c3ccf74SGordon Ross.Li 0 , 1992c3ccf74SGordon Rosswhich 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. 209e72ff08dSGordon Ross.It Sy statd_port Ns = Ns Ar num 210e72ff08dSGordon RossThe IP port number on which 211e72ff08dSGordon Ross.Nm statd 212e72ff08dSGordon Rossshould listen. 213e72ff08dSGordon RossThe default value is 214e72ff08dSGordon Ross.Li 0 , 215e72ff08dSGordon Rosswhich means it should use a default binding. 216c7709595SYuri Pankov.El 217c7709595SYuri Pankov.Ss Setting nfsmapid_domain 218c7709595SYuri PankovAs described above, the setting for 219c7709595SYuri Pankov.Sy nfsmapid_domain 220c7709595SYuri Pankovoverrides the domain used by 221bbf21555SRichard Lowe.Xr nfsmapid 8 222c7709595SYuri Pankovfor building and comparing outbound and inbound attribute strings, respectively. 22372d3dbb9SYuri PankovThis setting overrides any other mechanism for setting the NFSv4 domain. 22472d3dbb9SYuri PankovIn the absence of a 225c7709595SYuri Pankov.Sy nfsmapid_domain 226c7709595SYuri Pankovsetting, the 227bbf21555SRichard Lowe.Xr nfsmapid 8 228c7709595SYuri Pankovdaemon determines the NFSv4 domain as follows: 229c7709595SYuri Pankov.Bl -bullet 230c7709595SYuri Pankov.It 231c7709595SYuri PankovIf a properly configured 232c7709595SYuri Pankov.Pa /etc/resolv.conf 233c7709595SYuri Pankov.Po see 234bbf21555SRichard Lowe.Xr resolv.conf 5 235c7709595SYuri Pankov.Pc 236c7709595SYuri Pankovexists, 237c7709595SYuri Pankov.Nm nfsmapid 238c7709595SYuri Pankovqueries specified nameserver(s) for the domain. 239c7709595SYuri Pankov.It 240c7709595SYuri PankovIf a properly configured 241c7709595SYuri Pankov.Pa /etc/resolv.conf 242c7709595SYuri Pankov.Po see 243bbf21555SRichard Lowe.Xr resolv.conf 5 244c7709595SYuri Pankov.Pc 245c10c16deSRichard Loweexists, but the queried nameserver does not have a proper record of the domain 246c7709595SYuri Pankovname, 247c7709595SYuri Pankov.Nm nfsmapid 248c7709595SYuri Pankovattempts to obtain the domain name through the BIND interface 249c7709595SYuri Pankov.Po see 250c7709595SYuri Pankov.Xr resolver 3RESOLV 251c7709595SYuri Pankov.Pc . 252c7709595SYuri Pankov.It 253c7709595SYuri PankovIf no 254c7709595SYuri Pankov.Pa /etc/resolv.conf 255c7709595SYuri Pankovexists, 256c7709595SYuri Pankov.Nm nfsmapid 257c7709595SYuri Pankovfalls back on using the configured domain name 258c7709595SYuri Pankov.Po see 259bbf21555SRichard Lowe.Xr domainname 8 260c7709595SYuri Pankov.Pc , 26172d3dbb9SYuri Pankovwhich is returned with the leading domain suffix removed. 26272d3dbb9SYuri PankovFor example, for 263338d6fc1SPeter Tribble.Li widgets.sales.example.com , 264338d6fc1SPeter Tribble.Li sales.example.com 265c7709595SYuri Pankovis returned. 266c7709595SYuri Pankov.It 267c7709595SYuri PankovIf 268c7709595SYuri Pankov.Pa /etc/resolv.conf 269c7709595SYuri Pankovdoes not exist, no domain name has been configured 270c7709595SYuri Pankov.Po or no 271c7709595SYuri Pankov.Pa /etc/defaultdomain 272c7709595SYuri Pankovexists 273c7709595SYuri Pankov.Pc , 274c7709595SYuri Pankov.Nm nfsmapid 275c7709595SYuri Pankovfalls back on obtaining the domain name from the host name, if the host name 276c7709595SYuri Pankovcontains a fully qualified domain name 277c7709595SYuri Pankov.Pq FQDN . 278c7709595SYuri Pankov.El 279c7709595SYuri Pankov.Pp 280c10c16deSRichard LoweIf a domainname is still not obtained following all of the preceding steps, 281c7709595SYuri Pankov.Nm nfsmapid 28272d3dbb9SYuri Pankovwill have no domain configured. 28372d3dbb9SYuri PankovThis results in the following behavior: 284c7709595SYuri Pankov.Bl -bullet 285c7709595SYuri Pankov.It 286c7709595SYuri PankovOutbound 287c7709595SYuri Pankov.Qq owner 288c7709595SYuri Pankovand 289c7709595SYuri Pankov.Qq owner_group 29072d3dbb9SYuri Pankovattribute strings are encoded as literal id's. 29172d3dbb9SYuri PankovFor example, the UID 12345 is encoded as 292c7709595SYuri Pankov.Li 12345 . 293c7709595SYuri Pankov.It 294c7709595SYuri Pankov.Nm nfsmapid 295c7709595SYuri Pankovignores the 296c7709595SYuri Pankov.Qq domain 297c7709595SYuri Pankovportion of the inbound attribute string and performs name service lookups only 29872d3dbb9SYuri Pankovfor the user or group. 29972d3dbb9SYuri PankovIf the user/group exists in the local system name service databases, then the 30072d3dbb9SYuri Pankovproper uid/gid will be mapped even when no domain has been configured. 301c7709595SYuri Pankov.Pp 302c10c16deSRichard LoweThis behavior implies that the same administrative user/group domain exists 303c10c16deSRichard Lowebetween NFSv4 client and server (that is, the same uid/gid's for users/groups 30472d3dbb9SYuri Pankovon both client and server). 30572d3dbb9SYuri PankovIn the case of overlapping id spaces, the inbound attribute string could 30672d3dbb9SYuri Pankovpotentially be mapped to the wrong id. 30772d3dbb9SYuri PankovHowever, this is not functionally different from mapping the inbound string to 308c7709595SYuri Pankov.Sy nobody , 309c7709595SYuri Pankovyet provides greater flexibility. 310c7709595SYuri Pankov.El 311c90a6cb9SDan McDonald.Sh ZONES 312c90a6cb9SDan McDonaldNFS can be served out of a non-global zone. 313c90a6cb9SDan McDonaldAll of the above documentation applies to an in-zone NFS server. 314c90a6cb9SDan McDonaldFile sharing in zones is restricted to filesystems a zone completely controls. 315c90a6cb9SDan McDonaldSome zone brands (see 316bbf21555SRichard Lowe.Xr brands 7 ) 317c90a6cb9SDan McDonalddo not give the zone's root its own filesystem, for example. 318c90a6cb9SDan McDonaldDelegated ZFS datasets to a zone are shareable, as well as lofs-remounted 319c90a6cb9SDan McDonalddirectories. 320c90a6cb9SDan McDonaldThe zone must have sys_nfs privileges; most brands grant this already. 321c7709595SYuri Pankov.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