6d20f595e6ed7bd78455a8b57af2e4066da744c0
[samba.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>-i, --interactive</term>
111         <listitem>
112           <para>
113             Enable interactive mode.  This will make ctdbd run in the
114             foreground and not detach from the terminal.  By default
115             ctdbd will detach itself and run in the background as a
116             daemon.
117           </para>
118         </listitem>
119       </varlistentry>
120
121       <varlistentry>
122         <term>--listen=<parameter>IPADDR</parameter></term>
123         <listitem>
124           <para>
125             IPADDR is the private IP address that ctdbd will bind to.
126           </para>
127           <para>
128             By default ctdbd will select the first address from the
129             nodes list that in can bind to.    See also the
130             <citetitle>Private address</citetitle> section in
131             <citerefentry><refentrytitle>ctdb</refentrytitle>
132             <manvolnum>7</manvolnum></citerefentry>.
133           </para>
134           <para>
135             This option is only required when automatic address
136             detection can not be used.  This can be the case when
137             running multiple ctdbd daemons/nodes on the same physical
138             host (usually for testing), using InfiniBand for the
139             private network or on Linux when sysctl
140             net.ipv4.ip_nonlocal_bind=1.
141           </para>
142         </listitem>
143       </varlistentry>
144
145       <varlistentry>
146         <term>--logging=<parameter>STRING</parameter></term>
147         <listitem>
148           <para>
149             STRING specifies where ctdbd will write its log. The
150             default is
151             file:<filename>/usr/local/var/log/log.ctdb</filename>.
152           </para>
153           <para>
154             Valid values are:
155           </para>
156           <variablelist>
157             <varlistentry>
158               <term>file:<parameter>FILENAME</parameter></term>
159               <listitem>
160                 <para>
161                   FILENAME where ctdbd will write its log. This is usually
162                   <filename>/usr/local/var/log/log.ctdb</filename>.
163                 </para>
164               </listitem>
165             </varlistentry>
166             <varlistentry>
167               <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
168               <listitem>
169                 <para>
170                   CTDB will log to syslog.  By default this will use
171                   the syslog(3) API.
172                 </para>
173                 <para>
174                   Under heavy loads syslog(3) can block if the syslog
175                   daemon processes messages too slowly.  This can
176                   cause CTDB to block when logging.
177                 </para>
178                 <para>
179                   If METHOD is specified then it specifies an
180                   extension that causes logging to be done in a
181                   non-blocking mode.  Note that <emphasis>this may
182                   cause messages to be dropped</emphasis>.  METHOD
183                   must be one of:
184                 </para>
185                 <variablelist>
186                   <varlistentry>
187                     <term>nonblocking</term>
188                     <listitem>
189                       <para>
190                         CTDB will log to syslog via
191                         <filename>/dev/log</filename> in non-blocking
192                         mode.
193                       </para>
194                     </listitem>
195                   </varlistentry>
196                   <varlistentry>
197                     <term>udp</term>
198                     <listitem>
199                       <para>
200                         CTDB will log to syslog via UDP to
201                         localhost:514.  The syslog daemon must be
202                         configured to listen on (at least)
203                         localhost:514.  Most syslog daemons will log
204                         the messages with hostname "localhost" - this
205                         is a limitation of the implementation, for
206                         compatibility with more syslog daemons.
207                       </para>
208                     </listitem>
209                   </varlistentry>
210                   <varlistentry>
211                     <term>udp-rfc5424</term>
212                     <listitem>
213                       <para>
214                         As with "udp" but messages are sent in RFC5424
215                         format.  This method will log the correct
216                         hostname but is not as widely implemented in
217                         syslog daemons.
218                       </para>
219                     </listitem>
220                   </varlistentry>
221                 </variablelist>
222               </listitem>
223             </varlistentry>
224           </variablelist>
225         </listitem>
226       </varlistentry>
227
228       <varlistentry>
229         <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
230         <listitem>
231           <para>
232             NUM specifies the maximum number of health check failures
233             allowed for persistent databases during startup.
234           </para>
235           <para>
236             The default value is 0.  Setting this to non-zero allows a
237             node with unhealthy persistent databases to startup and
238             join the cluster as long as there is another node with
239             healthy persistent databases.
240           </para>
241         </listitem>
242       </varlistentry>
243
244       <varlistentry>
245         <term>--no-lmaster</term>
246         <listitem>
247           <para>
248             This argument specifies that this node can NOT become an lmaster
249             for records in the database. This means that it will never show up
250             in the vnnmap. This feature is primarily used for making a cluster
251             span across a WAN link and use CTDB as a WAN-accelerator.
252           </para>
253           <para>
254             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
255             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
256             <manvolnum>7</manvolnum></citerefentry> for more
257             information.
258           </para>
259         </listitem>
260       </varlistentry>
261
262       <varlistentry>
263         <term>--no-recmaster</term>
264         <listitem>
265           <para>
266             This argument specifies that this node can NOT become a recmaster
267             for the database. This feature is primarily used for making a cluster
268             span across a WAN link and use CTDB as a WAN-accelerator.
269           </para>
270           <para>
271             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
272             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
273             <manvolnum>7</manvolnum></citerefentry> for more
274             information.
275           </para>
276         </listitem>
277       </varlistentry>
278
279       <varlistentry>
280         <term>--nosetsched</term>
281         <listitem>
282           <para>
283             Normally ctdbd will change its scheduler to run as a
284             real-time process. This is the default mode for a normal
285             ctdbd operation to gurarantee that ctdbd always gets the CPU
286             cycles that it needs.
287           </para>
288           <para>
289             This option is used to tell ctdbd to
290             <emphasis>not</emphasis> run as a real-time process and
291             instead run ctdbd as a normal userspace process.  This can
292             be used on a platform where real-time scheduling is not
293             supported.
294           </para>
295           <para>
296             This is also useful for debugging and when you want to run
297             ctdbd under valgrind or gdb. (You don't want to attach
298             valgrind or gdb to a real-time process.)
299           </para>
300         </listitem>
301       </varlistentry>
302
303       <varlistentry>
304         <term>--notification-script=<parameter>FILENAME</parameter></term>
305         <listitem>
306           <para>
307             FILENAME specifying a script to be invoked by ctdbd when
308             certain state changes occur.
309           </para>
310           <para>
311             This file is usually
312             <filename>/usr/local/etc/ctdb/notify.sh</filename>.
313           </para>
314           <para>
315             Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
316             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
317             <manvolnum>7</manvolnum></citerefentry> for more
318             information.
319           </para>
320         </listitem>
321       </varlistentry>
322
323       <varlistentry>
324         <term>--reclock=<parameter>LOCK</parameter></term>
325         <listitem>
326           <para>
327             LOCK specifies the cluster-wide mutex used to detect and
328             prevent a partitioned cluster (or "split brain").
329           </para>
330           <para>
331             For information about the recovery lock please see the
332             <citetitle>RECOVERY LOCK</citetitle> section in
333             <citerefentry><refentrytitle>ctdb</refentrytitle>
334             <manvolnum>7</manvolnum></citerefentry>.
335           </para>
336         </listitem>
337       </varlistentry>
338
339       <varlistentry>
340         <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
341         <listitem>
342           <para>
343             This option sets the debug level of event script output to
344             DEBUGLEVEL.  The default is ERR.
345           </para>
346           <para>
347             See the <citetitle>DEBUG LEVELS</citetitle> section in
348             <citerefentry><refentrytitle>ctdb</refentrytitle>
349             <manvolnum>7</manvolnum></citerefentry> for more
350             information.
351           </para>
352         </listitem>
353       </varlistentry>
354
355       <varlistentry>
356         <term>--start-as-disabled</term>
357         <listitem>
358           <para>
359             This makes ctdbd start in the DISABLED state.
360           </para>
361           <para>
362             To allow the node to host public IP addresses and
363             services, it must be manually enabled using the
364             <command>ctdb enable</command> command.
365           </para>
366           <para>
367             Please see the <citetitle>NODE STATES</citetitle> section
368             in <citerefentry><refentrytitle>ctdb</refentrytitle>
369             <manvolnum>7</manvolnum></citerefentry> for more
370             information about the DISABLED state.
371           </para>
372         </listitem>
373       </varlistentry>
374
375       <varlistentry>
376         <term>--start-as-stopped</term>
377         <listitem>
378           <para>
379             This makes ctdbd start in the STOPPED state.
380           </para>
381           <para>
382             To allow the node to take part in the cluster it must be
383             manually continued with the the <command>ctdb
384             enable</command> command.
385           </para>
386           <para>
387             Please see the <citetitle>NODE STATES</citetitle> section
388             in <citerefentry><refentrytitle>ctdb</refentrytitle>
389             <manvolnum>7</manvolnum></citerefentry> for more
390             information about the STOPPED state.
391           </para>
392         </listitem>
393       </varlistentry>
394
395       <varlistentry>
396         <term>--transport=tcp|infiniband</term>
397         <listitem>
398           <para>
399             This option specifies which transport to use for ctdbd
400             internode communications. The default is "tcp".
401           </para>
402           <para>
403             The "infiniband" support is not regularly tested.
404           </para>
405         </listitem>
406       </varlistentry>
407
408       <varlistentry>
409         <term>-?, --help</term>
410         <listitem>
411           <para>
412             Display a summary of options.
413           </para>
414         </listitem>
415       </varlistentry>
416
417     </variablelist>
418   </refsect1>
419
420   <refsect1>
421     <title>DEBUGGING OPTIONS</title>
422
423     <variablelist>
424
425       <varlistentry>
426         <term>--nopublicipcheck</term>
427         <listitem>
428           <para>
429             This option is used when testing with multiple local
430             daemons on a single machine.  It disables checks related
431             to public IP addresses.
432           </para>
433         </listitem>
434       </varlistentry>
435
436       <varlistentry>
437         <term>--sloppy-start</term>
438         <listitem>
439           <para>
440             This is debugging option.  This speeds up the initial
441             recovery during startup at the expense of some consistency
442             checking.  <emphasis>Don't use this option in
443             production</emphasis>.
444           </para>
445         </listitem>
446       </varlistentry>
447
448       <varlistentry>
449         <term>--torture</term>
450         <listitem>
451           <para>
452             This option is only used for development and testing of
453             CTDB.  It adds artificial errors and failures to the
454             common codepaths in ctdbd to verify that ctdbd can recover
455             correctly from failures.
456           </para>
457           <para>
458             <emphasis>Do not use this option</emphasis> unless you are
459             developing and testing new functionality in CTDB.
460           </para>
461         </listitem>
462       </varlistentry>
463
464       <varlistentry>
465         <term>--valgrinding</term>
466         <listitem>
467           <para>
468             This is a debugging option. This option is only used when
469             debugging ctdbd.  This enables additional debugging
470             capabilities and implies --nosetsched.
471           </para>
472         </listitem>
473       </varlistentry>
474
475     </variablelist>
476   </refsect1>
477
478   <refsect1>
479     <title>SEE ALSO</title>
480     <para>
481       <citerefentry><refentrytitle>ctdb</refentrytitle>
482       <manvolnum>1</manvolnum></citerefentry>,
483
484       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
485       <manvolnum>1</manvolnum></citerefentry>,
486
487       <citerefentry><refentrytitle>onnode</refentrytitle>
488       <manvolnum>1</manvolnum></citerefentry>,
489
490       <citerefentry><refentrytitle>ctdb</refentrytitle>
491       <manvolnum>7</manvolnum></citerefentry>,
492
493       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
494       <manvolnum>7</manvolnum></citerefentry>,
495
496       <ulink url="http://ctdb.samba.org/"/>
497     </para>
498   </refsect1>
499
500   <refentryinfo>
501     <author>
502       <contrib>
503         This documentation was written by
504         Ronnie Sahlberg,
505         Amitay Isaacs,
506         Martin Schwenke
507       </contrib>
508     </author>
509
510     <copyright>
511       <year>2007</year>
512       <holder>Andrew Tridgell</holder>
513       <holder>Ronnie Sahlberg</holder>
514     </copyright>
515     <legalnotice>
516       <para>
517         This program is free software; you can redistribute it and/or
518         modify it under the terms of the GNU General Public License as
519         published by the Free Software Foundation; either version 3 of
520         the License, or (at your option) any later version.
521       </para>
522       <para>
523         This program is distributed in the hope that it will be
524         useful, but WITHOUT ANY WARRANTY; without even the implied
525         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
526         PURPOSE.  See the GNU General Public License for more details.
527       </para>
528       <para>
529         You should have received a copy of the GNU General Public
530         License along with this program; if not, see
531         <ulink url="http://www.gnu.org/licenses"/>.
532       </para>
533     </legalnotice>
534   </refentryinfo>
535
536 </refentry>