xref: /illumos-gate/usr/src/man/man8/nfsd.8 (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
1.\"
2.\" The contents of this file are subject to the terms of the
3.\" Common Development and Distribution License (the "License").
4.\" You may not use this file except in compliance with the License.
5.\"
6.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7.\" or http://www.opensolaris.org/os/licensing.
8.\" See the License for the specific language governing permissions
9.\" and limitations under the License.
10.\"
11.\" When distributing Covered Code, include this CDDL HEADER in each
12.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13.\" If applicable, add the following below this CDDL HEADER, with the
14.\" fields enclosed by brackets "[]" replaced with your own identifying
15.\" information: Portions Copyright [yyyy] [name of copyright owner]
16.\"
17.\"
18.\" Copyright 1989 AT&T
19.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
20.\" Copyright 2016 Nexenta Systems, Inc.
21.\" Copyright 2020 Joyent, Inc.
22.\"
23.Dd February 4, 2020
24.Dt NFSD 8
25.Os
26.Sh NAME
27.Nm nfsd
28.Nd NFS daemon
29.Sh SYNOPSIS
30.Nm /usr/lib/nfs/nfsd
31.Op Fl a
32.Op Fl c Ar max_conn
33.Op Fl l Ar listen_backlog
34.Op Fl p Ar protocol
35.Op Fl t Ar device
36.Op Ar nservers
37.Sh DESCRIPTION
38.Nm
39is the daemon that handles client file system requests.
40Only users with
41.Brq Sy PRIV_SYS_NFS
42and sufficient privileges to write to
43.Pa /var/run
44can run this daemon.
45.Pp
46The
47.Nm
48daemon is automatically invoked using
49.Xr share 8
50with the
51.Fl a
52option.
53.Pp
54By default,
55.Nm
56starts over the TCP and UDP transports for versions 2 and 3.
57By default, it starts over the TCP for version 4.
58You can change this with the
59.Fl p
60option.
61.Pp
62A previously invoked
63.Nm
64daemon started with or without options must be stopped before invoking another
65.Nm
66command.
67.Pp
68See
69.Xr nfs 5
70for available configuration properties for
71.Nm .
72.Ss Options
73The following options are supported:
74.Bl -tag -width Ds
75.It Fl a
76Start a NFS daemon over all available connectionless and connection-oriented
77transports, including UDP and TCP.
78Equivalent of setting the
79.Sy protocol
80property to
81.Sy all .
82.It Fl c Ar max_conn
83Set the maximum number of connections allowed to the NFS server over
84connection-oriented transports.
85By default, the number of connections is unlimited.
86Equivalent of the
87.Sy max_connections
88property.
89.It Fl l
90Set connection queue length for the NFS server over a connection-oriented
91transport.
92The default value is 32 entries.
93Equivalent of the
94.Sy listen_backlog
95property.
96.It Fl p Ar protocol
97Start a NFS daemon over the specified protocol.
98Equivalent of the
99.Sy protocol
100property.
101.It Fl t Ar device
102Start a NFS daemon for the transport specified by the given device.
103Equivalent of the
104.Sy device
105property.
106.El
107.Ss Operands
108The following operands are supported:
109.Bl -tag -width Ds
110.It Ar nservers
111This sets the maximum number of concurrent NFS requests that the server can
112handle.
113This concurrency is achieved by up to
114.Ar nservers
115threads created as needed in the kernel.
116.Ar nservers
117should be based on the load expected on this server.
11816 is the usual number of
119.Ar nservers .
120If
121.Ar nservers
122is not specified, the maximum number of concurrent NFS requests will default to
1231.
124Equivalent of the
125.Sy servers
126property.
127.El
128.Ss Usage
129If the
130.Sy nfs_portmon
131variable is set to non-zero value in
132.Pa /etc/system ,
133then clients are required to use privileged ports
134.Po ports <
135.Dv IPPORT_RESERVED
136.Pc
137to get NFS services.
138This variable is equal to zero by default.
139This variable has been moved from the
140.Qq nfs
141module to the
142.Qq nfssrv
143module.
144To set the variable, edit the
145.Pa /etc/system
146file and add this entry:
147.Bd -literal -offset indent
148set nfssrv:nfs_portmon = 1
149.Ed
150.Sh FILES
151.Bl -tag -width Ds
152.It Pa \&.nfsXXX
153Client machine pointer to an open-but-unlinked file.
154.It Pa /etc/system
155System configuration information file.
156.It Xo
157.Pa /var/nfs/v4_state
158.br
159.Pa /var/nfs/v4_oldstate
160.Xc
161Directories used by the server to manage client state information.
162These directories should not be removed.
163.El
164.Sh EXIT STATUS
165.Bl -tag -width Ds
166.It Sy 0
167Daemon started successfully.
168.It Sy 1
169Daemon failed to start.
170.El
171.Sh SEE ALSO
172.Xr svcs 1 ,
173.Xr nfs 5 ,
174.Xr sharetab 5 ,
175.Xr system 5 ,
176.Xr attributes 7 ,
177.Xr smf 7 ,
178.Xr zones 7 ,
179.Xr mountd 8 ,
180.Xr share 8 ,
181.Xr sharectl 8 ,
182.Xr sharemgr 8 ,
183.Xr svcadm 8
184.Sh NOTES
185Manually starting and restarting
186.Nm
187is not recommended.
188If it is necessary to do so, use
189.Nm svcadm
190to enable or disable the nfs service
191.Pq svc:/network/nfs/server .
192If it is disabled, it will be enabled by
193.Xr share_nfs 8 ,
194unless its
195.Sy application Ns / Ns Sy auto_enable
196property is set to
197.Sy false .
198See
199.Xr smf 7
200and
201.Xr svcadm 8
202for more information.
203.Pp
204The
205.Nm
206service is managed by the service management facility,
207.Xr smf 7 ,
208under the service identifier:
209.Bd -literal -offset indent
210svc:/network/nfs/server
211.Ed
212.Pp
213Administrative actions on this service, such as enabling, disabling, or
214requesting restart, can be performed using
215.Xr svcadm 8 .
216The service's status can be queried using the
217.Xr svcs 1
218command.
219.Pp
220If
221.Nm
222is killed with
223.Sy SIGTERM ,
224it will not be restarted by the service management facility.
225Instead,
226.Nm
227can be restarted by other signals, such as
228.Sy SIGINT .
229.Pp
230NFS service, which includes
231.Nm ,
232can run inside a non-global zone.
233See the discussion under ZONES in
234.Xr nfs 5
235for more information.
236