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