Debian Codegraph @

upstream/opensuse-tumbleweed/man8/nfsdctl.8

raw
1 '\" t
2 .\" Title: nfsdctl
3 .\" Author: Jeff Layton
4 .\" Generator: Asciidoctor 2.0.20
5 .\" Date: 2026-01-12
6 .\" Manual: \ \&
7 .\" Source: \ \&
8 .\" Language: English
9 .\"
10 .TH "NFSDCTL" "8" "2026-01-12" "\ \&" "\ \&"
11 .ie \n(.g .ds Aq \(aq
12 .el .ds Aq '
13 .ss \n[.ss] 0
14 .nh
15 .ad l
16 .de URL
17 \fI\\$2\fP <\\$1>\\$3
18 ..
19 .als MTO URL
20 .if \n[.g] \{\
21 . mso www.tmac
22 . am URL
23 . ad l
24 . .
25 . am MTO
26 . ad l
27 . .
28 . LINKSTYLE blue R < >
29 .\}
30 .SH "NAME"
31 nfsdctl \- control program for the Linux kernel NFS server
32 .SH "SYNOPSIS"
33 .sp
34 \fBnfsdctl\fP [ \fIOPTION\fP ] COMMAND ...
35 .SH "DESCRIPTION"
36 .sp
37 nfsdctl is a control and query program for the in\-kernel NFS server. There are several
38 subcommands (documented below) that allow the admin to configure or query different
39 aspects of the NFS server.
40 .sp
41 To get information about different subcommand usage, pass the subcommand the
42 \-\-help parameter. For example:
43 .sp
44 .if n .RS 4
45 .nf
46 .fam C
47 nfsdctl listener \-\-help
48 .fam
49 .fi
50 .if n .RE
51 .SH "OPTIONS"
52 .sp
53 \fB\-d, \-\-debug\fP
54 .RS 4
55 Enable debug logging
56 .RE
57 .sp
58 \fB\-h, \-\-help\fP
59 .RS 4
60 Print program help text
61 .RE
62 .sp
63 \fB\-s, \-\-syslog\fP
64 .RS 4
65 Log to syslog instead of to stderr (the default)
66 .RE
67 .sp
68 \fB\-V, \-\-version\fP
69 .RS 4
70 Print program version
71 .RE
72 .SH "SUBCOMMANDS"
73 .sp
74 Each subcommand can also accept its own set of options and arguments. The
75 \-\-help option is standard for all subcommands:
76 .sp
77 \fBautostart\fP
78 .RS 4
79 Start the server using the settings in the [nfsd] section of /etc/nfs.conf.
80 This subcommand takes no arguments. Note that if a "threads=" value is not set in
81 nfs.conf, 16 server threads will be brought online.
82 .RE
83 .sp
84 \fBlistener\fP
85 .RS 4
86 Get/set the listening sockets for the server. Run this without arguments to
87 get a list of the sockets on which the server is currently listening. To add
88 or remove sockets, pass it whitespace\-separated strings in the format:
89 .sp
90 .if n .RS 4
91 .nf
92 .fam C
93 { +|\- }{ protocol }:{ address }:{ port }
94 .fam
95 .fi
96 .if n .RE
97 .sp
98 .if n .RS 4
99 .nf
100 .fam C
101 The fields are:
102 .fam
103 .fi
104 .if n .RE
105 .sp
106 .if n .RS 4
107 .nf
108 .fam C
109 + to add a listener, \- to remove one
110 protocol: protocol name (e.g. tcp, udp, rdma)
111 address: hostname or address
112 port: port number or service name
113 .fam
114 .fi
115 .if n .RE
116 .sp
117 .if n .RS 4
118 .nf
119 .fam C
120 All fields are required, except for the address. If address is an empty string,
121 then the listeners will be opened for INADDR_ANY and IN6ADDR_ANY_INIT for ipv6
122 (if enabled). The address can be either a hostname or an IP address. IPv4
123 addresses must be in dotted\-quad form. IPv6 addresses should be in standard
124 colon separated form, and must be enclosed in square brackets.
125 .fam
126 .fi
127 .if n .RE
128 .RE
129 .sp
130 \fBnlm\fP
131 .RS 4
132 Get information about NLM (lockd) settings in the current net namespace. This
133 subcommand takes no arguments.
134 .RE
135 .sp
136 \fBstatus\fP
137 .RS 4
138 Get information about RPCs currently executing in the server. This subcommand
139 takes no arguments.
140 .RE
141 .sp
142 \fBthreads\fP
143 .RS 4
144 Get/set the number of running nfsd threads in each pool. Pass a list of
145 integers to change the currently active number of threads. Passing it a
146 value of 0 will shut down the NFS server. Run this without arguments to
147 get the current number of running threads in each pool.
148 .RE
149 .sp
150 .if n .RS 4
151 .nf
152 .fam C
153 These options are specific to the "threads" subcommand:
154
155 \-m, \-\-min\-threads=
156 If set to a positive, non\-zero value, then dynamic threading is enabled for
157 nfsd. In this mode, the traditional "threads" values are treated as a maximum
158 number of threads. This specifies the minimum number of threads per pool. The
159 kernel will start the minimum number and dynamically start and stop threads as
160 needed. If the minimum is larger than the maximum, then dynamic threadis is
161 disabled, and the maximum number is started.
162 .fam
163 .fi
164 .if n .RE
165 .sp
166 \fBversion\fP
167 .RS 4
168 Get/set the enabled NFS versions for the server. Run without arguments to
169 get a list of supported versions and whether they are currently enabled or
170 disabled. To enable or disable a version, pass it a string in the format:
171 .sp
172 .if n .RS 4
173 .nf
174 .fam C
175 { +|\- }{ MAJOR }{.{ MINOR }}
176 .fam
177 .fi
178 .if n .RE
179 .sp
180 .if n .RS 4
181 .nf
182 .fam C
183 The fields are:
184 .fam
185 .fi
186 .if n .RE
187 .sp
188 .if n .RS 4
189 .nf
190 .fam C
191 + to enable a version, \- to disable
192 MAJOR: the major version integer value
193 MINOR: the minor version integer value
194 .fam
195 .fi
196 .if n .RE
197 .sp
198 .if n .RS 4
199 .nf
200 .fam C
201 The minorversion field is optional. If not given, it will disable or enable
202 all minorversions for that major version.
203 .fam
204 .fi
205 .if n .RE
206 .sp
207 .if n .RS 4
208 .nf
209 .fam C
210 Note that versions can only be set when there are no nfsd threads running.
211 .fam
212 .fi
213 .if n .RE
214 .RE
215 .sp
216 \fBpool\-mode\fP
217 .RS 4
218 Get/set the host\(cqs pool mode. This will cause the server to start threads
219 that are pinned to either the CPU or the NUMA node. This can only be set
220 when there are no nfsd threads running.
221 .sp
222 .if n .RS 4
223 .nf
224 .fam C
225 The available options are:
226 global: single large pool
227 percpu: pool per CPU
228 pernode: pool per NUMA node
229 auto: choose a mode based on host configuration
230 .fam
231 .fi
232 .if n .RE
233 .RE
234 .SH "EXAMPLES"
235 .sp
236 Start the server with the settings in nfs.conf:
237 .sp
238 .if n .RS 4
239 .nf
240 .fam C
241 nfsdctl autostart
242 .fam
243 .fi
244 .if n .RE
245 .sp
246 Get a list of current listening sockets:
247 .sp
248 .if n .RS 4
249 .nf
250 .fam C
251 nfsdctl listener
252 .fam
253 .fi
254 .if n .RE
255 .sp
256 Show the supported and enabled NFS versions:
257 .sp
258 .if n .RS 4
259 .nf
260 .fam C
261 nfsdctl version
262 .fam
263 .fi
264 .if n .RE
265 .sp
266 Add TCP listener on all addresses (both v4 and v6), port 2049:
267 .sp
268 .if n .RS 4
269 .nf
270 .fam C
271 nfsdctl listener +tcp::2049
272 .fam
273 .fi
274 .if n .RE
275 .sp
276 Add RDMA listener on 1.2.3.4 port 20049:
277 .sp
278 .if n .RS 4
279 .nf
280 .fam C
281 nfsdctl listener +rdma:1.2.3.4:20049
282 .fam
283 .fi
284 .if n .RE
285 .sp
286 Add same listener on IPv6 address f00::ba4 port 20050:
287 .sp
288 .if n .RS 4
289 .nf
290 .fam C
291 nfsdctl listener +rdma:[f00::ba4]:20050
292 .fam
293 .fi
294 .if n .RE
295 .sp
296 Enable NFS version 3, disable v4.0:
297 .sp
298 .if n .RS 4
299 .nf
300 .fam C
301 nfsdctl version +3 \-4.0
302 .fam
303 .fi
304 .if n .RE
305 .sp
306 Change the number of running threads in first pool to 256:
307 .sp
308 .if n .RS 4
309 .nf
310 .fam C
311 nfsdctl threads 256
312 .fam
313 .fi
314 .if n .RE
315 .sp
316 Set the pool\-mode to "pernode":
317 .sp
318 .if n .RS 4
319 .nf
320 .fam C
321 nfsdctl pool\-mode pernode
322 .fam
323 .fi
324 .if n .RE
325 .SH "NOTES"
326 .sp
327 nfsdctl is intended to supersede rpc.nfsd(8), which controls the nfs server
328 using the files under /proc/fs/nfsd. nfsdctl instead uses a netlink(7)
329 interface to achieve the same goals.
330 .sp
331 Most of the commands that query the NFS server can be run as an unprivileged
332 user, but configuring the server typically requires an account with elevated
333 privileges.
334 .SH "SEE ALSO"
335 .sp
336 nfs.conf(5), rpc.nfsd(8), rpc.mountd(8), exports(5), exportfs(8), rpc.rquotad(8), nfsstat(8), netconfig(5)
337 .SH "AUTHOR"
338 .sp
339 Jeff Layton