1 <?xml version="1.0" encoding="UTF-8"?>
3 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
6 <refentry id="ctdb.conf.5">
9 <refentrytitle>ctdb.conf</refentrytitle>
10 <manvolnum>5</manvolnum>
11 <refmiscinfo class="source">ctdb</refmiscinfo>
12 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
16 <refname>ctdb.conf</refname>
17 <refpurpose>CTDB configuration file</refpurpose>
21 <title>DESCRIPTION</title>
24 This file contains CTDB configuration options that affect the
25 operation of CTDB daemons and command-line tools. The default
26 location of this file is
27 <filename>/usr/local/etc/ctdb/ctdb.conf</filename>.
31 Note that this is a Samba-style configuration file, so it has a
32 very different syntax to previous CTDB configuration files.
36 For event script options please see
37 <citerefentry><refentrytitle>ctdb-script.options</refentrytitle>
38 <manvolnum>5</manvolnum></citerefentry>.
42 Configuration options are grouped into several sections below.
43 There are only a few options in each section, allowing them to
44 be ordered (approximately) in decreasing order of importance.
55 Options in this section control CTDB's logging. They are valid
56 within the <emphasis>logging</emphasis> section of file,
57 indicated by <literal>[logging]</literal>.
63 <term>log level = <parameter>LOGLEVEL</parameter></term>
66 LOGLEVEL is a string that controls the verbosity of
67 ctdbd's logging. See the <citetitle>LOG
68 LEVELS</citetitle> section in
69 <citerefentry><refentrytitle>ctdb</refentrytitle>
70 <manvolnum>7</manvolnum></citerefentry> for more details.
73 Default: <literal>NOTICE</literal>
79 <term>location = <parameter>STRING</parameter></term>
82 STRING specifies where ctdbd will write its log.
89 <term>file:<parameter>FILENAME</parameter></term>
92 FILENAME where ctdbd will write its log. This is usually
93 <filename>/usr/local/var/log/log.ctdb</filename>.
98 <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
101 CTDB will log to syslog. By default this will use
105 If METHOD is specified then it specifies an
106 extension that causes logging to be done in a
107 non-blocking fashion. This can be useful under
108 heavy loads that might cause the syslog daemon to
109 dequeue messages too slowly, which would otherwise
110 cause CTDB to block when logging. METHOD must be
115 <term>nonblocking</term>
118 CTDB will log to syslog via
119 <filename>/dev/log</filename> in non-blocking
128 CTDB will log to syslog via UDP to
129 localhost:514. The syslog daemon must be
130 configured to listen on (at least)
131 localhost:514. Most implementations will log
132 the messages against hostname "localhost" -
133 this is a limit of the implementation for
134 compatibility with more syslog daemon
140 <term>udp-rfc5424</term>
143 As with "udp" but messages are sent in RFC5424
144 format. This method will log the correct
145 hostname but is not as widely implemented in
156 file:<filename>/usr/local/var/log/log.ctdb</filename>
166 CLUSTER CONFIGURATION
170 Options in this section affect the CTDB cluster setup. They
171 are valid within the <emphasis>cluster</emphasis> section of
172 file, indicated by <literal>[cluster]</literal>.
178 <term>cluster lock = <parameter>LOCK</parameter></term>
181 LOCK specifies the cluster-wide mutex used to detect and
182 prevent a partitioned cluster (or "split brain").
185 For information about the cluster lock please see the
186 <citetitle>CLUSTER LOCK</citetitle> section in
187 <citerefentry><refentrytitle>ctdb</refentrytitle>
188 <manvolnum>7</manvolnum></citerefentry>.
191 Default: NONE. However, uses of a cluster lock is
192 <emphasis>strongly recommended</emphasis>.
198 <term>leader capability = true|false</term>
201 Indicates whether a node can become the leader
202 for the cluster. If this is set to
203 <literal>false</literal> then the node will not be able to
204 become the leader for the cluster. This feature
205 is primarily used for making a cluster span across a WAN
206 link and use CTDB as a WAN-accelerator.
209 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
211 <citerefentry><refentrytitle>ctdb</refentrytitle>
212 <manvolnum>7</manvolnum></citerefentry> for more
216 Default: <literal>true</literal>
222 <term>leader timeout = <parameter>SECONDS</parameter></term>
225 Number of SECONDS without a leader broadcast before a node
226 triggers an election.
229 Default: <literal>5</literal>
235 <term>node address = <parameter>IPADDR</parameter></term>
238 IPADDR is the private IP address that ctdbd will bind to.
241 This option is only required when automatic address
242 detection can not be used. This can be the case when
243 running multiple ctdbd daemons/nodes on the same physical
244 host (usually for testing), using InfiniBand for the
245 private network or on Linux when sysctl
246 net.ipv4.ip_nonlocal_bind=1.
249 Default: CTDB selects the first address from the nodes
250 list that it can bind to. See also the <citetitle>PRIVATE
251 ADDRESS</citetitle> section in
252 <citerefentry><refentrytitle>ctdb</refentrytitle>
253 <manvolnum>7</manvolnum></citerefentry>.
259 <term>transport = tcp|ib</term>
262 This option specifies which transport to use for ctdbd
263 internode communications on the private network.
266 <literal>ib</literal> means InfiniBand. The InfiniBand
267 support is not regularly tested. If it is known to be
268 broken then it may be disabled so that a value of
269 <literal>ib</literal> is considered invalid.
272 Default: <literal>tcp</literal>
282 DATABASE CONFIGURATION
286 Options in this section affect the CTDB database setup. They
287 are valid within the <emphasis>database</emphasis> section of
288 file, indicated by <literal>[database]</literal>.
294 <term>volatile database directory = <parameter>DIRECTORY</parameter></term>
297 DIRECTORY on local storage where CTDB keeps a local copy
298 of volatile TDB databases. This directory is local for
299 each node and should not be stored on the shared cluster
303 Mounting a tmpfs (or similar memory filesystem) on this
304 directory can provide a significant performance
305 improvement when there is I/O contention on the local
309 Default: <filename>/usr/local/var/lib/ctdb/volatile</filename>
315 <term>persistent database directory=<parameter>DIRECTORY</parameter></term>
318 DIRECTORY on local storage where CTDB keeps a local copy
319 of persistent TDB databases. This directory is local for
320 each node and should not be stored on the shared cluster
324 Default: <filename>/usr/local/var/lib/ctdb/persistent</filename>
330 <term>state database directory = <parameter>DIRECTORY</parameter></term>
333 DIRECTORY on local storage where CTDB keeps a local copy
334 of internal state TDB databases. This directory is local
335 for each node and should not be stored on the shared
339 Default: <filename>/usr/local/var/lib/ctdb/state</filename>
345 <term>tdb mutexes = true|false</term>
348 This parameter enables TDB_MUTEX_LOCKING feature on
349 volatile databases if the robust mutexes are
350 supported. This optimizes the record locking using robust
351 mutexes and is much more efficient that using posix locks.
354 If robust mutexes are unreliable on the platform being
355 used then they can be disabled by setting this to
356 <literal>false</literal>.
362 <term>lock debug script = <parameter>FILENAME</parameter></term>
365 FILENAME is a script used by CTDB's database locking code
366 to attempt to provide debugging information when CTDB is
367 unable to lock an entire database or a record.
370 This script should be a bare filename relative to the CTDB
371 configuration directory
372 (<filename>/usr/local/etc/ctdb/</filename>). Any
373 directory prefix is ignored and the path is calculated
374 relative to this directory.
377 CTDB provides a lock debugging script and installs it as
378 <filename>/usr/local/etc/ctdb/debug_locks.sh</filename>.
391 EVENT HANDLING CONFIGURATION
395 Options in this section affect CTDB event handling. They are
396 valid within the <emphasis>event</emphasis> section of file,
397 indicated by <literal>[event]</literal>.
403 <term>debug script = <parameter>FILENAME</parameter></term>
406 FILENAME is a script used by CTDB's event handling code to
407 attempt to provide debugging information when an event
411 This script should be a bare filename relative to the CTDB
412 configuration directory
413 (<filename>/usr/local/etc/ctdb/</filename>). Any
414 directory prefix is ignored and the path is calculated
415 relative to this directory.
418 CTDB provides a script for debugging timed out event
419 scripts and installs it as
420 <filename>/usr/local/etc/ctdb/debug-hung-script.sh</filename>.
433 FAILOVER CONFIGURATION
437 Options in this section affect CTDB failover. They are
438 valid within the <emphasis>failover</emphasis> section of file,
439 indicated by <literal>[failover]</literal>.
445 <term>disabled = true|false</term>
448 If set to <literal>true</literal> then public IP failover
452 Default: <literal>false</literal>
466 Options in this section affect legacy CTDB setup. They are valid
467 within the <emphasis>legacy</emphasis> section of file,
468 indicated by <literal>[legacy]</literal>.
474 <term>ctdb start as stopped = true|false</term>
477 If set to <literal>true</literal> CTDB starts in the
481 To allow the node to take part in the cluster it must be
482 manually continued with the <command>ctdb
483 continue</command> command.
486 Please see the <citetitle>NODE STATES</citetitle> section
487 in <citerefentry><refentrytitle>ctdb</refentrytitle>
488 <manvolnum>7</manvolnum></citerefentry> for more
489 information about the STOPPED state.
492 Default: <literal>false</literal>
498 <term>start as disabled = true|false</term>
501 If set to <literal>true</literal> CTDB starts in the
505 To allow the node to host public IP addresses and
506 services, it must be manually enabled using the
507 <command>ctdb enable</command> command.
510 Please see the <citetitle>NODE STATES</citetitle> section
511 in <citerefentry><refentrytitle>ctdb</refentrytitle>
512 <manvolnum>7</manvolnum></citerefentry> for more
513 information about the DISABLED state.
516 Default: <literal>false</literal>
522 <term>realtime scheduling = true|false</term>
525 Usually CTDB runs with real-time priority. This helps it
526 to perform effectively on a busy system, such as when
527 there are thousands of Samba clients. If you are running
528 CTDB on a platform that does not support real-time
529 priority, you can set this to <literal>false</literal>.
532 Default: <literal>true</literal>
538 <term>lmaster capability = true|false</term>
541 Indicates whether a node can become a location master for
542 records in a database. If this is set to
543 <literal>false</literal> then the node will not be part of
544 the vnnmap. This feature is primarily used for making a
545 cluster span across a WAN link and use CTDB as a
549 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
551 <citerefentry><refentrytitle>ctdb</refentrytitle>
552 <manvolnum>7</manvolnum></citerefentry> for more
556 Default: <literal>true</literal>
562 <term>script log level = <parameter>LOGLEVEL</parameter></term>
565 This option sets the debug level of event script output to
569 See the <citetitle>DEBUG LEVELS</citetitle> section in
570 <citerefentry><refentrytitle>ctdb</refentrytitle>
571 <manvolnum>7</manvolnum></citerefentry> for more
575 Default: <literal>ERROR</literal>
588 <member><filename>/usr/local/etc/ctdb/ctdb.conf</filename></member>
593 <title>SEE ALSO</title>
595 <citerefentry><refentrytitle>ctdbd</refentrytitle>
596 <manvolnum>1</manvolnum></citerefentry>,
598 <citerefentry><refentrytitle>onnode</refentrytitle>
599 <manvolnum>1</manvolnum></citerefentry>,
601 <citerefentry><refentrytitle>ctdb.sysconfig</refentrytitle>
602 <manvolnum>5</manvolnum></citerefentry>,
604 <citerefentry><refentrytitle>ctdb-script.options</refentrytitle>
605 <manvolnum>5</manvolnum></citerefentry>,
607 <citerefentry><refentrytitle>ctdb</refentrytitle>
608 <manvolnum>7</manvolnum></citerefentry>,
610 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
611 <manvolnum>7</manvolnum></citerefentry>,
613 <ulink url="http://ctdb.samba.org/"/>
620 This documentation was written by
628 <holder>Andrew Tridgell</holder>
629 <holder>Ronnie Sahlberg</holder>
633 This program is free software; you can redistribute it and/or
634 modify it under the terms of the GNU General Public License as
635 published by the Free Software Foundation; either version 3 of
636 the License, or (at your option) any later version.
639 This program is distributed in the hope that it will be
640 useful, but WITHOUT ANY WARRANTY; without even the implied
641 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
642 PURPOSE. See the GNU General Public License for more details.
645 You should have received a copy of the GNU General Public
646 License along with this program; if not, see
647 <ulink url="http://www.gnu.org/licenses"/>.