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