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="ctdbd.1">
9 <refentrytitle>ctdbd</refentrytitle>
10 <manvolnum>1</manvolnum>
11 <refmiscinfo class="source">ctdb</refmiscinfo>
12 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
16 <refname>ctdbd</refname>
17 <refpurpose>The CTDB cluster daemon</refpurpose>
22 <command>ctdbd</command>
23 <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
28 <title>DESCRIPTION</title>
30 ctdbd is the main CTDB daemon.
34 Note that ctdbd is not usually invoked directly. It is invoked
35 via <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
36 <manvolnum>1</manvolnum></citerefentry> or via the initscript.
40 See <citerefentry><refentrytitle>ctdb</refentrytitle>
41 <manvolnum>7</manvolnum></citerefentry> for an overview of CTDB.
46 <title>GENERAL OPTIONS</title>
50 <term>-d, --debug=<parameter>DEBUGLEVEL</parameter></term>
53 This option sets the debug level to DEBUGLEVEL, which
54 controls what will be written by the logging
55 subsystem. The default is 2.
58 See the <citetitle>DEBUG LEVELS</citetitle> section in
59 <citerefentry><refentrytitle>ctdb</refentrytitle>
60 <manvolnum>7</manvolnum></citerefentry> for more
67 <term>--dbdir=<parameter>DIRECTORY</parameter></term>
70 DIRECTORY on local storage where ctdbd keeps a local copy of
71 TDB databases. This directory is local for each node and
72 should not be stored on the shared cluster filesystem.
75 Defaults to <filename>/usr/local/var/lib/ctdb</filename>.
81 <term>--dbdir-persistent=<parameter>DIRECTORY</parameter></term>
84 DIRECTORY on local storage where ctdbd keeps a local copy of
85 persistent TDB databases. This directory is local for each
86 node and should not be stored on the shared cluster
90 Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
96 <term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
99 DIRECTORY on local storage where ctdbd keep internal state
100 TDB files. This directory is local for each node and
101 should not be stored on the shared cluster filesystem.
104 Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
110 <term>--event-script-dir=<parameter>DIRECTORY</parameter></term>
113 DIRECTORY where the CTDB event scripts are stored. See the
114 <citetitle>EVENT SCRIPTS</citetitle> section in
115 <citerefentry><refentrytitle>ctdb</refentrytitle>
116 <manvolnum>7</manvolnum></citerefentry> for more information.
119 Default is <envar>CTDB_BASE</envar>/events.d, so usually
120 <filename>/usr/local/etc/ctdb/events.d</filename>, which is part of
121 the CTDB installation.
127 <term>--listen=<parameter>IPADDR</parameter></term>
130 IPADDR is the private IP address that ctdbd will bind to.
133 By default ctdbd will select the first address from the
134 nodes list that in can bind to. See also
135 <citetitle>--nlist</citetitle>.
138 This option is only required when automatic address
139 detection can not be used. This can be the case when
140 running multiple ctdbd daemons/nodes on the same physical
141 host (usually for testing), using InfiniBand for the
142 private network or on Linux when sysctl
143 net.ipv4.ip_nonlocal_bind=1.
149 <term>--logging=<parameter>STRING</parameter></term>
152 STRING specifies where ctdbd will write its log. The
154 file:<filename>/usr/local/var/log/log.ctdb</filename>.
161 <term>file:<parameter>FILENAME</parameter></term>
164 FILENAME where ctdbd will write its log. This is usually
165 <filename>/usr/local/var/log/log.ctdb</filename>.
170 <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
173 CTDB will log to syslog. By default this will use
177 Under heavy loads syslog(3) can block if the syslog
178 daemon processes messages too slowly. This can
179 cause CTDB to block when logging.
182 If METHOD is specified then it specifies an
183 extension that causes logging to be done in a
184 non-blocking mode. Note that <emphasis>this may
185 cause messages to be dropped</emphasis>. METHOD
190 <term>nonblocking</term>
193 CTDB will log to syslog via
194 <filename>/dev/log</filename> in non-blocking
203 CTDB will log to syslog via UDP to
204 localhost:514. The syslog daemon must be
205 configured to listen on (at least)
206 localhost:514. Most syslog daemons will log
207 the messages with hostname "localhost" - this
208 is a limitation of the implementation, for
209 compatibility with more syslog daemons.
214 <term>udp-rfc5424</term>
217 As with "udp" but messages are sent in RFC5424
218 format. This method will log the correct
219 hostname but is not as widely implemented in
232 <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
235 NUM specifies the maximum number of health check failures
236 allowed for persistent databases during startup.
239 The default value is 0. Setting this to non-zero allows a
240 node with unhealthy persistent databases to startup and
241 join the cluster as long as there is another node with
242 healthy persistent databases.
248 <term>--nlist=<parameter>FILENAME</parameter></term>
251 FILENAME containing a list of the private IP addresses, one
252 per line, for each node in the cluster. This file
253 <emphasis>must be the same on each node</emphasis> in the
257 Default is <envar>CTDB_BASE</envar>/nodes, so usually
258 <filename>/usr/local/etc/ctdb/nodes</filename>.
264 <term>--no-lmaster</term>
267 This argument specifies that this node can NOT become an lmaster
268 for records in the database. This means that it will never show up
269 in the vnnmap. This feature is primarily used for making a cluster
270 span across a WAN link and use CTDB as a WAN-accelerator.
273 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
274 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
275 <manvolnum>7</manvolnum></citerefentry> for more
282 <term>--no-recmaster</term>
285 This argument specifies that this node can NOT become a recmaster
286 for the database. This feature is primarily used for making a cluster
287 span across a WAN link and use CTDB as a WAN-accelerator.
290 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
291 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
292 <manvolnum>7</manvolnum></citerefentry> for more
299 <term>--notification-script=<parameter>FILENAME</parameter></term>
302 FILENAME specifying a script to be invoked by ctdbd when
303 certain state changes occur.
307 <filename>/usr/local/etc/ctdb/notify.sh</filename>.
310 Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
311 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
312 <manvolnum>7</manvolnum></citerefentry> for more
319 <term>--public_addresses=<parameter>FILENAME</parameter></term>
322 FILENAME specifying a file containing the public IP
323 addresses to use on the cluster when CTDB should use IP
324 takeover. This file contains a list of IP addresses,
325 netmasks and interfaces. CTDB will distribute these public
326 IP addresses appropriately across the available nodes.
329 The IP addresses specified in this file can differ across
333 This is usually the file
334 <filename>/usr/local/etc/ctdb/public_addresses</filename>
340 <term>--public-interface=<parameter>INTERFACE</parameter></term>
343 Default INTERFACE on which to attach public IP addresses.
346 When using public IP addresses, this is only required if
347 interfaces are not explicitly specified in the public
354 <term>--reclock=<parameter>LOCK</parameter></term>
357 LOCK specifies the cluster-wide mutex used to detect and
358 prevent a partitioned cluster (or "split brain").
361 For information about the recovery lock please see the
362 <citetitle>RECOVERY LOCK</citetitle> section in
363 <citerefentry><refentrytitle>ctdb</refentrytitle>
364 <manvolnum>7</manvolnum></citerefentry>.
370 <term>--start-as-disabled</term>
373 This makes ctdbd start in the DISABLED state.
376 To allow the node to host public IP addresses and
377 services, it must be manually enabled using the
378 <command>ctdb enable</command> command.
381 Please see the <citetitle>NODE STATES</citetitle> section
382 in <citerefentry><refentrytitle>ctdb</refentrytitle>
383 <manvolnum>7</manvolnum></citerefentry> for more
384 information about the DISABLED state.
390 <term>--start-as-stopped</term>
393 This makes ctdbd start in the STOPPED state.
396 To allow the node to take part in the cluster it must be
397 manually continued with the the <command>ctdb
398 enable</command> command.
401 Please see the <citetitle>NODE STATES</citetitle> section
402 in <citerefentry><refentrytitle>ctdb</refentrytitle>
403 <manvolnum>7</manvolnum></citerefentry> for more
404 information about the STOPPED state.
410 <term>--transport=tcp|infiniband</term>
413 This option specifies which transport to use for ctdbd
414 internode communications. The default is "tcp".
417 The "infiniband" support is not regularly tested.
423 <term>-?, --help</term>
426 Display a summary of options.
435 <title>DEBUGGING OPTIONS</title>
440 <term>-i, --interactive</term>
443 Enable interactive mode. This will make ctdbd run in the
444 foreground and not detach from the terminal. By default
445 ctdbd will detach itself and run in the background as a
452 <term>--nopublicipcheck</term>
455 This option is used when testing with multiple local
456 daemons on a single machine. It disables checks related
457 to public IP addresses.
463 <term>--nosetsched</term>
466 This is a debugging option. This option is only used when
470 Normally ctdbd will change its scheduler to run as a
471 real-time process. This is the default mode for a normal
472 ctdbd operation to gurarantee that ctdbd always gets the CPU
473 cycles that it needs.
476 This option is used to tell ctdbd to
477 <emphasis>not</emphasis> run as a real-time process and
478 instead run ctdbd as a normal userspace process. This is
479 useful for debugging and when you want to run ctdbd under
480 valgrind or gdb. (You don't want to attach valgrind or gdb
481 to a real-time process.)
487 <term>--socket=<parameter>FILENAME</parameter></term>
490 FILENAME specifies the name of the Unix domain socket that
491 ctdbd will create. This socket is used by local clients to
492 communicate with ctdbd.
495 The default is <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
496 You only need to use this option if you plan to run
497 multiple ctdbd daemons on the same physical host, usually
504 <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
507 This option sets the debug level of event script output to
508 DEBUGLEVEL. The default is ERR.
511 See the <citetitle>DEBUG LEVELS</citetitle> section in
512 <citerefentry><refentrytitle>ctdb</refentrytitle>
513 <manvolnum>7</manvolnum></citerefentry> for more
520 <term>--sloppy-start</term>
523 This is debugging option. This speeds up the initial
524 recovery during startup at the expense of some consistency
525 checking. <emphasis>Don't use this option in
526 production</emphasis>.
532 <term>--torture</term>
535 This option is only used for development and testing of
536 CTDB. It adds artificial errors and failures to the
537 common codepaths in ctdbd to verify that ctdbd can recover
538 correctly from failures.
541 <emphasis>Do not use this option</emphasis> unless you are
542 developing and testing new functionality in CTDB.
548 <term>--valgrinding</term>
551 This is a debugging option. This option is only used when
552 debugging ctdbd. This enables additional debugging
553 capabilities and implies --nosetsched.
562 <title>SEE ALSO</title>
564 <citerefentry><refentrytitle>ctdb</refentrytitle>
565 <manvolnum>1</manvolnum></citerefentry>,
567 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
568 <manvolnum>1</manvolnum></citerefentry>,
570 <citerefentry><refentrytitle>onnode</refentrytitle>
571 <manvolnum>1</manvolnum></citerefentry>,
573 <citerefentry><refentrytitle>ctdb</refentrytitle>
574 <manvolnum>7</manvolnum></citerefentry>,
576 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
577 <manvolnum>7</manvolnum></citerefentry>,
579 <ulink url="http://ctdb.samba.org/"/>
586 This documentation was written by
595 <holder>Andrew Tridgell</holder>
596 <holder>Ronnie Sahlberg</holder>
600 This program is free software; you can redistribute it and/or
601 modify it under the terms of the GNU General Public License as
602 published by the Free Software Foundation; either version 3 of
603 the License, or (at your option) any later version.
606 This program is distributed in the hope that it will be
607 useful, but WITHOUT ANY WARRANTY; without even the implied
608 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
609 PURPOSE. See the GNU General Public License for more details.
612 You should have received a copy of the GNU General Public
613 License along with this program; if not, see
614 <ulink url="http://www.gnu.org/licenses"/>.