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