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
|
.\"
.\" 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]
.\"
.\"
.\" Copyright 1989 AT&T
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2016 Nexenta Systems, Inc.
.\" Copyright 2020 Joyent, Inc.
.\"
.Dd February 4, 2020
.Dt NFSD 8
.Os
.Sh NAME
.Nm nfsd
.Nd NFS daemon
.Sh SYNOPSIS
.Nm /usr/lib/nfs/nfsd
.Op Fl a
.Op Fl c Ar max_conn
.Op Fl l Ar listen_backlog
.Op Fl p Ar protocol
.Op Fl t Ar device
.Op Ar nservers
.Sh DESCRIPTION
.Nm
is the daemon that handles client file system requests.
Only users with
.Brq Sy PRIV_SYS_NFS
and sufficient privileges to write to
.Pa /var/run
can run this daemon.
.Pp
The
.Nm
daemon is automatically invoked using
.Xr share 8
with the
.Fl a
option.
.Pp
By default,
.Nm
starts over the TCP and UDP transports for versions 2 and 3.
By default, it starts over the TCP for version 4.
You can change this with the
.Fl p
option.
.Pp
A previously invoked
.Nm
daemon started with or without options must be stopped before invoking another
.Nm
command.
.Pp
See
.Xr nfs 5
for available configuration properties for
.Nm .
.Ss Options
The following options are supported:
.Bl -tag -width Ds
.It Fl a
Start a NFS daemon over all available connectionless and connection-oriented
transports, including UDP and TCP.
Equivalent of setting the
.Sy protocol
property to
.Sy all .
.It Fl c Ar max_conn
Set the maximum number of connections allowed to the NFS server over
connection-oriented transports.
By default, the number of connections is unlimited.
Equivalent of the
.Sy max_connections
property.
.It Fl l
Set connection queue length for the NFS server over a connection-oriented
transport.
The default value is 32 entries.
Equivalent of the
.Sy listen_backlog
property.
.It Fl p Ar protocol
Start a NFS daemon over the specified protocol.
Equivalent of the
.Sy protocol
property.
.It Fl t Ar device
Start a NFS daemon for the transport specified by the given device.
Equivalent of the
.Sy device
property.
.El
.Ss Operands
The following operands are supported:
.Bl -tag -width Ds
.It Ar nservers
This sets the maximum number of concurrent NFS requests that the server can
handle.
This concurrency is achieved by up to
.Ar nservers
threads created as needed in the kernel.
.Ar nservers
should be based on the load expected on this server.
16 is the usual number of
.Ar nservers .
If
.Ar nservers
is not specified, the maximum number of concurrent NFS requests will default to
1.
Equivalent of the
.Sy servers
property.
.El
.Ss Usage
If the
.Sy nfs_portmon
variable is set to non-zero value in
.Pa /etc/system ,
then clients are required to use privileged ports
.Po ports <
.Dv IPPORT_RESERVED
.Pc
to get NFS services.
This variable is equal to zero by default.
This variable has been moved from the
.Qq nfs
module to the
.Qq nfssrv
module.
To set the variable, edit the
.Pa /etc/system
file and add this entry:
.Bd -literal -offset indent
set nfssrv:nfs_portmon = 1
.Ed
.Sh FILES
.Bl -tag -width Ds
.It Pa \&.nfsXXX
Client machine pointer to an open-but-unlinked file.
.It Pa /etc/system
System configuration information file.
.It Xo
.Pa /var/nfs/v4_state
.br
.Pa /var/nfs/v4_oldstate
.Xc
Directories used by the server to manage client state information.
These directories should not be removed.
.El
.Sh EXIT STATUS
.Bl -tag -width Ds
.It Sy 0
Daemon started successfully.
.It Sy 1
Daemon failed to start.
.El
.Sh SEE ALSO
.Xr svcs 1 ,
.Xr nfs 5 ,
.Xr sharetab 5 ,
.Xr system 5 ,
.Xr attributes 7 ,
.Xr smf 7 ,
.Xr zones 7 ,
.Xr mountd 8 ,
.Xr share 8 ,
.Xr sharectl 8 ,
.Xr sharemgr 8 ,
.Xr svcadm 8
.Sh NOTES
Manually starting and restarting
.Nm
is not recommended.
If it is necessary to do so, use
.Nm svcadm
to enable or disable the nfs service
.Pq svc:/network/nfs/server .
If it is disabled, it will be enabled by
.Xr share_nfs 8 ,
unless its
.Sy application Ns / Ns Sy auto_enable
property is set to
.Sy false .
See
.Xr smf 7
and
.Xr svcadm 8
for more information.
.Pp
The
.Nm
service is managed by the service management facility,
.Xr smf 7 ,
under the service identifier:
.Bd -literal -offset indent
svc:/network/nfs/server
.Ed
.Pp
Administrative actions on this service, such as enabling, disabling, or
requesting restart, can be performed using
.Xr svcadm 8 .
The service's status can be queried using the
.Xr svcs 1
command.
.Pp
If
.Nm
is killed with
.Sy SIGTERM ,
it will not be restarted by the service management facility.
Instead,
.Nm
can be restarted by other signals, such as
.Sy SIGINT .
.Pp
NFS service, which includes
.Nm ,
can run inside a non-global zone.
See the discussion under ZONES in
.Xr nfs 5
for more information.
|