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 This directory would usually be <filename>/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 This directory would usually be
91 <filename>/var/lib/ctdb/persistent</filename>
97 <term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
100 DIRECTORY on local storage where ctdbd keep internal state
101 TDB files. This directory is local for each node and
102 should not be stored on the shared cluster filesystem.
105 This directory would usually be
106 <filename>/var/lib/ctdb/state</filename>
112 <term>--event-script-dir=<parameter>DIRECTORY</parameter></term>
115 DIRECTORY where the CTDB event scripts are stored. See the
116 <citetitle>EVENT SCRIPTS</citetitle> section in
117 <citerefentry><refentrytitle>ctdb</refentrytitle>
118 <manvolnum>7</manvolnum></citerefentry> for more information.
121 Default is <envar>CTDB_BASE</envar>/events.d, so usually
122 <filename>/etc/ctdb/events.d</filename>, which is part of
123 the CTDB installation.
129 <term>--listen=<parameter>IPADDR</parameter></term>
132 IPADDR is the private IP address that ctdbd will bind to.
135 By default ctdbd will select the first address from the
136 nodes list that in can bind to. See also
137 <citetitle>--nlist</citetitle>.
140 This option is only required when automatic address
141 detection can not be used. This can be the case when
142 running multiple ctdbd daemons/nodes on the same physical
143 host (usually for testing), using InfiniBand for the
144 private network or on Linux when sysctl
145 net.ipv4.ip_nonlocal_bind=1.
151 <term>--logging=<parameter>STRING</parameter></term>
154 STRING specifies where ctdbd will write its log. The
155 default is file:<filename>/var/log/log.ctdb</filename> or
156 similar - the prefix may differ depending on how CTDB was
164 <term>file:<parameter>FILENAME</parameter></term>
167 FILENAME where ctdbd will write its log. This is usually
168 <filename>/var/log/log.ctdb</filename>.
173 <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
176 CTDB will log to syslog. By default this will use
180 Under heavy loads syslog(3) can block if the syslog
181 daemon processes messages too slowly. This can
182 cause CTDB to block when logging.
185 If METHOD is specified then it specifies an
186 extension that causes logging to be done in a
187 non-blocking mode. Note that <emphasis>this may
188 cause messages to be dropped</emphasis>. METHOD
193 <term>nonblocking</term>
196 CTDB will log to syslog via
197 <filename>/dev/log</filename> in non-blocking
206 CTDB will log to syslog via UDP to
207 localhost:514. The syslog daemon must be
208 configured to listen on (at least)
209 localhost:514. Most syslog daemons will log
210 the messages with hostname "localhost" - this
211 is a limitation of the implementation, for
212 compatibility with more syslog daemons.
217 <term>udp-rfc5424</term>
220 As with "udp" but messages are sent in RFC5424
221 format. This method will log the correct
222 hostname but is not as widely implemented in
238 This option is used to activate the LVS capability on a CTDB
239 node. Please see the <citetitle>LVS</citetitle> section in
240 <citerefentry><refentrytitle>ctdb</refentrytitle>
241 <manvolnum>7</manvolnum></citerefentry> for more
248 <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
251 NUM specifies the maximum number of health check failures
252 allowed for persistent databases during startup.
255 The default value is 0. Setting this to non-zero allows a
256 node with unhealthy persistent databases to startup and
257 join the cluster as long as there is another node with
258 healthy persistent databases.
264 <term>--nlist=<parameter>FILENAME</parameter></term>
267 FILENAME containing a list of the private IP addresses, one
268 per line, for each node in the cluster. This file
269 <emphasis>must be the same on each node</emphasis> in the
273 Default is <envar>CTDB_BASE</envar>/nodes, so usually
274 <filename>/etc/ctdb/nodes</filename>.
280 <term>--no-lmaster</term>
283 This argument specifies that this node can NOT become an lmaster
284 for records in the database. This means that it will never show up
285 in the vnnmap. This feature is primarily used for making a cluster
286 span across a WAN link and use CTDB as a WAN-accelerator.
289 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
290 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
291 <manvolnum>7</manvolnum></citerefentry> for more
298 <term>--no-recmaster</term>
301 This argument specifies that this node can NOT become a recmaster
302 for the database. This feature is primarily used for making a cluster
303 span across a WAN link and use CTDB as a WAN-accelerator.
306 Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
307 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
308 <manvolnum>7</manvolnum></citerefentry> for more
315 <term>--notification-script=<parameter>FILENAME</parameter></term>
318 FILENAME specifying a script to be invoked by ctdbd when
319 certain state changes occur.
323 <filename>/etc/ctdb/notify.sh</filename>.
326 Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
327 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
328 <manvolnum>7</manvolnum></citerefentry> for more
335 <term>--pidfile=<parameter>FILENAME</parameter></term>
338 FILENAME for file containing process ID of main CTDB
339 daemon. This file is automatically created and removed by
343 The default is to not create a PID file.
349 <term>--public_addresses=<parameter>FILENAME</parameter></term>
352 FILENAME specifying a file containing the public IP
353 addresses to use on the cluster when CTDB should use IP
354 takeover. This file contains a list of IP addresses,
355 netmasks and interfaces. CTDB will distribute these public
356 IP addresses appropriately across the available nodes.
359 The IP addresses specified in this file can differ across
363 This is usually the file
364 <filename>/etc/ctdb/public_addresses</filename>
370 <term>--public-interface=<parameter>INTERFACE</parameter></term>
373 INTERFACE on which to attach public IP addresses or on which
374 to attach the single-public-ip when used.
377 When using public IP addresses, this is only required if
378 interfaces are not explicitly specified in the public
385 <term>--reclock=<parameter>FILE</parameter></term>
388 FILE is the name of the recovery lock file, stored in
389 <emphasis>shared storage</emphasis>, that CTDB uses to
390 prevent split brains.
393 For information about the recovery lock please see the
394 <citetitle>RECOVERY LOCK</citetitle> section in
395 <citerefentry><refentrytitle>ctdb</refentrytitle>
396 <manvolnum>7</manvolnum></citerefentry>.
402 <term>--single-public-ip=<parameter>IPADDR</parameter></term>
405 IPADDR specifies the single IP that CTDB will use in
409 Please see the <citetitle>LVS</citetitle> section in
410 <citerefentry><refentrytitle>ctdb</refentrytitle>
411 <manvolnum>7</manvolnum></citerefentry> for more
418 <term>--start-as-disabled</term>
421 This makes ctdbd start in the DISABLED state.
424 To allow the node to host public IP addresses and
425 services, it must be manually enabled using the
426 <command>ctdb enable</command> command.
429 Please see the <citetitle>NODE STATES</citetitle> section
430 in <citerefentry><refentrytitle>ctdb</refentrytitle>
431 <manvolnum>7</manvolnum></citerefentry> for more
432 information about the DISABLED state.
438 <term>--start-as-stopped</term>
441 This makes ctdbd start in the STOPPED state.
444 To allow the node to take part in the cluster it must be
445 manually continued with the the <command>ctdb
446 enable</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.
458 <term>--syslog</term>
461 Send log messages to syslog instead of the CTDB logfile.
462 This option overrides --logfile. The default is to log to
469 <term>--transport=tcp|infiniband</term>
472 This option specifies which transport to use for ctdbd
473 internode communications. The default is "tcp".
476 The "infiniband" support is not regularly tested.
482 <term>-?, --help</term>
485 Display a summary of options.
494 <title>DEBUGGING OPTIONS</title>
499 <term>-i, --interactive</term>
502 Enable interactive mode. This will make ctdbd run in the
503 foreground and not detach from the terminal. By default
504 ctdbd will detach itself and run in the background as a
511 <term>--nopublicipcheck</term>
514 This option is used when testing with multiple local
515 daemons on a single machine. It disables checks related
516 to public IP addresses.
522 <term>--nosetsched</term>
525 This is a debugging option. This option is only used when
529 Normally ctdbd will change its scheduler to run as a
530 real-time process. This is the default mode for a normal
531 ctdbd operation to gurarantee that ctdbd always gets the CPU
532 cycles that it needs.
535 This option is used to tell ctdbd to
536 <emphasis>not</emphasis> run as a real-time process and
537 instead run ctdbd as a normal userspace process. This is
538 useful for debugging and when you want to run ctdbd under
539 valgrind or gdb. (You don't want to attach valgrind or gdb
540 to a real-time process.)
546 <term>--socket=<parameter>FILENAME</parameter></term>
549 FILENAME specifies the name of the Unix domain socket that
550 ctdbd will create. This socket is used by local clients to
551 communicate with ctdbd.
554 The default is <filename>/tmp/ctdb.socket</filename> . You
555 only need to use this option if you plan to run multiple
556 ctdbd daemons on the same physical host, usually for
563 <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
566 This option sets the debug level of event script output to
567 DEBUGLEVEL. The default is ERR (0).
570 See the <citetitle>DEBUG LEVELS</citetitle> section in
571 <citerefentry><refentrytitle>ctdb</refentrytitle>
572 <manvolnum>7</manvolnum></citerefentry> for more
579 <term>--sloppy-start</term>
582 This is debugging option. This speeds up the initial
583 recovery during startup at the expense of some consistency
584 checking. <emphasis>Don't use this option in
585 production</emphasis>.
591 <term>--torture</term>
594 This option is only used for development and testing of
595 CTDB. It adds artificial errors and failures to the
596 common codepaths in ctdbd to verify that ctdbd can recover
597 correctly from failures.
600 <emphasis>Do not use this option</emphasis> unless you are
601 developing and testing new functionality in CTDB.
607 <term>--valgrinding</term>
610 This is a debugging option. This option is only used when
611 debugging ctdbd. This enables additional debugging
612 capabilities and implies --nosetsched.
621 <title>SEE ALSO</title>
623 <citerefentry><refentrytitle>ctdb</refentrytitle>
624 <manvolnum>1</manvolnum></citerefentry>,
626 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
627 <manvolnum>1</manvolnum></citerefentry>,
629 <citerefentry><refentrytitle>onnode</refentrytitle>
630 <manvolnum>1</manvolnum></citerefentry>,
632 <citerefentry><refentrytitle>ctdb</refentrytitle>
633 <manvolnum>7</manvolnum></citerefentry>,
635 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
636 <manvolnum>7</manvolnum></citerefentry>,
638 <ulink url="http://ctdb.samba.org/"/>
645 This documentation was written by
654 <holder>Andrew Tridgell</holder>
655 <holder>Ronnie Sahlberg</holder>
659 This program is free software; you can redistribute it and/or
660 modify it under the terms of the GNU General Public License as
661 published by the Free Software Foundation; either version 3 of
662 the License, or (at your option) any later version.
665 This program is distributed in the hope that it will be
666 useful, but WITHOUT ANY WARRANTY; without even the implied
667 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
668 PURPOSE. See the GNU General Public License for more details.
671 You should have received a copy of the GNU General Public
672 License along with this program; if not, see
673 <ulink url="http://www.gnu.org/licenses"/>.