ctdb-tests: Drop ctdbd --event-script-dir option
[metze/samba/wip.git] / ctdb / doc / ctdbd.1.xml
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">
5
6 <refentry id="ctdbd.1">
7
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>
14
15   <refnamediv>
16     <refname>ctdbd</refname>
17     <refpurpose>The CTDB cluster daemon</refpurpose>
18   </refnamediv>
19
20   <refsynopsisdiv>
21     <cmdsynopsis>
22       <command>ctdbd</command>
23       <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
24     </cmdsynopsis>
25   </refsynopsisdiv>
26
27   <refsect1>
28     <title>DESCRIPTION</title>
29     <para>
30       ctdbd is the main CTDB daemon.
31     </para>
32
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>
38
39     <para>
40       See <citerefentry><refentrytitle>ctdb</refentrytitle>
41       <manvolnum>7</manvolnum></citerefentry> for an overview of CTDB.
42     </para>
43   </refsect1>
44
45   <refsect1>
46     <title>GENERAL OPTIONS</title>
47
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 by the logging
55             subsystem.  The default is 2.
56           </para>
57           <para>
58             See the <citetitle>DEBUG LEVELS</citetitle> section in
59             <citerefentry><refentrytitle>ctdb</refentrytitle>
60             <manvolnum>7</manvolnum></citerefentry> for more
61             information.
62           </para>
63         </listitem>
64       </varlistentry>
65
66       <varlistentry>
67         <term>--dbdir=<parameter>DIRECTORY</parameter></term>
68         <listitem>
69           <para>
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.
73           </para>
74           <para>
75             Defaults to <filename>/usr/local/var/lib/ctdb</filename>.
76           </para>
77         </listitem>
78       </varlistentry>
79
80       <varlistentry>
81         <term>--dbdir-persistent=<parameter>DIRECTORY</parameter></term>
82         <listitem>
83           <para>
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
87             filesystem.
88           </para>
89           <para>
90             Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
91           </para>
92         </listitem>
93       </varlistentry>
94
95       <varlistentry>
96         <term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
97         <listitem>
98           <para>
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.
102           </para>
103           <para>
104             Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
105           </para>
106         </listitem>
107       </varlistentry>
108
109       <varlistentry>
110         <term>--listen=<parameter>IPADDR</parameter></term>
111         <listitem>
112           <para>
113             IPADDR is the private IP address that ctdbd will bind to.
114           </para>
115           <para>
116             By default ctdbd will select the first address from the
117             nodes list that in can bind to.  See also
118             <citetitle>--nlist</citetitle>.
119           </para>
120           <para>
121             This option is only required when automatic address
122             detection can not be used.  This can be the case when
123             running multiple ctdbd daemons/nodes on the same physical
124             host (usually for testing), using InfiniBand for the
125             private network or on Linux when sysctl
126             net.ipv4.ip_nonlocal_bind=1.
127           </para>
128         </listitem>
129       </varlistentry>
130
131       <varlistentry>
132         <term>--logging=<parameter>STRING</parameter></term>
133         <listitem>
134           <para>
135             STRING specifies where ctdbd will write its log. The
136             default is
137             file:<filename>/usr/local/var/log/log.ctdb</filename>.
138           </para>
139           <para>
140             Valid values are:
141           </para>
142           <variablelist>
143             <varlistentry>
144               <term>file:<parameter>FILENAME</parameter></term>
145               <listitem>
146                 <para>
147                   FILENAME where ctdbd will write its log. This is usually
148                   <filename>/usr/local/var/log/log.ctdb</filename>.
149                 </para>
150               </listitem>
151             </varlistentry>
152             <varlistentry>
153               <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
154               <listitem>
155                 <para>
156                   CTDB will log to syslog.  By default this will use
157                   the syslog(3) API.
158                 </para>
159                 <para>
160                   Under heavy loads syslog(3) can block if the syslog
161                   daemon processes messages too slowly.  This can
162                   cause CTDB to block when logging.
163                 </para>
164                 <para>
165                   If METHOD is specified then it specifies an
166                   extension that causes logging to be done in a
167                   non-blocking mode.  Note that <emphasis>this may
168                   cause messages to be dropped</emphasis>.  METHOD
169                   must be one of:
170                 </para>
171                 <variablelist>
172                   <varlistentry>
173                     <term>nonblocking</term>
174                     <listitem>
175                       <para>
176                         CTDB will log to syslog via
177                         <filename>/dev/log</filename> in non-blocking
178                         mode.
179                       </para>
180                     </listitem>
181                   </varlistentry>
182                   <varlistentry>
183                     <term>udp</term>
184                     <listitem>
185                       <para>
186                         CTDB will log to syslog via UDP to
187                         localhost:514.  The syslog daemon must be
188                         configured to listen on (at least)
189                         localhost:514.  Most syslog daemons will log
190                         the messages with hostname "localhost" - this
191                         is a limitation of the implementation, for
192                         compatibility with more syslog daemons.
193                       </para>
194                     </listitem>
195                   </varlistentry>
196                   <varlistentry>
197                     <term>udp-rfc5424</term>
198                     <listitem>
199                       <para>
200                         As with "udp" but messages are sent in RFC5424
201                         format.  This method will log the correct
202                         hostname but is not as widely implemented in
203                         syslog daemons.
204                       </para>
205                     </listitem>
206                   </varlistentry>
207                 </variablelist>
208               </listitem>
209             </varlistentry>
210           </variablelist>
211         </listitem>
212       </varlistentry>
213
214       <varlistentry>
215         <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
216         <listitem>
217           <para>
218             NUM specifies the maximum number of health check failures
219             allowed for persistent databases during startup.
220           </para>
221           <para>
222             The default value is 0.  Setting this to non-zero allows a
223             node with unhealthy persistent databases to startup and
224             join the cluster as long as there is another node with
225             healthy persistent databases.
226           </para>
227         </listitem>
228       </varlistentry>
229
230       <varlistentry>
231         <term>--nlist=<parameter>FILENAME</parameter></term>
232         <listitem>
233           <para>
234             FILENAME containing a list of the private IP addresses, one
235             per line, for each node in the cluster.  This file
236             <emphasis>must be the same on each node</emphasis> in the
237             cluster.
238           </para>
239           <para>
240             Default is <envar>CTDB_BASE</envar>/nodes, so usually
241             <filename>/usr/local/etc/ctdb/nodes</filename>.
242           </para>
243         </listitem>
244       </varlistentry>
245
246       <varlistentry>
247         <term>--no-lmaster</term>
248         <listitem>
249           <para>
250             This argument specifies that this node can NOT become an lmaster
251             for records in the database. This means that it will never show up
252             in the vnnmap. This feature is primarily used for making a cluster
253             span across a WAN link and use CTDB as a WAN-accelerator.
254           </para>
255           <para>
256             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
257             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
258             <manvolnum>7</manvolnum></citerefentry> for more
259             information.
260           </para>
261         </listitem>
262       </varlistentry>
263
264       <varlistentry>
265         <term>--no-recmaster</term>
266         <listitem>
267           <para>
268             This argument specifies that this node can NOT become a recmaster
269             for the database. This feature is primarily used for making a cluster
270             span across a WAN link and use CTDB as a WAN-accelerator.
271           </para>
272           <para>
273             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
274             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
275             <manvolnum>7</manvolnum></citerefentry> for more
276             information.
277           </para>
278         </listitem>
279       </varlistentry>
280
281       <varlistentry>
282         <term>--notification-script=<parameter>FILENAME</parameter></term>
283         <listitem>
284           <para>
285             FILENAME specifying a script to be invoked by ctdbd when
286             certain state changes occur.
287           </para>
288           <para>
289             This file is usually
290             <filename>/usr/local/etc/ctdb/notify.sh</filename>.
291           </para>
292           <para>
293             Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
294             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
295             <manvolnum>7</manvolnum></citerefentry> for more
296             information.
297           </para>
298         </listitem>
299       </varlistentry>
300
301       <varlistentry>
302         <term>--public_addresses=<parameter>FILENAME</parameter></term>
303         <listitem>
304           <para>
305             FILENAME specifying a file containing the public IP
306             addresses to use on the cluster when CTDB should use IP
307             takeover. This file contains a list of IP addresses,
308             netmasks and interfaces.  CTDB will distribute these public
309             IP addresses appropriately across the available nodes.
310           </para>
311           <para>
312             The IP addresses specified in this file can differ across
313             nodes.
314           </para>
315           <para>
316             This is usually the file
317             <filename>/usr/local/etc/ctdb/public_addresses</filename>
318           </para>
319         </listitem>
320       </varlistentry>
321
322       <varlistentry>
323         <term>--public-interface=<parameter>INTERFACE</parameter></term>
324         <listitem>
325           <para>
326             Default INTERFACE on which to attach public IP addresses.
327           </para>
328           <para>
329             When using public IP addresses, this is only required if
330             interfaces are not explicitly specified in the public
331             addresses file.
332           </para>
333         </listitem>
334       </varlistentry>
335
336       <varlistentry>
337         <term>--reclock=<parameter>LOCK</parameter></term>
338         <listitem>
339           <para>
340             LOCK specifies the cluster-wide mutex used to detect and
341             prevent a partitioned cluster (or "split brain").
342           </para>
343           <para>
344             For information about the recovery lock please see the
345             <citetitle>RECOVERY LOCK</citetitle> section in
346             <citerefentry><refentrytitle>ctdb</refentrytitle>
347             <manvolnum>7</manvolnum></citerefentry>.
348           </para>
349         </listitem>
350       </varlistentry>
351
352       <varlistentry>
353         <term>--start-as-disabled</term>
354         <listitem>
355           <para>
356             This makes ctdbd start in the DISABLED state.
357           </para>
358           <para>
359             To allow the node to host public IP addresses and
360             services, it must be manually enabled using the
361             <command>ctdb enable</command> command.
362           </para>
363           <para>
364             Please see the <citetitle>NODE STATES</citetitle> section
365             in <citerefentry><refentrytitle>ctdb</refentrytitle>
366             <manvolnum>7</manvolnum></citerefentry> for more
367             information about the DISABLED state.
368           </para>
369         </listitem>
370       </varlistentry>
371
372       <varlistentry>
373         <term>--start-as-stopped</term>
374         <listitem>
375           <para>
376             This makes ctdbd start in the STOPPED state.
377           </para>
378           <para>
379             To allow the node to take part in the cluster it must be
380             manually continued with the the <command>ctdb
381             enable</command> command.
382           </para>
383           <para>
384             Please see the <citetitle>NODE STATES</citetitle> section
385             in <citerefentry><refentrytitle>ctdb</refentrytitle>
386             <manvolnum>7</manvolnum></citerefentry> for more
387             information about the STOPPED state.
388           </para>
389         </listitem>
390       </varlistentry>
391
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>
404
405       <varlistentry>
406         <term>-?, --help</term>
407         <listitem>
408           <para>
409             Display a summary of options.
410           </para>
411         </listitem>
412       </varlistentry>
413
414     </variablelist>
415   </refsect1>
416
417   <refsect1>
418     <title>DEBUGGING OPTIONS</title>
419
420     <variablelist>
421
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>
433
434       <varlistentry>
435         <term>--nopublicipcheck</term>
436         <listitem>
437           <para>
438             This option is used when testing with multiple local
439             daemons on a single machine.  It disables checks related
440             to public IP addresses.
441           </para>
442         </listitem>
443       </varlistentry>
444
445       <varlistentry>
446         <term>--nosetsched</term>
447         <listitem>
448           <para>
449             This is a debugging option. This option is only used when
450             debugging ctdbd.
451           </para>
452           <para>
453             Normally ctdbd will change its scheduler to run as a
454             real-time process. This is the default mode for a normal
455             ctdbd operation to gurarantee that ctdbd always gets the CPU
456             cycles that it needs.
457           </para>
458           <para>
459             This option is used to tell ctdbd to
460             <emphasis>not</emphasis> run as a real-time process and
461             instead run ctdbd as a normal userspace process.  This is
462             useful for debugging and when you want to run ctdbd under
463             valgrind or gdb. (You don't want to attach valgrind or gdb
464             to a real-time process.)
465           </para>
466         </listitem>
467       </varlistentry>
468
469       <varlistentry>
470         <term>--socket=<parameter>FILENAME</parameter></term>
471         <listitem>
472           <para>
473             FILENAME specifies the name of the Unix domain socket that
474             ctdbd will create. This socket is used by local clients to
475             communicate with ctdbd.
476           </para>
477           <para>
478             The default is <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
479             You only need to use this option if you plan to run
480             multiple ctdbd daemons on the same physical host, usually
481             for testing.
482           </para>
483         </listitem>
484       </varlistentry>
485
486       <varlistentry>
487         <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
488         <listitem>
489           <para>
490             This option sets the debug level of event script output to
491             DEBUGLEVEL.  The default is ERR.
492           </para>
493           <para>
494             See the <citetitle>DEBUG LEVELS</citetitle> section in
495             <citerefentry><refentrytitle>ctdb</refentrytitle>
496             <manvolnum>7</manvolnum></citerefentry> for more
497             information.
498           </para>
499         </listitem>
500       </varlistentry>
501
502       <varlistentry>
503         <term>--sloppy-start</term>
504         <listitem>
505           <para>
506             This is debugging option.  This speeds up the initial
507             recovery during startup at the expense of some consistency
508             checking.  <emphasis>Don't use this option in
509             production</emphasis>.
510           </para>
511         </listitem>
512       </varlistentry>
513
514       <varlistentry>
515         <term>--torture</term>
516         <listitem>
517           <para>
518             This option is only used for development and testing of
519             CTDB.  It adds artificial errors and failures to the
520             common codepaths in ctdbd to verify that ctdbd can recover
521             correctly from failures.
522           </para>
523           <para>
524             <emphasis>Do not use this option</emphasis> unless you are
525             developing and testing new functionality in CTDB.
526           </para>
527         </listitem>
528       </varlistentry>
529
530       <varlistentry>
531         <term>--valgrinding</term>
532         <listitem>
533           <para>
534             This is a debugging option. This option is only used when
535             debugging ctdbd.  This enables additional debugging
536             capabilities and implies --nosetsched.
537           </para>
538         </listitem>
539       </varlistentry>
540
541     </variablelist>
542   </refsect1>
543
544   <refsect1>
545     <title>SEE ALSO</title>
546     <para>
547       <citerefentry><refentrytitle>ctdb</refentrytitle>
548       <manvolnum>1</manvolnum></citerefentry>,
549
550       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
551       <manvolnum>1</manvolnum></citerefentry>,
552
553       <citerefentry><refentrytitle>onnode</refentrytitle>
554       <manvolnum>1</manvolnum></citerefentry>,
555
556       <citerefentry><refentrytitle>ctdb</refentrytitle>
557       <manvolnum>7</manvolnum></citerefentry>,
558
559       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
560       <manvolnum>7</manvolnum></citerefentry>,
561
562       <ulink url="http://ctdb.samba.org/"/>
563     </para>
564   </refsect1>
565
566   <refentryinfo>
567     <author>
568       <contrib>
569         This documentation was written by
570         Ronnie Sahlberg,
571         Amitay Isaacs,
572         Martin Schwenke
573       </contrib>
574     </author>
575
576     <copyright>
577       <year>2007</year>
578       <holder>Andrew Tridgell</holder>
579       <holder>Ronnie Sahlberg</holder>
580     </copyright>
581     <legalnotice>
582       <para>
583         This program is free software; you can redistribute it and/or
584         modify it under the terms of the GNU General Public License as
585         published by the Free Software Foundation; either version 3 of
586         the License, or (at your option) any later version.
587       </para>
588       <para>
589         This program is distributed in the hope that it will be
590         useful, but WITHOUT ANY WARRANTY; without even the implied
591         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
592         PURPOSE.  See the GNU General Public License for more details.
593       </para>
594       <para>
595         You should have received a copy of the GNU General Public
596         License along with this program; if not, see
597         <ulink url="http://www.gnu.org/licenses"/>.
598       </para>
599     </legalnotice>
600   </refentryinfo>
601
602 </refentry>