1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdbd.conf</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ctdbd.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdbd.conf — CTDB daemon configuration file</p></div><div class="refsect1"><a name="idm10"></a><h2>DESCRIPTION</h2><p>
2 This file contains CTDB configuration variables that are affect
3 the operation of CTDB. The default location of this file is
4 <code class="filename">/usr/local/etc/ctdb/ctdbd.conf</code>.
6 This file is a shell script (see
7 <span class="citerefentry"><span class="refentrytitle">sh</span>(1)</span>) but is usually limited
8 to simple variable assignments and shell-style comments.
10 CTDB configuration variables are grouped into several categories below.
12 Variables defined in this document can also be set in a
13 distribution-specific configuration file such as
14 <code class="filename">/etc/sysconfig/ctdb</code> (Red Hat) or
15 <code class="filename">/etc/default/ctdb</code> (Debian). However, these
16 files should be reserved for variables used by the initscript.
17 A historical alternative is
18 <code class="filename">/usr/local/etc/ctdb/sysconfig/ctdb</code> - this is
20 </p></div><div class="refsect1"><a name="idm23"></a><h2>
21 INITSCRIPT CONFIGURATION
23 Some options must be available to the initscript so they need to
24 be set in the distribution-specific initscript configuration,
25 such as <code class="filename">/etc/sysconfig/ctdb</code> or
26 <code class="filename">/etc/default/ctdb</code>.
27 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_PIDFILE=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
28 FILENAME is the name of the file used to contain the
29 process ID (PID) of the main CTDB daemon when it is
30 running. This is passed from the initscript to
31 <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span>.
33 Default is <code class="filename">/usr/local/var/run/ctdb/ctdbd.pid</code>.
34 Corresponds to <code class="option">--pidfile</code>.
35 </p></dd></dl></div></div><div class="refsect1"><a name="idm40"></a><h2>
38 These options may be used in the initscripts, daemon and
40 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_BASE=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
41 DIRECTORY containing CTDB scripts and configuration files.
42 </p></dd></dl></div></div><div class="refsect1"><a name="idm49"></a><h2>
45 Variables in this section are processed by
46 <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span> and are converted into
47 command-line arguments to
48 <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>. Correspondence with
49 <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> options is shown for
50 each variable. The the documentation for the relevant options
53 Many of these variables are also used by event scripts.
54 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_CAPABILITY_LMASTER=yes|no</span></dt><dd><p>
55 Defaults to yes. Corresponds to <code class="option">--no-lmaster</code>.
56 </p></dd><dt><span class="term">CTDB_CAPABILITY_RECMASTER=yes|no</span></dt><dd><p>
57 Defaults to yes. Corresponds to
58 <code class="option">--no-recmaster</code>.
59 </p></dd><dt><span class="term">CTDB_DBDIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
60 Defaults to <code class="filename">/usr/local/var/lib/ctdb</code>.
62 Apart from a DIRECTORY, this can take a special value of
64 <code class="option">tmpfs</code>[<span class="optional">:<em class="parameter"><code>OPTIONS</code></em></span>].
65 OPTIONS is a comma-separated list of any permissible
66 options to the tmpfs filesystem. The only pre-specified
67 default is <code class="option">mode=700</code>, which can
68 overriden by specifying <code class="option">mode</code> in
69 OPTIONS. It probably makes sense to specify a maximum
70 <code class="option">size</code>.
72 Corresponds to <code class="option">--dbdir</code>.
73 </p></dd><dt><span class="term">CTDB_DBDIR_PERSISTENT=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
74 Defaults to <code class="filename">/usr/local/var/lib/ctdb/persistent</code>.
76 Corresponds to <code class="option">--dbdir-persistent</code>.
77 </p></dd><dt><span class="term">CTDB_DBDIR_STATE=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
78 Defaults to <code class="filename">/usr/local/var/lib/ctdb/state</code>.
80 Corresponds to <code class="option">--dbdir-state</code>.
81 </p></dd><dt><span class="term">CTDB_DEBUGLEVEL=<em class="parameter"><code>DEBUGLEVEL</code></em></span></dt><dd><p>
82 Default is NOTICE (2). Corresponds to <code class="option">-d</code> or
83 <code class="option">--debug</code>.
84 </p></dd><dt><span class="term">CTDB_EVENT_SCRIPT_DIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
85 Default is <code class="varname">CTDB_BASE</code>/events.d, so usually
86 <code class="filename">/usr/local/etc/ctdb/events.d</code>. Corresponds to
87 <code class="option">--event-script-dir</code>.
88 </p></dd><dt><span class="term">CTDB_LOGGING=<em class="parameter"><code>STRING</code></em></span></dt><dd><p>
89 STRING specifies where ctdbd will write its log. The
91 file:<code class="filename">/usr/local/var/log/log.ctdb</code>.
92 Corresponds to <code class="option">--logging</code>.
95 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">file:<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
96 FILENAME where ctdbd will write its log. This is usually
97 <code class="filename">/usr/local/var/log/log.ctdb</code>.
98 </p></dd><dt><span class="term">syslog[<span class="optional">:<em class="parameter"><code>METHOD</code></em></span>]</span></dt><dd><p>
99 CTDB will log to syslog. By default this will use
102 If METHOD is specified then it specifies an
103 extension that causes logging to be done in a
104 non-blocking fashion. This can be useful under
105 heavy loads that might cause the syslog daemon to
106 dequeue messages too slowly, which would otherwise
107 cause CTDB to block when logging. METHOD must be
109 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">nonblocking</span></dt><dd><p>
110 CTDB will log to syslog via
111 <code class="filename">/dev/log</code> in non-blocking
113 </p></dd><dt><span class="term">udp</span></dt><dd><p>
114 CTDB will log to syslog via UDP to
115 localhost:514. The syslog daemon must be
116 configured to listen on (at least)
117 localhost:514. Most implementations will log
118 the messages against hostname "localhost" -
119 this is a limit of the implementation for
120 compatibility with more syslog daemon
122 </p></dd><dt><span class="term">udp-rfc5424</span></dt><dd><p>
123 As with "udp" but messages are sent in RFC5424
124 format. This method will log the correct
125 hostname but is not as widely implemented in
127 </p></dd></dl></div></dd></dl></div></dd><dt><span class="term">CTDB_NODES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
128 Default is <code class="varname">CTDB_BASE</code>/nodes, so usually
129 <code class="filename">/usr/local/etc/ctdb/nodes</code>. Corresponds to
130 <code class="option">--nlist</code>.
131 </p></dd><dt><span class="term">CTDB_NOSETSCHED=yes|no</span></dt><dd><p>
132 Defaults to no. Corresponds to <code class="option">--nosetsched</code>.
134 Usually CTDB runs with real-time priority. If you are running
135 CTDB on a platform that does not support real-time priority,
137 </p></dd><dt><span class="term">CTDB_NOTIFY_SCRIPT=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
139 <code class="filename">/usr/local/etc/ctdb/notify.sh</code>. Corresponds to
140 <code class="option">--notification-script</code>.
141 </p></dd><dt><span class="term">CTDB_MAX_PERSISTENT_CHECK_ERRORS=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
142 Default 0. Corresponds to
143 <code class="option">--max-persistent-check-errors</code>.
144 </p></dd><dt><span class="term">CTDB_NODE_ADDRESS=<em class="parameter"><code>IPADDR</code></em></span></dt><dd><p>
145 IPADDR is the private IP address that ctdbd will bind to.
146 Corresponds to <code class="option">--listen</code>.
148 By default ctdbd will select the first address from the
149 nodes list that in can bind to. See also
150 <em class="citetitle">CTDB_NODES</em>.
152 This option is only required when automatic address
153 detection can not be used. This can be the case when
154 running multiple ctdbd daemons/nodes on the same physical
155 host (usually for testing), using InfiniBand for the
156 private network or on Linux when sysctl
157 net.ipv4.ip_nonlocal_bind=1.
158 </p></dd><dt><span class="term">CTDB_PUBLIC_ADDRESSES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
160 <code class="filename">/usr/local/etc/ctdb/public_addresses</code>.
161 Corresponds to <code class="option">--public-addresses</code>.
162 </p></dd><dt><span class="term">CTDB_PUBLIC_INTERFACE=<em class="parameter"><code>INTERFACE</code></em></span></dt><dd><p>
163 No default. Corresponds to
164 <code class="option">--public-interface</code>.
165 </p></dd><dt><span class="term">CTDB_RECOVERY_LOCK=<em class="parameter"><code>LOCK</code></em></span></dt><dd><p>
166 LOCK specifies the cluster-wide mutex used to detect and
167 prevent a partitioned cluster (or "split brain").
169 No default, but the default configuration file specifies
170 <code class="filename">/some/place/on/shared/storage</code>, which
171 should be change to a useful value. Corresponds to
172 <code class="option">--reclock</code>.
174 For information about the recovery lock please see the
175 <em class="citetitle">RECOVERY LOCK</em> section in
176 <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
177 </p></dd><dt><span class="term">CTDB_SCRIPT_LOG_LEVEL=<em class="parameter"><code>DEBUGLEVEL</code></em></span></dt><dd><p>
178 Defaults to ERR (0). Corresponds to
179 <code class="option">--script-log-level</code>.
180 </p></dd><dt><span class="term">CTDB_SOCKET=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
181 Defaults to <code class="filename">/usr/local/var/run/ctdb/ctdbd.socket</code>.
182 Corresponds to <code class="option">--socket</code>.
184 If you change this then you probably want to set this in
185 root's environment (perhaps in a file in
186 <code class="filename">/etc/profile.d</code>) so that you can use
187 the <span class="citerefentry"><span class="refentrytitle">ctdb</span>(1)</span> command in a
188 straightforward manner.
189 </p></dd><dt><span class="term">CTDB_START_AS_DISABLED=yes|no</span></dt><dd><p>
190 Default is no. Corresponds to
191 <code class="option">--start-as-disabled</code>.
192 </p></dd><dt><span class="term">CTDB_START_AS_STOPPED=yes|no</span></dt><dd><p>
193 Default is no. Corresponds to
194 <code class="option">--start-as-stopped</code>.
195 </p></dd><dt><span class="term">CTDB_TRANSPORT=tcp|infiniband</span></dt><dd><p>
196 Defaults to tcp. Corresponds to
197 <code class="option">--transport</code>.
198 </p></dd></dl></div><p>
199 While the following variables do not translate into daemon
200 options they are used by
201 <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span> when starting and
202 stopping <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>.
203 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_SHUTDOWN_TIMEOUT=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
204 NUM is the number of seconds to wait for
205 <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> to shut down
206 gracefully before giving up and killing it.
209 </p></dd><dt><span class="term">CTDB_STARTUP_TIMEOUT=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
210 NUM is the number of seconds to wait for
211 <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> complete early
212 initialisation up to a point where it is unlikely to
213 abort. If <span class="command"><strong>ctdbd</strong></span> doesn't complete the
214 "setup" event before this timeout then it is killed.
217 </p></dd></dl></div></div><div class="refsect1"><a name="idm277"></a><h2>NETWORK CONFIGURATION</h2><div class="refsect2"><a name="idm279"></a><h3>NAT GATEWAY</h3><p>
218 NAT gateway is used to configure fallback routing for nodes
219 when they do not host any public IP addresses. For example,
220 it allows unhealthy nodes to reliably communicate with
221 external infrastructure. One node in a NAT gateway group will
222 be designated as the NAT gateway master node and other (slave)
223 nodes will be configured with fallback routes via the NAT
224 gateway master node. For more information, see the
225 <em class="citetitle">NAT GATEWAY</em> section in
226 <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
227 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_NATGW_DEFAULT_GATEWAY=<em class="parameter"><code>IPADDR</code></em></span></dt><dd><p>
228 IPADDR is an alternate network gateway to use on the NAT
229 gateway master node. If set, a fallback default route
230 is added via this network gateway.
232 No default. Setting this variable is optional - if not
233 set that no route is created on the NAT gateway master
235 </p></dd><dt><span class="term">CTDB_NATGW_NODES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
236 FILENAME contains the list of nodes that belong to the
237 same NAT gateway group.
240 </p><pre class="screen">
241 <em class="parameter"><code>IPADDR</code></em> [<span class="optional">slave-only</span>]
244 IPADDR is the private IP address of each node in the NAT
247 If "slave-only" is specified then the corresponding node
248 can not be the NAT gateway master node. In this case
249 <code class="varname">CTDB_NATGW_PUBLIC_IFACE</code> and
250 <code class="varname">CTDB_NATGW_PUBLIC_IP</code> are optional and
254 <code class="filename">/usr/local/etc/ctdb/natgw_nodes</code> when enabled.
255 </p></dd><dt><span class="term">CTDB_NATGW_PRIVATE_NETWORK=<em class="parameter"><code>IPADDR/MASK</code></em></span></dt><dd><p>
256 IPADDR/MASK is the private sub-network that is
257 internally routed via the NAT gateway master node. This
258 is usually the private network that is used for node
262 </p></dd><dt><span class="term">CTDB_NATGW_PUBLIC_IFACE=<em class="parameter"><code>IFACE</code></em></span></dt><dd><p>
263 IFACE is the network interface on which the
264 CTDB_NATGW_PUBLIC_IP will be configured.
267 </p></dd><dt><span class="term">CTDB_NATGW_PUBLIC_IP=<em class="parameter"><code>IPADDR/MASK</code></em></span></dt><dd><p>
268 IPADDR/MASK indicates the IP address that is used for
269 outgoing traffic (originating from
270 CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
271 node. This <span class="emphasis"><em>must not</em></span> be a
272 configured public IP address.
275 </p></dd><dt><span class="term">CTDB_NATGW_STATIC_ROUTES=<em class="parameter"><code>IPADDR/MASK[@GATEWAY]</code></em> ...</span></dt><dd><p>
276 Each IPADDR/MASK identifies a network or host to which
277 NATGW should create a fallback route, instead of
278 creating a single default route. This can be used when
279 there is already a default route, via an interface that
280 can not reach required infrastructure, that overrides
281 the NAT gateway default route.
283 If GATEWAY is specified then the corresponding route on
284 the NATGW master node will be via GATEWAY. Such routes
286 <code class="varname">CTDB_NATGW_DEFAULT_GATEWAY</code> is not
287 specified. If GATEWAY is not specified for some
288 networks then routes are only created on the NATGW
289 master node for those networks if
290 <code class="varname">CTDB_NATGW_DEFAULT_GATEWAY</code> is
293 This should be used with care to avoid causing traffic
294 to unnecessarily double-hop through the NAT gateway
295 master, even when a node is hosting public IP addresses.
296 Each specified network or host should probably have a
297 corresponding automatically created link route or static
301 </p></dd></dl></div><div class="refsect3"><a name="idm337"></a><h4>Example</h4><pre class="screen">
302 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
303 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
304 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
305 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
306 CTDB_NATGW_PUBLIC_IFACE=eth0
308 A variation that ensures that infrastructure (ADS, DNS, ...)
309 directly attached to the public network (10.0.0.0/24) is
310 always reachable would look like this:
311 </p><pre class="screen">
312 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
313 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
314 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
315 CTDB_NATGW_PUBLIC_IFACE=eth0
316 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
318 Note that <code class="varname">CTDB_NATGW_DEFAULT_GATEWAY</code> is
320 </p></div></div><div class="refsect2"><a name="idm344"></a><h3>POLICY ROUTING</h3><p>
321 A node running CTDB may be a component of a complex network
322 topology. In particular, public addresses may be spread
323 across several different networks (or VLANs) and it may not be
324 possible to route packets from these public addresses via the
325 system's default route. Therefore, CTDB has support for
326 policy routing via the <code class="filename">13.per_ip_routing</code>
327 eventscript. This allows routing to be specified for packets
328 sourced from each public address. The routes are added and
329 removed as CTDB moves public addresses between nodes.
331 For more information, see the <em class="citetitle">POLICY
332 ROUTING</em> section in
333 <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
334 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_PER_IP_ROUTING_CONF=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
335 FILENAME contains elements for constructing the desired
336 routes for each source address.
338 The special FILENAME value
339 <code class="constant">__auto_link_local__</code> indicates that no
340 configuration file is provided and that CTDB should
341 generate reasonable link-local routes for each public IP
345 </p><pre class="screen">
346 <em class="parameter"><code>IPADDR</code></em> <em class="parameter"><code>DEST-IPADDR/MASK</code></em> [<span class="optional"><em class="parameter"><code>GATEWAY-IPADDR</code></em></span>]
350 <code class="filename">/usr/local/etc/ctdb/policy_routing</code> when enabled.
351 </p></dd><dt><span class="term">CTDB_PER_IP_ROUTING_RULE_PREF=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
352 NUM sets the priority (or preference) for the routing
353 rules that are added by CTDB.
355 This should be (strictly) greater than 0 and (strictly)
356 less than 32766. A priority of 100 is recommended, unless
357 this conflicts with a priority already in use on the
359 <span class="citerefentry"><span class="refentrytitle">ip</span>(8)</span>, for more details.
360 </p></dd><dt><span class="term">
361 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<em class="parameter"><code>LOW-NUM</code></em>,
362 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<em class="parameter"><code>HIGH-NUM</code></em>
364 CTDB determines a unique routing table number to use for
365 the routing related to each public address. LOW-NUM and
366 HIGH-NUM indicate the minimum and maximum routing table
367 numbers that are used.
369 <span class="citerefentry"><span class="refentrytitle">ip</span>(8)</span> uses some
370 reserved routing table numbers below 255. Therefore,
371 CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
374 CTDB uses the standard file
375 <code class="filename">/etc/iproute2/rt_tables</code> to maintain
376 a mapping between the routing table numbers and labels.
377 The label for a public address
378 <em class="replaceable"><code>ADDR</code></em> will look like
379 ctdb.<em class="replaceable"><code>addr</code></em>. This means that
380 the associated rules and routes are easy to read (and
383 No default, usually 1000 and 9000.
384 </p></dd></dl></div><div class="refsect3"><a name="idm393"></a><h4>Example</h4><pre class="screen">
385 CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
386 CTDB_PER_IP_ROUTING_RULE_PREF=100
387 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
388 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
389 </pre></div></div><div class="refsect2"><a name="idm396"></a><h3>LVS</h3><p>
390 For a general description see the <em class="citetitle">LVS</em>
391 section in <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
392 </p><div class="refsect3"><a name="idm403"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">91.lvs</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_LVS_NODES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
393 FILENAME contains the list of nodes that belong to the
397 </p><pre class="screen">
398 <em class="parameter"><code>IPADDR</code></em> [<span class="optional">slave-only</span>]
401 IPADDR is the private IP address of each node in the LVS
404 If "slave-only" is specified then the corresponding node
405 can not be the LVS master node. In this case
406 <code class="varname">CTDB_LVS_PUBLIC_IFACE</code> and
407 <code class="varname">CTDB_LVS_PUBLIC_IP</code> are optional and
411 <code class="filename">/usr/local/etc/ctdb/lvs_nodes</code> when enabled.
412 </p></dd><dt><span class="term">CTDB_LVS_PUBLIC_IFACE=<em class="parameter"><code>INTERFACE</code></em></span></dt><dd><p>
413 INTERFACE is the network interface that clients will use
414 to connection to <code class="varname">CTDB_LVS_PUBLIC_IP</code>.
415 This is optional for slave-only nodes.
417 </p></dd><dt><span class="term">CTDB_LVS_PUBLIC_IP=<em class="parameter"><code>IPADDR</code></em></span></dt><dd><p>
418 CTDB_LVS_PUBLIC_IP is the LVS public address. No
420 </p></dd></dl></div></div><div class="refsect2"><a name="idm435"></a><h3>MISCELLANEOUS NETWORK CONFIGURATION</h3><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no</span></dt><dd><p>
421 Whether one or more offline interfaces should cause a
422 monitor event to fail if there are other interfaces that
423 are up. If this is "yes" and a node has some interfaces
424 that are down then <span class="command"><strong>ctdb status</strong></span> will
425 display the node as "PARTIALLYONLINE".
427 Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is
428 incompatible with NAT gateway, since NAT gateway relies
429 on the interface configured by CTDB_NATGW_PUBLIC_IFACE
433 </p></dd></dl></div></div></div><div class="refsect1"><a name="idm445"></a><h2>SERVICE CONFIGURATION</h2><p>
434 CTDB can be configured to manage and/or monitor various NAS (and
435 other) services via its eventscripts.
437 In the simplest case CTDB will manage a service. This means the
438 service will be started and stopped along with CTDB, CTDB will
439 monitor the service and CTDB will do any required
440 reconfiguration of the service when public IP addresses are
442 </p><div class="refsect2"><a name="idm449"></a><h3>SAMBA</h3><div class="refsect3"><a name="idm451"></a><h4>Eventscripts</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">49.winbind</code></td></tr><tr><td><code class="filename">50.samba</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_SAMBA=yes|no</span></dt><dd><p>
443 Should CTDB manage Samba?
446 </p></dd><dt><span class="term">CTDB_MANAGES_WINBIND=yes|no</span></dt><dd><p>
447 Should CTDB manage Winbind?
450 </p></dd><dt><span class="term">CTDB_SAMBA_CHECK_PORTS=<em class="parameter"><code>PORT-LIST</code></em></span></dt><dd><p>
451 When monitoring Samba, check TCP ports in
452 space-separated PORT-LIST.
454 Default is to monitor ports that Samba is configured to listen on.
455 </p></dd><dt><span class="term">CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no</span></dt><dd><p>
456 As part of monitoring, should CTDB skip the check for
457 the existence of each directory configured as share in
458 Samba. This may be desirable if there is a large number
462 </p></dd><dt><span class="term">CTDB_SERVICE_NMB=<em class="parameter"><code>SERVICE</code></em></span></dt><dd><p>
463 Distribution specific SERVICE for managing nmbd.
465 Default is distribution-dependant.
466 </p></dd><dt><span class="term">CTDB_SERVICE_SMB=<em class="parameter"><code>SERVICE</code></em></span></dt><dd><p>
467 Distribution specific SERVICE for managing smbd.
469 Default is distribution-dependant.
470 </p></dd><dt><span class="term">CTDB_SERVICE_WINBIND=<em class="parameter"><code>SERVICE</code></em></span></dt><dd><p>
471 Distribution specific SERVICE for managing winbindd.
473 Default is "winbind".
474 </p></dd></dl></div></div><div class="refsect2"><a name="idm498"></a><h3>NFS</h3><p>
475 This includes parameters for the kernel NFS server.
476 Alternative NFS subsystems (such as <a class="ulink" href="https://github.com/nfs-ganesha/nfs-ganesha/wiki" target="_top">NFS-Ganesha</a>)
477 can be integrated using <code class="varname">CTDB_NFS_CALLOUT</code>.
478 </p><div class="refsect3"><a name="idm503"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">60.nfs</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_NFS=yes|no</span></dt><dd><p>
479 Should CTDB manage NFS?
482 </p></dd><dt><span class="term">CTDB_NFS_CALLOUT=<em class="parameter"><code>COMMAND</code></em></span></dt><dd><p>
483 COMMAND specifies the path to a callout to handle
484 interactions with the configured NFS system, including
485 startup, shutdown, monitoring.
487 Default is the included
488 <span class="command"><strong>nfs-linux-kernel-callout</strong></span>.
489 </p></dd><dt><span class="term">CTDB_NFS_SKIP_SHARE_CHECK=yes|no</span></dt><dd><p>
490 As part of monitoring, should CTDB skip the check for
491 the existence of each directory exported via NFS. This
492 may be desirable if there is a large number of exports.
495 </p></dd><dt><span class="term">CTDB_RPCINFO_LOCALHOST=<em class="parameter"><code>IPADDR</code></em>|<em class="parameter"><code>HOSTNAME</code></em></span></dt><dd><p>
496 IPADDR or HOSTNAME indicates the address that
497 <span class="command"><strong>rpcinfo</strong></span> should connect to when doing
498 <span class="command"><strong>rpcinfo</strong></span> check on IPv4 RPC service during
499 monitoring. Optimally this would be "localhost".
500 However, this can add some performance overheads.
502 Default is "127.0.0.1".
503 </p></dd><dt><span class="term">CTDB_RPCINFO_LOCALHOST6=<em class="parameter"><code>IPADDR</code></em>|<em class="parameter"><code>HOSTNAME</code></em></span></dt><dd><p>
504 IPADDR or HOSTNAME indicates the address that
505 <span class="command"><strong>rpcinfo</strong></span> should connect to when doing
506 <span class="command"><strong>rpcinfo</strong></span> check on IPv6 RPC service
507 during monitoring. Optimally this would be "localhost6"
508 (or similar). However, this can add some performance
512 </p></dd><dt><span class="term">CTDB_NFS_STATE_FS_TYPE=<em class="parameter"><code>TYPE</code></em></span></dt><dd><p>
513 The type of filesystem used for a clustered NFS' shared
515 </p></dd><dt><span class="term">CTDB_NFS_STATE_MNT=<em class="parameter"><code>DIR</code></em></span></dt><dd><p>
516 The directory where a clustered NFS' shared state will be
518 </p></dd></dl></div></div><div class="refsect2"><a name="idm554"></a><h3>APACHE HTTPD</h3><p>
519 CTDB can manage the Apache web server.
520 </p><div class="refsect3"><a name="idm557"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">41.httpd</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_HTTPD=yes|no</span></dt><dd><p>
521 Should CTDB manage the Apache web server?
524 </p></dd></dl></div></div><div class="refsect2"><a name="idm568"></a><h3>CLAMAV</h3><p>
525 CTDB has support to manage the popular anti-virus daemon
527 </p><div class="refsect3"><a name="idm571"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">31.clamd</code></td></tr></table><p>
528 This eventscript is not enabled by default. Use
529 <span class="command"><strong>ctdb enablescript</strong></span> to enable it.
530 </p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_CLAMD=yes|no</span></dt><dd><p>
531 Should CTDB manage ClamAV?
534 </p></dd><dt><span class="term">CTDB_CLAMD_SOCKET=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
535 FILENAME is the socket to monitor ClamAV.
538 </p></dd></dl></div></div><div class="refsect2"><a name="idm590"></a><h3>ISCSI</h3><p>
539 CTDB has support for managing the Linux iSCSI tgtd service.
540 </p><div class="refsect3"><a name="idm593"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">70.iscsi</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_ISCSI=yes|no</span></dt><dd><p>
541 Should CTDB manage iSCSI tgtd?
544 </p></dd><dt><span class="term">CTDB_START_ISCSI_SCRIPTS=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
545 DIRECTORY on shared storage containing scripts to start
546 tgtd for each public IP address.
549 </p></dd></dl></div></div><div class="refsect2"><a name="idm610"></a><h3>MULTIPATHD</h3><p>
550 CTDB can monitor multipath devices to ensure that active paths
552 </p><div class="refsect3"><a name="idm613"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">20.multipathd</code></td></tr></table><p>
553 This eventscript is not enabled by default. Use
554 <span class="command"><strong>ctdb enablescript</strong></span> to enable it.
555 </p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MONITOR_MPDEVICES=<em class="parameter"><code>MP-DEVICE-LIST</code></em></span></dt><dd><p>
556 MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
559 </p></dd></dl></div></div><div class="refsect2"><a name="idm627"></a><h3>VSFTPD</h3><p>
560 CTDB can manage the vsftpd FTP server.
561 </p><div class="refsect3"><a name="idm630"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">40.vsftpd</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_VSFTPD=yes|no</span></dt><dd><p>
562 Should CTDB manage the vsftpd FTP server?
565 </p></dd></dl></div></div><div class="refsect2"><a name="idm641"></a><h3>
566 SYSTEM RESOURCE MONITORING CONFIGURATION
568 CTDB can experience seemingly random (performance and other)
569 issues if system resources become too constrained. Options in
570 this section can be enabled to allow certain system resources
571 to be checked. They allows warnings to be logged and nodes to
572 be marked unhealthy when system resource usage reaches the
573 configured thresholds.
575 Some checks are enabled by default. It is recommended that
576 these checks remain enabled or are augmented by extra checks.
577 There is no supported way of completely disabling the checks.
578 </p><div class="refsect3"><a name="idm645"></a><h4>Eventscripts</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">05.system</code></td></tr></table><p>
579 Filesystem and memory usage monitoring is in
580 <code class="filename">05.system</code>.
581 </p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MONITOR_FILESYSTEM_USAGE=<em class="parameter"><code>FS-LIMIT-LIST</code></em></span></dt><dd><p>
582 FS-LIMIT-LIST is a space-separated list of
583 <em class="parameter"><code>FILESYSTEM</code></em>:<em class="parameter"><code>WARN_LIMIT</code></em>[<span class="optional">:<em class="parameter"><code>UNHEALTHY_LIMIT</code></em></span>]
584 triples indicating that warnings should be logged if the
585 space used on FILESYSTEM reaches WARN_LIMIT%. If usage
586 reaches UNHEALTHY_LIMIT then the node should be flagged
587 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
588 left blank, meaning that check will be omitted.
590 Default is to warn for each filesystem containing a
591 database directory (<code class="envar">CTDB_DBDIR</code>,
592 <code class="envar">CTDB_DBDIR_PERSISTENT</code>,
593 <code class="envar">CTDB_DBDIR_STATE</code>) with a threshold of
595 </p></dd><dt><span class="term">CTDB_MONITOR_MEMORY_USAGE=<em class="parameter"><code>MEM-LIMITS</code></em></span></dt><dd><p>
596 MEM-LIMITS takes the form
597 <em class="parameter"><code>WARN_LIMIT</code></em>[<span class="optional">:<em class="parameter"><code>UNHEALTHY_LIMIT</code></em></span>]
598 indicating that warnings should be logged if memory
599 usage reaches WARN_LIMIT%. If usage reaches
600 UNHEALTHY_LIMIT then the node should be flagged
601 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
602 left blank, meaning that check will be omitted.
604 Default is 80, so warnings will be logged when memory
606 </p></dd><dt><span class="term">CTDB_MONITOR_SWAP_USAGE=<em class="parameter"><code>SWAP-LIMITS</code></em></span></dt><dd><p>
607 SWAP-LIMITS takes the form
608 <em class="parameter"><code>WARN_LIMIT</code></em>[<span class="optional">:<em class="parameter"><code>UNHEALTHY_LIMIT</code></em></span>]
609 indicating that warnings should be logged if
610 swap usage reaches WARN_LIMIT%. If usage reaches
611 UNHEALTHY_LIMIT then the node should be flagged
612 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
613 left blank, meaning that check will be omitted.
615 Default is 25, so warnings will be logged when swap
617 </p></dd></dl></div></div><div class="refsect2"><a name="idm684"></a><h3>MISCELLANEOUS SERVICE-RELATED CONFIGURATION</h3><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGED_SERVICES=<em class="parameter"><code>SERVICE-LIST</code></em></span></dt><dd><p>
618 SERVICE-LIST is a space-separated list of SERVICEs that
619 CTDB should manage. This can be used as an alternative
621 <code class="varname">CTDB_MANAGES_<em class="replaceable"><code>SERVICE</code></em></code>
625 </p></dd><dt><span class="term">CTDB_SERVICE_AUTOSTARTSTOP=yes|no</span></dt><dd><p>
626 When CTDB should start and stop services if they become
627 managed or unmanaged.
630 </p></dd></dl></div></div></div><div class="refsect1"><a name="idm700"></a><h2>
631 TUNABLES CONFIGURATION
634 <span class="citerefentry"><span class="refentrytitle">ctdbd-tunables</span>(7)</span>) can be set from the
635 configuration file. They are set as follows:
637 </p><div class="literallayout"><p><br>
638 CTDB_SET_<em class="replaceable"><code>TUNABLE</code></em>=<em class="replaceable"><code>VALUE</code></em><br>
643 </p><pre class="screen">
644 CTDB_SET_MonitorInterval=20
646 </p></div><div class="refsect1"><a name="idm711"></a><h2>
649 Variable in this section are for debugging and testing CTDB.
650 They should not generally be needed.
651 </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_DEBUG_HUNG_SCRIPT=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
652 FILENAME is a script to run to log debug information when
653 an event script times out.
655 Default is <code class="filename"><code class="varname">CTDB_BASE</code>/debug-hung-script.sh</code>.
656 </p></dd><dt><span class="term">CTDB_DEBUG_HUNG_SCRIPT_LOGFILE=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
657 FILENAME specifies where log messages should go when
658 debugging hung eventscripts. This is a testing option.
659 See also <em class="citetitle">CTDB_DEBUG_HUNG_SCRIPT</em>.
661 No default. Messages go to stdout/stderr and are logged
662 to the same place as other CTDB log messages.
663 </p></dd><dt><span class="term">CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<em class="parameter"><code>REGEXP</code></em></span></dt><dd><p>
664 REGEXP specifies interesting processes for which stack
665 traces should be logged when debugging hung eventscripts
666 and those processes are matched in pstree output. REGEXP
667 is an extended regexp so choices are separated by pipes
668 ('|'). However, REGEXP should not contain parentheses.
669 See also <em class="citetitle">CTDB_DEBUG_HUNG_SCRIPT</em>.
671 Default is "exportfs|rpcinfo".
672 </p></dd><dt><span class="term">CTDB_DEBUG_LOCKS=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
673 FILENAME is a script to run to log debug information when
674 an CTDB fails to freeze databases during recovery.
677 <code class="filename"><code class="varname">CTDB_BASE</code>/debug_locks.sh</code>.
678 </p></dd><dt><span class="term">CTDB_SYS_ETCDIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
679 DIRECTORY containing system configuration files. This is
680 used to provide alternate configuration when testing and
681 should not need to be changed from the default.
683 Default is <code class="filename">/etc</code>.
684 </p></dd><dt><span class="term">CTDB_INIT_STYLE=debian|redhat|suse</span></dt><dd><p>
685 This is the init style used by the Linux distribution (or
686 other operating system) being used. This is usually
687 determined dynamically by checking the system. This
688 variable is used by the initscript to determine which init
689 system primitives to use. It is also used by some
690 eventscripts to choose the name of initscripts for certain
691 services, since these can vary between distributions.
695 If this option needs to be changed from the calculated
696 default for the initscript to function properly, then it
697 must be set in the distribution-specific initscript
698 configuration, such as
699 <code class="filename">/etc/sysconfig/ctdb</code>
700 </p></dd><dt><span class="term">CTDB_MAX_CORRUPT_DB_BACKUPS=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
701 NUM is the maximum number of volatile TDB database backups
702 to be kept (for each database) when a corrupt database is
703 found during startup. Volatile TDBs are zeroed during
704 startup so backups are needed to debug any corruption that
705 occurs before a restart.
708 </p></dd><dt><span class="term">CTDB_MAX_OPEN_FILES=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
709 NUM is the maximum number of open files.
712 </p></dd><dt><span class="term">CTDB_RC_LOCAL=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
713 FILENAME is a script fragment to be sourced by the
714 <code class="filename">functions</code> that is sourced by scripts.
715 On example use would be to override function definitions
716 in unit tests. As a sanity check, this file must be
717 executable for it to be used.
720 </p></dd><dt><span class="term">CTDB_RUN_TIMEOUT_MONITOR=yes|no</span></dt><dd><p>
721 Whether CTDB should simulate timing out monitor events.
722 This uses the <code class="filename">99.timeout</code> eventscript.
725 </p></dd><dt><span class="term">CTDB_SCRIPT_DEBUGLEVEL=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
726 NUM is the level debugging messages printed by CTDB
727 scripts. Setting this to a higher number (e.g. 4) will
728 cause some scripts to log more messages.
731 </p></dd><dt><span class="term">CTDB_SUPPRESS_COREFILE=yes|no</span></dt><dd><p>
732 Whether CTDB core files should be suppressed.
735 </p></dd><dt><span class="term">CTDB_VALGRIND=yes|no|<em class="parameter"><code>COMMAND</code></em></span></dt><dd><p>
736 If "yes", this causes
737 <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> to be run under
738 <span class="citerefentry"><span class="refentrytitle">valgrind</span>(1)</span> with logs going to
739 <code class="filename">/usr/local/var/log/ctdb_valgrind</code>. If neither
740 "yes" nor "no" then the value is assumed to be a COMMAND
741 (e.g. a <span class="command"><strong>valgrind</strong></span> variation, a
742 <span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span> command) that is
743 used in place of the default <span class="command"><strong>valgrind</strong></span>
744 command. In either case, the <code class="option">--valgrind</code>
745 option is passed to <span class="command"><strong>ctdbd</strong></span>.
748 </p></dd><dt><span class="term">CTDB_VARDIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
749 DIRECTORY containing CTDB files that are modified at
752 Defaults to <code class="filename">/usr/local/var/lib/ctdb</code>.
753 </p></dd></dl></div></div><div class="refsect1"><a name="idm822"></a><h2>FILES</h2><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">/usr/local/etc/ctdb/ctdbd.conf</code></td></tr><tr><td><code class="filename">/etc/sysconfig/ctdb</code></td></tr><tr><td><code class="filename">/etc/default/ctdb</code></td></tr><tr><td><code class="filename">/usr/local/etc/ctdb/sysconfig/ctdb</code></td></tr></table></div><div class="refsect1"><a name="idm833"></a><h2>SEE ALSO</h2><p>
754 <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>,
756 <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span>,
758 <span class="citerefentry"><span class="refentrytitle">onnode</span>(1)</span>,
760 <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>,
762 <span class="citerefentry"><span class="refentrytitle">ctdb-tunables</span>(7)</span>,
764 <a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
765 </p></div></div></body></html>