abab2a4121f77461a102ac3ff35d95a020241589
[metze/samba/wip.git] / ctdb / doc / ctdbd.1.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry
3         PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4         "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5
6 <refentry id="ctdbd.1">
7
8   <refmeta>
9     <refentrytitle>ctdbd</refentrytitle>
10     <manvolnum>1</manvolnum>
11     <refmiscinfo class="source">ctdb</refmiscinfo>
12     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13   </refmeta>
14
15   <refnamediv>
16     <refname>ctdbd</refname>
17     <refpurpose>The CTDB cluster daemon</refpurpose>
18   </refnamediv>
19
20   <refsynopsisdiv>
21     <cmdsynopsis>
22       <command>ctdbd</command>
23       <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
24     </cmdsynopsis>
25   </refsynopsisdiv>
26
27   <refsect1>
28     <title>DESCRIPTION</title>
29     <para>
30       ctdbd is the main CTDB daemon.
31     </para>
32
33     <para>
34       Note that ctdbd is not usually invoked directly.  It is invoked
35       via <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
36       <manvolnum>1</manvolnum></citerefentry> or via the initscript.
37     </para>
38
39     <para>
40       See <citerefentry><refentrytitle>ctdb</refentrytitle>
41       <manvolnum>7</manvolnum></citerefentry> for an overview of CTDB.
42     </para>
43   </refsect1>
44
45   <refsect1>
46     <title>GENERAL OPTIONS</title>
47
48     <variablelist>
49       <varlistentry>
50         <term>-d, --debug=<parameter>DEBUGLEVEL</parameter></term>
51         <listitem>
52           <para>
53             This option sets the debug level to DEBUGLEVEL, which
54             controls what will be written by the logging
55             subsystem.  The default is 2.
56           </para>
57           <para>
58             See the <citetitle>DEBUG LEVELS</citetitle> section in
59             <citerefentry><refentrytitle>ctdb</refentrytitle>
60             <manvolnum>7</manvolnum></citerefentry> for more
61             information.
62           </para>
63         </listitem>
64       </varlistentry>
65
66       <varlistentry>
67         <term>--dbdir=<parameter>DIRECTORY</parameter></term>
68         <listitem>
69           <para>
70             DIRECTORY on local storage where ctdbd keeps a local copy of
71             TDB databases.  This directory is local for each node and
72             should not be stored on the shared cluster filesystem.
73           </para>
74           <para>
75             Defaults to <filename>/usr/local/var/lib/ctdb/volatile</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>--reclock=<parameter>LOCK</parameter></term>
305         <listitem>
306           <para>
307             LOCK specifies the cluster-wide mutex used to detect and
308             prevent a partitioned cluster (or "split brain").
309           </para>
310           <para>
311             For information about the recovery lock please see the
312             <citetitle>RECOVERY LOCK</citetitle> section in
313             <citerefentry><refentrytitle>ctdb</refentrytitle>
314             <manvolnum>7</manvolnum></citerefentry>.
315           </para>
316         </listitem>
317       </varlistentry>
318
319       <varlistentry>
320         <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
321         <listitem>
322           <para>
323             This option sets the debug level of event script output to
324             DEBUGLEVEL.  The default is ERR.
325           </para>
326           <para>
327             See the <citetitle>DEBUG LEVELS</citetitle> section in
328             <citerefentry><refentrytitle>ctdb</refentrytitle>
329             <manvolnum>7</manvolnum></citerefentry> for more
330             information.
331           </para>
332         </listitem>
333       </varlistentry>
334
335       <varlistentry>
336         <term>--start-as-disabled</term>
337         <listitem>
338           <para>
339             This makes ctdbd start in the DISABLED state.
340           </para>
341           <para>
342             To allow the node to host public IP addresses and
343             services, it must be manually enabled using the
344             <command>ctdb enable</command> command.
345           </para>
346           <para>
347             Please see the <citetitle>NODE STATES</citetitle> section
348             in <citerefentry><refentrytitle>ctdb</refentrytitle>
349             <manvolnum>7</manvolnum></citerefentry> for more
350             information about the DISABLED state.
351           </para>
352         </listitem>
353       </varlistentry>
354
355       <varlistentry>
356         <term>--start-as-stopped</term>
357         <listitem>
358           <para>
359             This makes ctdbd start in the STOPPED state.
360           </para>
361           <para>
362             To allow the node to take part in the cluster it must be
363             manually continued with the the <command>ctdb
364             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 STOPPED state.
371           </para>
372         </listitem>
373       </varlistentry>
374
375       <varlistentry>
376         <term>--transport=tcp|infiniband</term>
377         <listitem>
378           <para>
379             This option specifies which transport to use for ctdbd
380             internode communications. The default is "tcp".
381           </para>
382           <para>
383             The "infiniband" support is not regularly tested.
384           </para>
385         </listitem>
386       </varlistentry>
387
388       <varlistentry>
389         <term>-?, --help</term>
390         <listitem>
391           <para>
392             Display a summary of options.
393           </para>
394         </listitem>
395       </varlistentry>
396
397     </variablelist>
398   </refsect1>
399
400   <refsect1>
401     <title>SEE ALSO</title>
402     <para>
403       <citerefentry><refentrytitle>ctdb</refentrytitle>
404       <manvolnum>1</manvolnum></citerefentry>,
405
406       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
407       <manvolnum>1</manvolnum></citerefentry>,
408
409       <citerefentry><refentrytitle>onnode</refentrytitle>
410       <manvolnum>1</manvolnum></citerefentry>,
411
412       <citerefentry><refentrytitle>ctdb</refentrytitle>
413       <manvolnum>7</manvolnum></citerefentry>,
414
415       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
416       <manvolnum>7</manvolnum></citerefentry>,
417
418       <ulink url="http://ctdb.samba.org/"/>
419     </para>
420   </refsect1>
421
422   <refentryinfo>
423     <author>
424       <contrib>
425         This documentation was written by
426         Ronnie Sahlberg,
427         Amitay Isaacs,
428         Martin Schwenke
429       </contrib>
430     </author>
431
432     <copyright>
433       <year>2007</year>
434       <holder>Andrew Tridgell</holder>
435       <holder>Ronnie Sahlberg</holder>
436     </copyright>
437     <legalnotice>
438       <para>
439         This program is free software; you can redistribute it and/or
440         modify it under the terms of the GNU General Public License as
441         published by the Free Software Foundation; either version 3 of
442         the License, or (at your option) any later version.
443       </para>
444       <para>
445         This program is distributed in the hope that it will be
446         useful, but WITHOUT ANY WARRANTY; without even the implied
447         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
448         PURPOSE.  See the GNU General Public License for more details.
449       </para>
450       <para>
451         You should have received a copy of the GNU General Public
452         License along with this program; if not, see
453         <ulink url="http://www.gnu.org/licenses"/>.
454       </para>
455     </legalnotice>
456   </refentryinfo>
457
458 </refentry>