1 <?xml version="1.0" encoding="iso-8859-1"?>
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>recovery 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 recovery lock please see the
186 <citetitle>RECOVERY LOCK</citetitle> section in
187 <citerefentry><refentrytitle>ctdb</refentrytitle>
188 <manvolnum>7</manvolnum></citerefentry>.
191 Default: NONE. However, uses of a recovery lock is
192 <emphasis>strongly recommended</emphasis>.
198 <term>node address = <parameter>IPADDR</parameter></term>
201 IPADDR is the private IP address that ctdbd will bind to.
204 This option is only required when automatic address
205 detection can not be used. This can be the case when
206 running multiple ctdbd daemons/nodes on the same physical
207 host (usually for testing), using InfiniBand for the
208 private network or on Linux when sysctl
209 net.ipv4.ip_nonlocal_bind=1.
212 Default: CTDB selects the first address from the nodes
213 list that it can bind to. See also the <citetitle>PRIVATE
214 ADDRESS</citetitle> section in
215 <citerefentry><refentrytitle>ctdb</refentrytitle>
216 <manvolnum>7</manvolnum></citerefentry>.
222 <term>transport = tcp|ib</term>
225 This option specifies which transport to use for ctdbd
226 internode communications on the private network.
229 <literal>ib</literal> means InfiniBand. The InfiniBand
230 support is not regularly tested. If it is known to be
231 broken then it may be disabled so that a value of
232 <literal>ib</literal> is considered invalid.
235 Default: <literal>tcp</literal>
245 DATABASE CONFIGURATION
249 Options in this section affect the CTDB database setup. They
250 are valid within the <emphasis>database</emphasis> section of
251 file, indicated by <literal>[database]</literal>.
257 <term>volatile database directory = <parameter>DIRECTORY</parameter></term>
260 DIRECTORY on local storage where CTDB keeps a local copy
261 of volatile TDB databases. This directory is local for
262 each node and should not be stored on the shared cluster
266 Mounting a tmpfs (or similar memory filesystem) on this
267 directory can provide a significant performance
268 improvement when there is I/O contention on the local
272 Default: <filename>/usr/local/var/lib/ctdb/volatile</filename>
278 <term>persistent database directory=<parameter>DIRECTORY</parameter></term>
281 DIRECTORY on local storage where CTDB keeps a local copy
282 of persistent TDB databases. This directory is local for
283 each node and should not be stored on the shared cluster
287 Default: <filename>/usr/local/var/lib/ctdb/persistent</filename>
293 <term>state database directory = <parameter>DIRECTORY</parameter></term>
296 DIRECTORY on local storage where CTDB keeps a local copy
297 of internal state TDB databases. This directory is local
298 for each node and should not be stored on the shared
302 Default: <filename>/usr/local/var/lib/ctdb/state</filename>
308 <term>tdb mutexes = true|false</term>
311 This parameter enables TDB_MUTEX_LOCKING feature on
312 volatile databases if the robust mutexes are
313 supported. This optimizes the record locking using robust
314 mutexes and is much more efficient that using posix locks.
317 If robust mutexes are unreliable on the platform being
318 used then they can be disabled by setting this to
319 <literal>false</literal>.
325 <term>lock debug script = <parameter>FILENAME</parameter></term>
328 FILENAME is a script used by CTDB's database locking code
329 to attempt to provide debugging information when CTDB is
330 unable to lock an entire database or a record.
333 This script should be a bare filename relative to the CTDB
334 configuration directory
335 (<filename>/usr/local/etc/ctdb/</filename>). Any
336 directory prefix is ignored and the path is calculated
337 relative to this directory.
340 CTDB provides a lock debugging script and installs it as
341 <filename>/usr/local/etc/ctdb/debug_locks.sh</filename>.
354 EVENT HANDLING CONFIGURATION
358 Options in this section affect CTDB event handling. They are
359 valid within the <emphasis>event</emphasis> section of file,
360 indicated by <literal>[event]</literal>.
366 <term>debug script = <parameter>FILENAME</parameter></term>
369 FILENAME is a script used by CTDB's event handling code to
370 attempt to provide debugging information when an event
374 This script should be a bare filename relative to the CTDB
375 configuration directory
376 (<filename>/usr/local/etc/ctdb/</filename>). Any
377 directory prefix is ignored and the path is calculated
378 relative to this directory.
381 CTDB provides a script for debugging timed out event
382 scripts and installs it as
383 <filename>/usr/local/etc/ctdb/debug-hung-script.sh</filename>.
396 FAILOVER CONFIGURATION
400 Options in this section affect CTDB failover. They are
401 valid within the <emphasis>failover</emphasis> section of file,
402 indicated by <literal>[failover]</literal>.
408 <term>disabled = true|false</term>
411 If set to <literal>true</literal> then public IP failover
415 Default: <literal>false</literal>
429 Options in this section affect legacy CTDB setup. They are valid
430 within the <emphasis>legacy</emphasis> section of file,
431 indicated by <literal>[legacy]</literal>.
437 <term>ctdb start as stopped = true|false</term>
440 If set to <literal>true</literal> CTDB starts in the
444 To allow the node to take part in the cluster it must be
445 manually continued with the the <command>ctdb
446 continue</command> command.
449 Please see the <citetitle>NODE STATES</citetitle> section
450 in <citerefentry><refentrytitle>ctdb</refentrytitle>
451 <manvolnum>7</manvolnum></citerefentry> for more
452 information about the STOPPED state.
455 Default: <literal>false</literal>
461 <term>start as disabled = true|false</term>
464 If set to <literal>true</literal> CTDB starts in the
468 To allow the node to host public IP addresses and
469 services, it must be manually enabled using the
470 <command>ctdb enable</command> command.
473 Please see the <citetitle>NODE STATES</citetitle> section
474 in <citerefentry><refentrytitle>ctdb</refentrytitle>
475 <manvolnum>7</manvolnum></citerefentry> for more
476 information about the DISABLED state.
479 Default: <literal>false</literal>
485 <term>realtime scheduling = true|false</term>
488 Usually CTDB runs with real-time priority. This helps it
489 to perform effectively on a busy system, such as when
490 there are thousands of Samba clients. If you are running
491 CTDB on a platform that does not support real-time
492 priority, you can set this to <literal>false</literal>.
495 Default: <literal>true</literal>
501 <term>recmaster capability = true|false</term>
504 Indicates whether a node can become the recovery master
505 for the cluster. If this is set to
506 <literal>false</literal> then the node will not be able to
507 become the recovery master for the cluster. This feature
508 is primarily used for making a cluster span across a WAN
509 link and use CTDB as a WAN-accelerator.
512 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
514 <citerefentry><refentrytitle>ctdb</refentrytitle>
515 <manvolnum>7</manvolnum></citerefentry> for more
519 Default: <literal>true</literal>
525 <term>lmaster capability = true|false</term>
528 Indicates whether a node can become a location master for
529 records in a database. If this is set to
530 <literal>false</literal> then the node will not be part of
531 the vnnmap. This feature is primarily used for making a
532 cluster span across a WAN link and use CTDB as a
536 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
538 <citerefentry><refentrytitle>ctdb</refentrytitle>
539 <manvolnum>7</manvolnum></citerefentry> for more
543 Default: <literal>true</literal>
549 <term>script log level = <parameter>LOGLEVEL</parameter></term>
552 This option sets the debug level of event script output to
556 See the <citetitle>DEBUG LEVELS</citetitle> section in
557 <citerefentry><refentrytitle>ctdb</refentrytitle>
558 <manvolnum>7</manvolnum></citerefentry> for more
562 Default: <literal>ERROR</literal>
575 <member><filename>/usr/local/etc/ctdb/ctdb.conf</filename></member>
580 <title>SEE ALSO</title>
582 <citerefentry><refentrytitle>ctdbd</refentrytitle>
583 <manvolnum>1</manvolnum></citerefentry>,
585 <citerefentry><refentrytitle>onnode</refentrytitle>
586 <manvolnum>1</manvolnum></citerefentry>,
588 <citerefentry><refentrytitle>ctdb.sysconfig</refentrytitle>
589 <manvolnum>5</manvolnum></citerefentry>,
591 <citerefentry><refentrytitle>ctdb-script.options</refentrytitle>
592 <manvolnum>5</manvolnum></citerefentry>,
594 <citerefentry><refentrytitle>ctdb</refentrytitle>
595 <manvolnum>7</manvolnum></citerefentry>,
597 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
598 <manvolnum>7</manvolnum></citerefentry>,
600 <ulink url="http://ctdb.samba.org/"/>
607 This documentation was written by
615 <holder>Andrew Tridgell</holder>
616 <holder>Ronnie Sahlberg</holder>
620 This program is free software; you can redistribute it and/or
621 modify it under the terms of the GNU General Public License as
622 published by the Free Software Foundation; either version 3 of
623 the License, or (at your option) any later version.
626 This program is distributed in the hope that it will be
627 useful, but WITHOUT ANY WARRANTY; without even the implied
628 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
629 PURPOSE. See the GNU General Public License for more details.
632 You should have received a copy of the GNU General Public
633 License along with this program; if not, see
634 <ulink url="http://www.gnu.org/licenses"/>.