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