s3: smbd: Remove one more use of lp_posix_pathnames().
[obnox/samba/samba-obnox.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>--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>
125
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>
147
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>
230
231       <varlistentry>
232         <term>--lvs</term>
233         <listitem>
234           <para>
235             This option is used to activate the LVS capability on a CTDB
236             node.  Please see the <citetitle>LVS</citetitle> section in
237             <citerefentry><refentrytitle>ctdb</refentrytitle>
238             <manvolnum>7</manvolnum></citerefentry> for more
239             information.
240           </para>
241         </listitem>
242       </varlistentry>
243
244       <varlistentry>
245         <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
246         <listitem>
247           <para>
248             NUM specifies the maximum number of health check failures
249             allowed for persistent databases during startup.
250           </para>
251           <para>
252             The default value is 0.  Setting this to non-zero allows a
253             node with unhealthy persistent databases to startup and
254             join the cluster as long as there is another node with
255             healthy persistent databases.
256           </para>
257         </listitem>
258       </varlistentry>
259
260       <varlistentry>
261         <term>--nlist=<parameter>FILENAME</parameter></term>
262         <listitem>
263           <para>
264             FILENAME containing a list of the private IP addresses, one
265             per line, for each node in the cluster.  This file
266             <emphasis>must be the same on each node</emphasis> in the
267             cluster.
268           </para>
269           <para>
270             Default is <envar>CTDB_BASE</envar>/nodes, so usually
271             <filename>/usr/local/etc/ctdb/nodes</filename>.
272           </para>
273         </listitem>
274       </varlistentry>
275
276       <varlistentry>
277         <term>--no-lmaster</term>
278         <listitem>
279           <para>
280             This argument specifies that this node can NOT become an lmaster
281             for records in the database. This means that it will never show up
282             in the vnnmap. 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>
293
294       <varlistentry>
295         <term>--no-recmaster</term>
296         <listitem>
297           <para>
298             This argument specifies that this node can NOT become a recmaster
299             for the database. This feature is primarily used for making a cluster
300             span across a WAN link and use CTDB as a WAN-accelerator.
301           </para>
302           <para>
303             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
304             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
305             <manvolnum>7</manvolnum></citerefentry> for more
306             information.
307           </para>
308         </listitem>
309       </varlistentry>
310
311       <varlistentry>
312         <term>--notification-script=<parameter>FILENAME</parameter></term>
313         <listitem>
314           <para>
315             FILENAME specifying a script to be invoked by ctdbd when
316             certain state changes occur.
317           </para>
318           <para>
319             This file is usually
320             <filename>/usr/local/etc/ctdb/notify.sh</filename>.
321           </para>
322           <para>
323             Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
324             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
325             <manvolnum>7</manvolnum></citerefentry> for more
326             information.
327           </para>
328         </listitem>
329       </varlistentry>
330
331       <varlistentry>
332         <term>--pidfile=<parameter>FILENAME</parameter></term>
333         <listitem>
334           <para>
335             FILENAME for file containing process ID of main CTDB
336             daemon.  This file is automatically created and removed by
337             CTDB.
338           </para>
339           <para>
340             The default is to not create a PID file.
341           </para>
342         </listitem>
343       </varlistentry>
344
345       <varlistentry>
346         <term>--public_addresses=<parameter>FILENAME</parameter></term>
347         <listitem>
348           <para>
349             FILENAME specifying a file containing the public IP
350             addresses to use on the cluster when CTDB should use IP
351             takeover. This file contains a list of IP addresses,
352             netmasks and interfaces.  CTDB will distribute these public
353             IP addresses appropriately across the available nodes.
354           </para>
355           <para>
356             The IP addresses specified in this file can differ across
357             nodes.
358           </para>
359           <para>
360             This is usually the file
361             <filename>/usr/local/etc/ctdb/public_addresses</filename>
362           </para>
363         </listitem>
364       </varlistentry>
365
366       <varlistentry>
367         <term>--public-interface=<parameter>INTERFACE</parameter></term>
368         <listitem>
369           <para>
370             INTERFACE on which to attach public IP addresses or on which
371             to attach the single-public-ip when used.
372           </para>
373           <para>
374             When using public IP addresses, this is only required if
375             interfaces are not explicitly specified in the public
376             addresses file.
377           </para>
378         </listitem>
379       </varlistentry>
380
381       <varlistentry>
382         <term>--reclock=<parameter>FILE</parameter></term>
383         <listitem>
384           <para>
385             FILE is the name of the recovery lock file, stored in
386             <emphasis>shared storage</emphasis>, that CTDB uses to
387             prevent split brains.
388           </para>
389           <para>
390             For information about the recovery lock please see the
391             <citetitle>RECOVERY LOCK</citetitle> section in
392             <citerefentry><refentrytitle>ctdb</refentrytitle>
393             <manvolnum>7</manvolnum></citerefentry>.
394           </para>
395         </listitem>
396       </varlistentry>
397
398       <varlistentry>
399         <term>--single-public-ip=<parameter>IPADDR</parameter></term>
400         <listitem>
401           <para>
402             IPADDR specifies the single IP that CTDB will use in
403             conjunction with LVS.
404           </para>
405           <para>
406             Please see the <citetitle>LVS</citetitle> section in
407             <citerefentry><refentrytitle>ctdb</refentrytitle>
408             <manvolnum>7</manvolnum></citerefentry> for more
409             information.
410           </para>
411         </listitem>
412       </varlistentry>
413
414       <varlistentry>
415         <term>--start-as-disabled</term>
416         <listitem>
417           <para>
418             This makes ctdbd start in the DISABLED state.
419           </para>
420           <para>
421             To allow the node to host public IP addresses and
422             services, it must be manually enabled using the
423             <command>ctdb enable</command> command.
424           </para>
425           <para>
426             Please see the <citetitle>NODE STATES</citetitle> section
427             in <citerefentry><refentrytitle>ctdb</refentrytitle>
428             <manvolnum>7</manvolnum></citerefentry> for more
429             information about the DISABLED state.
430           </para>
431         </listitem>
432       </varlistentry>
433
434       <varlistentry>
435         <term>--start-as-stopped</term>
436         <listitem>
437           <para>
438             This makes ctdbd start in the STOPPED state.
439           </para>
440           <para>
441             To allow the node to take part in the cluster it must be
442             manually continued with the the <command>ctdb
443             enable</command> command.
444           </para>
445           <para>
446             Please see the <citetitle>NODE STATES</citetitle> section
447             in <citerefentry><refentrytitle>ctdb</refentrytitle>
448             <manvolnum>7</manvolnum></citerefentry> for more
449             information about the STOPPED state.
450           </para>
451         </listitem>
452       </varlistentry>
453
454       <varlistentry>
455         <term>--transport=tcp|infiniband</term>
456         <listitem>
457           <para>
458             This option specifies which transport to use for ctdbd
459             internode communications. The default is "tcp".
460           </para>
461           <para>
462             The "infiniband" support is not regularly tested.
463           </para>
464         </listitem>
465       </varlistentry>
466
467       <varlistentry>
468         <term>-?, --help</term>
469         <listitem>
470           <para>
471             Display a summary of options.
472           </para>
473         </listitem>
474       </varlistentry>
475
476     </variablelist>
477   </refsect1>
478
479   <refsect1>
480     <title>DEBUGGING OPTIONS</title>
481
482     <variablelist>
483
484       <varlistentry>
485         <term>-i, --interactive</term>
486         <listitem>
487           <para>
488             Enable interactive mode.  This will make ctdbd run in the
489             foreground and not detach from the terminal.  By default
490             ctdbd will detach itself and run in the background as a
491             daemon.
492           </para>
493         </listitem>
494       </varlistentry>
495
496       <varlistentry>
497         <term>--nopublicipcheck</term>
498         <listitem>
499           <para>
500             This option is used when testing with multiple local
501             daemons on a single machine.  It disables checks related
502             to public IP addresses.
503           </para>
504         </listitem>
505       </varlistentry>
506
507       <varlistentry>
508         <term>--nosetsched</term>
509         <listitem>
510           <para>
511             This is a debugging option. This option is only used when
512             debugging ctdbd.
513           </para>
514           <para>
515             Normally ctdbd will change its scheduler to run as a
516             real-time process. This is the default mode for a normal
517             ctdbd operation to gurarantee that ctdbd always gets the CPU
518             cycles that it needs.
519           </para>
520           <para>
521             This option is used to tell ctdbd to
522             <emphasis>not</emphasis> run as a real-time process and
523             instead run ctdbd as a normal userspace process.  This is
524             useful for debugging and when you want to run ctdbd under
525             valgrind or gdb. (You don't want to attach valgrind or gdb
526             to a real-time process.)
527           </para>
528         </listitem>
529       </varlistentry>
530
531       <varlistentry>
532         <term>--socket=<parameter>FILENAME</parameter></term>
533         <listitem>
534           <para>
535             FILENAME specifies the name of the Unix domain socket that
536             ctdbd will create. This socket is used by local clients to
537             communicate with ctdbd.
538           </para>
539           <para>
540             The default is <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
541             You only need to use this option if you plan to run
542             multiple ctdbd daemons on the same physical host, usually
543             for testing.
544           </para>
545         </listitem>
546       </varlistentry>
547
548       <varlistentry>
549         <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
550         <listitem>
551           <para>
552             This option sets the debug level of event script output to
553             DEBUGLEVEL.  The default is ERR (0).
554           </para>
555           <para>
556             See the <citetitle>DEBUG LEVELS</citetitle> section in
557             <citerefentry><refentrytitle>ctdb</refentrytitle>
558             <manvolnum>7</manvolnum></citerefentry> for more
559             information.
560           </para>
561         </listitem>
562       </varlistentry>
563
564       <varlistentry>
565         <term>--sloppy-start</term>
566         <listitem>
567           <para>
568             This is debugging option.  This speeds up the initial
569             recovery during startup at the expense of some consistency
570             checking.  <emphasis>Don't use this option in
571             production</emphasis>.
572           </para>
573         </listitem>
574       </varlistentry>
575
576       <varlistentry>
577         <term>--torture</term>
578         <listitem>
579           <para>
580             This option is only used for development and testing of
581             CTDB.  It adds artificial errors and failures to the
582             common codepaths in ctdbd to verify that ctdbd can recover
583             correctly from failures.
584           </para>
585           <para>
586             <emphasis>Do not use this option</emphasis> unless you are
587             developing and testing new functionality in CTDB.
588           </para>
589         </listitem>
590       </varlistentry>
591
592       <varlistentry>
593         <term>--valgrinding</term>
594         <listitem>
595           <para>
596             This is a debugging option. This option is only used when
597             debugging ctdbd.  This enables additional debugging
598             capabilities and implies --nosetsched.
599           </para>
600         </listitem>
601       </varlistentry>
602
603     </variablelist>
604   </refsect1>
605
606   <refsect1>
607     <title>SEE ALSO</title>
608     <para>
609       <citerefentry><refentrytitle>ctdb</refentrytitle>
610       <manvolnum>1</manvolnum></citerefentry>,
611
612       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
613       <manvolnum>1</manvolnum></citerefentry>,
614
615       <citerefentry><refentrytitle>onnode</refentrytitle>
616       <manvolnum>1</manvolnum></citerefentry>,
617
618       <citerefentry><refentrytitle>ctdb</refentrytitle>
619       <manvolnum>7</manvolnum></citerefentry>,
620
621       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
622       <manvolnum>7</manvolnum></citerefentry>,
623
624       <ulink url="http://ctdb.samba.org/"/>
625     </para>
626   </refsect1>
627
628   <refentryinfo>
629     <author>
630       <contrib>
631         This documentation was written by
632         Ronnie Sahlberg,
633         Amitay Isaacs,
634         Martin Schwenke
635       </contrib>
636     </author>
637
638     <copyright>
639       <year>2007</year>
640       <holder>Andrew Tridgell</holder>
641       <holder>Ronnie Sahlberg</holder>
642     </copyright>
643     <legalnotice>
644       <para>
645         This program is free software; you can redistribute it and/or
646         modify it under the terms of the GNU General Public License as
647         published by the Free Software Foundation; either version 3 of
648         the License, or (at your option) any later version.
649       </para>
650       <para>
651         This program is distributed in the hope that it will be
652         useful, but WITHOUT ANY WARRANTY; without even the implied
653         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
654         PURPOSE.  See the GNU General Public License for more details.
655       </para>
656       <para>
657         You should have received a copy of the GNU General Public
658         License along with this program; if not, see
659         <ulink url="http://www.gnu.org/licenses"/>.
660       </para>
661     </legalnotice>
662   </refentryinfo>
663
664 </refentry>