Debian Codegraph @

upstream/debian-trixie/man8/nfsdctl.8

raw
1 '\" t
2 .\" Title: nfsdctl
3 .\" Author: Jeff Layton
4 .\" Generator: Asciidoctor 2.0.20
5 .\" Date: 2025-01-09
6 .\" Manual: \ \&
7 .\" Source: \ \&
8 .\" Language: English
9 .\"
10 .TH "NFSDCTL" "8" "2025-01-09" "\ \&" "\ \&"
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 \fBversion\fP
151 .RS 4
152 Get/set the enabled NFS versions for the server. Run without arguments to
153 get a list of supported versions and whether they are currently enabled or
154 disabled. To enable or disable a version, pass it a string in the format:
155 .sp
156 .if n .RS 4
157 .nf
158 .fam C
159 { +|\- }{ MAJOR }{.{ MINOR }}
160 .fam
161 .fi
162 .if n .RE
163 .sp
164 .if n .RS 4
165 .nf
166 .fam C
167 The fields are:
168 .fam
169 .fi
170 .if n .RE
171 .sp
172 .if n .RS 4
173 .nf
174 .fam C
175 + to enable a version, \- to disable
176 MAJOR: the major version integer value
177 MINOR: the minor version integer value
178 .fam
179 .fi
180 .if n .RE
181 .sp
182 .if n .RS 4
183 .nf
184 .fam C
185 The minorversion field is optional. If not given, it will disable or enable
186 all minorversions for that major version.
187 .fam
188 .fi
189 .if n .RE
190 .sp
191 .if n .RS 4
192 .nf
193 .fam C
194 Note that versions can only be set when there are no nfsd threads running.
195 .fam
196 .fi
197 .if n .RE
198 .RE
199 .sp
200 \fBpool\-mode\fP
201 .RS 4
202 Get/set the host\(cqs pool mode. This will cause the server to start threads
203 that are pinned to either the CPU or the NUMA node. This can only be set
204 when there are no nfsd threads running.
205 .sp
206 .if n .RS 4
207 .nf
208 .fam C
209 The available options are:
210 global: single large pool
211 percpu: pool per CPU
212 pernode: pool per NUMA node
213 auto: choose a mode based on host configuration
214 .fam
215 .fi
216 .if n .RE
217 .RE
218 .SH "EXAMPLES"
219 .sp
220 Start the server with the settings in nfs.conf:
221 .sp
222 .if n .RS 4
223 .nf
224 .fam C
225 nfsdctl autostart
226 .fam
227 .fi
228 .if n .RE
229 .sp
230 Get a list of current listening sockets:
231 .sp
232 .if n .RS 4
233 .nf
234 .fam C
235 nfsdctl listener
236 .fam
237 .fi
238 .if n .RE
239 .sp
240 Show the supported and enabled NFS versions:
241 .sp
242 .if n .RS 4
243 .nf
244 .fam C
245 nfsdctl version
246 .fam
247 .fi
248 .if n .RE
249 .sp
250 Add TCP listener on all addresses (both v4 and v6), port 2049:
251 .sp
252 .if n .RS 4
253 .nf
254 .fam C
255 nfsdctl listener +tcp::2049
256 .fam
257 .fi
258 .if n .RE
259 .sp
260 Add RDMA listener on 1.2.3.4 port 20049:
261 .sp
262 .if n .RS 4
263 .nf
264 .fam C
265 nfsdctl listener +rdma:1.2.3.4:20049
266 .fam
267 .fi
268 .if n .RE
269 .sp
270 Add same listener on IPv6 address f00::ba4 port 20050:
271 .sp
272 .if n .RS 4
273 .nf
274 .fam C
275 nfsdctl listener +rdma:[f00::ba4]:20050
276 .fam
277 .fi
278 .if n .RE
279 .sp
280 Enable NFS version 3, disable v4.0:
281 .sp
282 .if n .RS 4
283 .nf
284 .fam C
285 nfsdctl version +3 \-4.0
286 .fam
287 .fi
288 .if n .RE
289 .sp
290 Change the number of running threads in first pool to 256:
291 .sp
292 .if n .RS 4
293 .nf
294 .fam C
295 nfsdctl threads 256
296 .fam
297 .fi
298 .if n .RE
299 .sp
300 Set the pool\-mode to "pernode":
301 .sp
302 .if n .RS 4
303 .nf
304 .fam C
305 nfsdctl pool\-mode pernode
306 .fam
307 .fi
308 .if n .RE
309 .SH "NOTES"
310 .sp
311 nfsdctl is intended to supersede rpc.nfsd(8), which controls the nfs server
312 using the files under /proc/fs/nfsd. nfsdctl instead uses a netlink(7)
313 interface to achieve the same goals.
314 .sp
315 Most of the commands that query the NFS server can be run as an unprivileged
316 user, but configuring the server typically requires an account with elevated
317 privileges.
318 .SH "SEE ALSO"
319 .sp
320 nfs.conf(5), rpc.nfsd(8), rpc.mountd(8), exports(5), exportfs(8), rpc.rquotad(8), nfsstat(8), netconfig(5)
321 .SH "AUTHOR"
322 .sp
323 Jeff Layton