wscript: set conf.env.replace_add_global_pthread = True
[Samba.git] / ctdb / doc / ctdbd.1.xml
blob402f083cc419698099135f4e368e951bfc0725d6
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry
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">
8   <refmeta>
9     <refentrytitle>ctdbd</refentrytitle>
10     <manvolnum>1</manvolnum>
11     <refmiscinfo class="source">ctdb</refmiscinfo>
12     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13   </refmeta>
15   <refnamediv>
16     <refname>ctdbd</refname>
17     <refpurpose>The CTDB cluster daemon</refpurpose>
18   </refnamediv>
20   <refsynopsisdiv>
21     <cmdsynopsis>
22       <command>ctdbd</command>
23       <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
24     </cmdsynopsis>
25   </refsynopsisdiv>
27   <refsect1>
28     <title>DESCRIPTION</title>
29     <para>
30       ctdbd is the main CTDB daemon.
31     </para>
33     <para>
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.
37     </para>
39     <para>
40       See <citerefentry><refentrytitle>ctdb</refentrytitle>
41       <manvolnum>7</manvolnum></citerefentry> for an overview of CTDB.
42     </para>
43   </refsect1>
45   <refsect1>
46     <title>GENERAL OPTIONS</title>
48     <variablelist>
49       <varlistentry>
50         <term>-d, --debug=<parameter>DEBUGLEVEL</parameter></term>
51         <listitem>
52           <para>
53             This option sets the debug level to DEBUGLEVEL, which
54             controls what will be written to the logfile. The default is
55             0 which will only log important events and errors. A larger
56             number will provide additional logging.
57           </para>
58           <para>
59             See the <citetitle>DEBUG LEVELS</citetitle> section in
60             <citerefentry><refentrytitle>ctdb</refentrytitle>
61             <manvolnum>7</manvolnum></citerefentry> for more
62             information.
63           </para>
64         </listitem>
65       </varlistentry>
67       <varlistentry>
68         <term>--dbdir=<parameter>DIRECTORY</parameter></term>
69         <listitem>
70           <para>
71             DIRECTORY on local storage where ctdbd keeps a local copy of
72             TDB databases.  This directory is local for each node and
73             should not be stored on the shared cluster filesystem.
74           </para>
75           <para>
76             This directory would usually be <filename>/var/ctdb</filename>
77           </para>
78         </listitem>
79       </varlistentry>
81       <varlistentry>
82         <term>--dbdir-persistent=<parameter>DIRECTORY</parameter></term>
83         <listitem>
84           <para>
85             DIRECTORY on local storage where ctdbd keeps a local copy of
86             persistent TDB databases.  This directory is local for each
87             node and should not be stored on the shared cluster
88             filesystem.
89           </para>
90           <para>
91             This directory would usually be
92             <filename>/etc/ctdb/persistent</filename>
93           </para>
94         </listitem>
95       </varlistentry>
97       <varlistentry>
98         <term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
99         <listitem>
100           <para>
101             DIRECTORY on local storage where ctdbd keep internal state
102             TDB files.  This directory is local for each node and
103             should not be stored on the shared cluster filesystem.
104           </para>
105           <para>
106             This directory would usually be
107             <filename>/var/ctdb/state</filename>
108           </para>
109         </listitem>
110       </varlistentry>
112       <varlistentry>
113         <term>--event-script-dir=<parameter>DIRECTORY</parameter></term>
114         <listitem>
115           <para>
116             DIRECTORY where the CTDB event scripts are stored.  See the
117             <citetitle>EVENT SCRIPTS</citetitle> section in
118             <citerefentry><refentrytitle>ctdb</refentrytitle>
119             <manvolnum>7</manvolnum></citerefentry> for more information.
120           </para>
121           <para>
122             Default is <envar>CTDB_BASE</envar>/events.d, so usually
123             <filename>/etc/ctdb/events.d</filename>, which is part of
124             the CTDB installation.
125           </para>
126         </listitem>
127       </varlistentry>
129       <varlistentry>
130         <term>--logfile=<parameter>FILENAME</parameter></term>
131         <listitem>
132           <para>
133             FILENAME where ctdbd will write its log. This is usually
134             <filename>/var/log/log.ctdb</filename>.
135           </para>
136         </listitem>
137       </varlistentry>
139       <varlistentry>
140         <term>--log-ringbuf-size=<parameter>NUM</parameter></term>
141         <listitem>
142           <para>
143             Set the size of the log ringbuffer to NUM entries.
144           </para>
145           <para>
146             CTDB uses an in-memory ringbuffer containing NUM most
147             recent log entries for all log levels (except DEBUG).  The
148             ringbugger can be useful for extracting detailed logs even
149             if some entries are not logged to the regular logs.
150           </para>
151           <para>
152             Use the <command>ctdb getlog</command> command to retrieve
153             log entries from the ringbuffer.
154           </para>
155         </listitem>
156       </varlistentry>
158       <varlistentry>
159         <term>--lvs</term>
160         <listitem>
161           <para>
162             This option is used to activate the LVS capability on a CTDB
163             node.  Please see the <citetitle>LVS</citetitle> section in
164             <citerefentry><refentrytitle>ctdb</refentrytitle>
165             <manvolnum>7</manvolnum></citerefentry> for more
166             information.
167           </para>
168         </listitem>
169       </varlistentry>
171       <varlistentry>
172         <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
173         <listitem>
174           <para>
175             NUM specifies the maximum number of health check failures
176             allowed for persistent databases during startup.
177           </para>
178           <para>
179             The default value is 0.  Setting this to non-zero allows a
180             node with unhealthy persistent databases to startup and
181             join the cluster as long as there is another node with
182             healthy persistent databases.
183           </para>
184         </listitem>
185       </varlistentry>
187       <varlistentry>
188         <term>--nlist=<parameter>FILENAME</parameter></term>
189         <listitem>
190           <para>
191             FILENAME containing a list of the private IP addresses, one
192             per line, for each node in the cluster.  This file
193             <emphasis>must be the same on each node</emphasis> in the
194             cluster.
195           </para>
196           <para>
197             Default is <envar>CTDB_BASE</envar>/nodes, so usually
198             <filename>/etc/ctdb/nodes</filename>.
199           </para>
200         </listitem>
201       </varlistentry>
203       <varlistentry>
204         <term>--no-lmaster</term>
205         <listitem>
206           <para>
207             This argument specifies that this node can NOT become an lmaster
208             for records in the database. This means that it will never show up
209             in the vnnmap. This feature is primarily used for making a cluster
210             span across a WAN link and use CTDB as a WAN-accelerator.
211           </para>
212           <para>
213             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
214             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
215             <manvolnum>7</manvolnum></citerefentry> for more
216             information.
217           </para>
218         </listitem>
219       </varlistentry>
221       <varlistentry>
222         <term>--no-recmaster</term>
223         <listitem>
224           <para>
225             This argument specifies that this node can NOT become a recmaster
226             for the database. This feature is primarily used for making a cluster
227             span across a WAN link and use CTDB as a WAN-accelerator.
228           </para>
229           <para>
230             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
231             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
232             <manvolnum>7</manvolnum></citerefentry> for more
233             information.
234           </para>
235         </listitem>
236       </varlistentry>
238       <varlistentry>
239         <term>--notification-script=<parameter>FILENAME</parameter></term>
240         <listitem>
241           <para>
242             FILENAME specifying a script to be invoked by ctdbd when
243             certain state changes occur.
244           </para>
245           <para>
246             This file is usually
247             <filename>/etc/ctdb/notify.sh</filename>.
248           </para>
249           <para>
250             Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
251             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
252             <manvolnum>7</manvolnum></citerefentry> for more
253             information.
254           </para>
255         </listitem>
256       </varlistentry>
258       <varlistentry>
259         <term>--pidfile=<parameter>FILENAME</parameter></term>
260         <listitem>
261           <para>
262             FILENAME for file containing process ID of main CTDB
263             daemon.  This file is automatically created and removed by
264             CTDB.
265           </para>
266           <para>
267             The default is to not create a PID file.
268           </para>
269         </listitem>
270       </varlistentry>
272       <varlistentry>
273         <term>--public_addresses=<parameter>FILENAME</parameter></term>
274         <listitem>
275           <para>
276             FILENAME specifying a file containing the public IP
277             addresses to use on the cluster when CTDB should use IP
278             takeover. This file contains a list of IP addresses,
279             netmasks and interfaces.  CTDB will distribute these public
280             IP addresses appropriately across the available nodes.
281           </para>
282           <para>
283             The IP addresses specified in this file can differ across
284             nodes.
285           </para>
286           <para>
287             This is usually the file
288             <filename>/etc/ctdb/public_addresses</filename>
289           </para>
290         </listitem>
291       </varlistentry>
293       <varlistentry>
294         <term>--public-interface=<parameter>INTERFACE</parameter></term>
295         <listitem>
296           <para>
297             INTERFACE on which to attach public IP addresses or on which
298             to attach the single-public-ip when used.
299           </para>
300           <para>
301             When using public IP addresses, this is only required if
302             interfaces are not explicitly specified in the public
303             addresses file.
304           </para>
305         </listitem>
306       </varlistentry>
308       <varlistentry>
309         <term>--reclock=<parameter>FILENAME</parameter></term>
310         <listitem>
311           <para>
312             FILENAME is the name of the recovery lock file stored in
313             <emphasis>shared storage</emphasis> that ctdbd uses to
314             prevent split brains from occuring.
315           </para>
316           <para>
317             It is possible to run CTDB without a recovery lock file, but
318             then there will be no protection against split brain if the
319             cluster/network becomes partitioned. Using CTDB without a
320             reclock file is strongly discouraged.
321           </para>
322         </listitem>
323       </varlistentry>
325       <varlistentry>
326         <term>--single-public-ip=<parameter>IPADDR</parameter></term>
327         <listitem>
328           <para>
329             IPADDR specifies the single IP that CTDB will use in
330             conjuction with LVS.
331           </para>
332           <para>
333             Please see the <citetitle>LVS</citetitle> section in
334             <citerefentry><refentrytitle>ctdb</refentrytitle>
335             <manvolnum>7</manvolnum></citerefentry> for more
336             information.
337           </para>
338         </listitem>
339       </varlistentry>
341       <varlistentry>
342         <term>--start-as-disabled</term>
343         <listitem>
344           <para>
345             This makes ctdbd start in the DISABLED state.
346           </para>
347           <para>
348             To allow the node to host public IP addresses and
349             services, it must be manually enabled using the
350             <command>ctdb enable</command> command.
351           </para>
352           <para>
353             Please see the <citetitle>NODE STATES</citetitle> section
354             in <citerefentry><refentrytitle>ctdb</refentrytitle>
355             <manvolnum>7</manvolnum></citerefentry> for more
356             information about the DISABLED state.
357           </para>
358         </listitem>
359       </varlistentry>
361       <varlistentry>
362         <term>--start-as-stopped</term>
363         <listitem>
364           <para>
365             This makes ctdbd start in the STOPPED state.
366           </para>
367           <para>
368             To allow the node to take part in the cluster it must be
369             manually continued with the the <command>ctdb
370             enable</command> command.
371           </para>
372           <para>
373             Please see the <citetitle>NODE STATES</citetitle> section
374             in <citerefentry><refentrytitle>ctdb</refentrytitle>
375             <manvolnum>7</manvolnum></citerefentry> for more
376             information about the STOPPED state.
377           </para>
378         </listitem>
379       </varlistentry>
381       <varlistentry>
382         <term>--syslog</term>
383         <listitem>
384           <para>
385             Send log messages to syslog instead of the CTDB logfile.
386             This option overrides --logfile.  The default is to log to
387             a file.
388           </para>
389         </listitem>
390       </varlistentry>
392       <varlistentry>
393         <term>--transport=tcp|infiniband</term>
394         <listitem>
395           <para>
396             This option specifies which transport to use for ctdbd
397             internode communications. The default is "tcp".
398           </para>
399           <para>
400             The "infiniband" support is not regularly tested.
401           </para>
402         </listitem>
403       </varlistentry>
405       <varlistentry>
406         <term>-?, --help</term>
407         <listitem>
408           <para>
409             Display a summary of options.
410           </para>
411         </listitem>
412       </varlistentry>
414     </variablelist>
415   </refsect1>
417   <refsect1>
418     <title>DEBUGGING OPTIONS</title>
420     <variablelist>
422       <varlistentry>
423         <term>-i, --interactive</term>
424         <listitem>
425           <para>
426             Enable interactive mode.  This will make ctdbd run in the
427             foreground and not detach from the terminal.  By default
428             ctdbd will detach itself and run in the background as a
429             daemon.
430           </para>
431         </listitem>
432       </varlistentry>
434       <varlistentry>
435         <term>--listen=<parameter>IPADDR</parameter></term>
436         <listitem>
437           <para>
438             This specifies which IP address that ctdbd will bind to.
439           </para>
440           <para>
441             By default ctdbd will bind to the first address it finds in
442             the <filename>/etc/ctdb/nodes</filename> file that is also
443             present on the local system.
444           </para>
445           <para>
446             This option is only required when you want to run multiple
447             ctdbd daemons/nodes on the same physical host in which case
448             there would be multiple entries in
449             <filename>/etc/ctdb/nodes</filename> that would match a
450             local interface.
451           </para>
452         </listitem>
453       </varlistentry>
455       <varlistentry>
456         <term>--nopublicipcheck</term>
457         <listitem>
458           <para>
459             This option is used when testing with multiple local
460             daemons on a single machine.  It disables checks related
461             to public IP addresses.
462           </para>
463         </listitem>
464       </varlistentry>
466       <varlistentry>
467         <term>--nosetsched</term>
468         <listitem>
469           <para>
470             This is a debugging option. This option is only used when
471             debugging ctdbd.
472           </para>
473           <para>
474             Normally ctdbd will change its scheduler to run as a
475             real-time process. This is the default mode for a normal
476             ctdbd operation to gurarantee that ctdbd always gets the CPU
477             cycles that it needs.
478           </para>
479           <para>
480             This option is used to tell ctdbd to
481             <emphasis>not</emphasis> run as a real-time process and
482             instead run ctdbd as a normal userspace process.  This is
483             useful for debugging and when you want to run ctdbd under
484             valgrind or gdb. (You don't want to attach valgrind or gdb
485             to a real-time process.)
486           </para>
487         </listitem>
488       </varlistentry>
490       <varlistentry>
491         <term>--socket=<parameter>FILENAME</parameter></term>
492         <listitem>
493           <para>
494             FILENAME specifies the name of the Unix domain socket that
495             ctdbd will create. This socket is used by local clients to
496             communicate with ctdbd.
497           </para>
498           <para>
499             The default is <filename>/tmp/ctdb.socket</filename> . You
500             only need to use this option if you plan to run multiple
501             ctdbd daemons on the same physical host, usually for
502             testing.
503           </para>
504         </listitem>
505       </varlistentry>
507       <varlistentry>
508         <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
509         <listitem>
510           <para>
511             This option sets the debug level of event script output to
512             DEBUGLEVEL.  The default is ERR (0).
513           </para>
514           <para>
515             See the <citetitle>DEBUG LEVELS</citetitle> section in
516             <citerefentry><refentrytitle>ctdb</refentrytitle>
517             <manvolnum>7</manvolnum></citerefentry> for more
518             information.
519           </para>
520         </listitem>
521       </varlistentry>
523       <varlistentry>
524         <term>--sloppy-start</term>
525         <listitem>
526           <para>
527             This is debugging option.  This speeds up the initial
528             recovery during startup at the expense of some consistency
529             checking.  <emphasis>Don't use this option in
530             production</emphasis>.
531           </para>
532         </listitem>
533       </varlistentry>
535       <varlistentry>
536         <term>--torture</term>
537         <listitem>
538           <para>
539             This option is only used for development and testing of
540             CTDB.  It adds artificial errors and failures to the
541             common codepaths in ctdbd to verify that ctdbd can recover
542             correctly from failures.
543           </para>
544           <para>
545             <emphasis>Do not use this option</emphasis> unless you are
546             developing and testing new functionality in CTDB.
547           </para>
548         </listitem>
549       </varlistentry>
551       <varlistentry>
552         <term>--valgrinding</term>
553         <listitem>
554           <para>
555             This is a debugging option. This option is only used when
556             debugging ctdbd.  This enables additional debugging
557             capabilities and implies --nosetsched.
558           </para>
559         </listitem>
560       </varlistentry>
562     </variablelist>
563   </refsect1>
565   <refsect1>
566     <title>SEE ALSO</title>
567     <para>
568       <citerefentry><refentrytitle>ctdb</refentrytitle>
569       <manvolnum>1</manvolnum></citerefentry>,
571       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
572       <manvolnum>1</manvolnum></citerefentry>,
574       <citerefentry><refentrytitle>onnode</refentrytitle>
575       <manvolnum>1</manvolnum></citerefentry>,
577       <citerefentry><refentrytitle>ctdb</refentrytitle>
578       <manvolnum>7</manvolnum></citerefentry>,
580       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
581       <manvolnum>7</manvolnum></citerefentry>,
583       <ulink url="http://ctdb.samba.org/"/>
584     </para>
585   </refsect1>
587   <refentryinfo>
588     <author>
589       <contrib>
590         This documentation was written by
591         Ronnie Sahlberg,
592         Amitay Isaacs,
593         Martin Schwenke
594       </contrib>
595     </author>
597     <copyright>
598       <year>2007</year>
599       <holder>Andrew Tridgell</holder>
600       <holder>Ronnie Sahlberg</holder>
601     </copyright>
602     <legalnotice>
603       <para>
604         This program is free software; you can redistribute it and/or
605         modify it under the terms of the GNU General Public License as
606         published by the Free Software Foundation; either version 3 of
607         the License, or (at your option) any later version.
608       </para>
609       <para>
610         This program is distributed in the hope that it will be
611         useful, but WITHOUT ANY WARRANTY; without even the implied
612         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
613         PURPOSE.  See the GNU General Public License for more details.
614       </para>
615       <para>
616         You should have received a copy of the GNU General Public
617         License along with this program; if not, see
618         <ulink url="http://www.gnu.org/licenses"/>.
619       </para>
620     </legalnotice>
621   </refentryinfo>
623 </refentry>