ctdb-tests: Switch local daemons to use new style configuration file
[samba.git] / ctdb / doc / ctdbd.conf.5.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.conf.5">
7
8   <refmeta>
9     <refentrytitle>ctdbd.conf</refentrytitle>
10     <manvolnum>5</manvolnum>
11     <refmiscinfo class="source">ctdb</refmiscinfo>
12     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13   </refmeta>
14
15   <refnamediv>
16     <refname>ctdbd.conf</refname>
17     <refpurpose>CTDB daemon configuration file</refpurpose>
18   </refnamediv>
19
20   <refsect1>
21     <title>DESCRIPTION</title>
22
23     <para>
24       This file contains CTDB configuration variables that are affect
25       the operation of CTDB.  The default location of this file is
26       <filename>/usr/local/etc/ctdb/ctdbd.conf</filename>.
27     </para>
28
29     <para>
30       This file is a shell script (see
31       <citerefentry><refentrytitle>sh</refentrytitle>
32       <manvolnum>1</manvolnum></citerefentry>) but is usually limited
33       to simple variable assignments and shell-style comments.
34     </para>
35
36     <para>
37       CTDB configuration variables are grouped into several categories below.
38     </para>
39
40     <para>
41       Variables defined in this document can also be set in a
42       distribution-specific configuration file such as
43       <filename>/etc/sysconfig/ctdb</filename> (Red Hat) or
44       <filename>/etc/default/ctdb</filename> (Debian).  However, these
45       files should be reserved for variables used by the initscript.
46       A historical alternative is
47       <filename>/usr/local/etc/ctdb/sysconfig/ctdb</filename> - this is
48       deprecated.
49     </para>
50
51   </refsect1>
52
53   <refsect1>
54     <title>
55       DAEMON CONFIGURATION
56     </title>
57
58     <para>
59       Variables in this section are processed by
60       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
61       <manvolnum>1</manvolnum></citerefentry> and are converted into
62       command-line arguments to
63       <citerefentry><refentrytitle>ctdbd</refentrytitle>
64       <manvolnum>1</manvolnum></citerefentry>.
65     </para>
66
67     <para>
68       Many of these variables are also used by event scripts.
69     </para>
70
71     <variablelist>
72
73       <varlistentry>
74         <term>CTDB_CAPABILITY_LMASTER=yes|no</term>
75         <listitem>
76           <para>
77             Defaults to yes.
78           </para>
79         </listitem>
80       </varlistentry>
81
82       <varlistentry>
83         <term>CTDB_CAPABILITY_RECMASTER=yes|no</term>
84         <listitem>
85           <para>
86             Defaults to yes.
87           </para>
88         </listitem>
89       </varlistentry>
90
91       <varlistentry>
92         <term>CTDB_DBDIR=<parameter>DIRECTORY</parameter></term>
93         <listitem>
94           <para>
95             Defaults to <filename>/usr/local/var/lib/ctdb/volatile</filename>.
96           </para>
97         </listitem>
98       </varlistentry>
99
100       <varlistentry>
101         <term>CTDB_DBDIR_PERSISTENT=<parameter>DIRECTORY</parameter></term>
102         <listitem>
103           <para>
104             Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
105           </para>
106         </listitem>
107       </varlistentry>
108
109       <varlistentry>
110         <term>CTDB_DBDIR_STATE=<parameter>DIRECTORY</parameter></term>
111         <listitem>
112           <para>
113             Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
114           </para>
115         </listitem>
116       </varlistentry>
117
118       <varlistentry>
119         <term>CTDB_DEBUG_HUNG_SCRIPT=<parameter>FILENAME</parameter></term>
120         <listitem>
121           <para>
122             FILENAME is a script to run to log debug information when
123             an event script times out.
124           </para>
125           <para>
126             Default is <filename>/usr/local/etc/ctdb/debug-hung-script.sh</filename>.
127           </para>
128         </listitem>
129       </varlistentry>
130
131       <varlistentry>
132         <term>CTDB_DEBUG_LOCKS=<parameter>FILENAME</parameter></term>
133         <listitem>
134           <para>
135             FILENAME is a script to run to log debug information when
136             an CTDB fails to freeze databases during recovery.
137           </para>
138           <para>
139             No default, usually
140             <filename>/usr/local/etc/ctdb/debug_locks.sh</filename>.
141           </para>
142         </listitem>
143       </varlistentry>
144
145       <varlistentry>
146         <term>CTDB_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
147         <listitem>
148           <para>
149             Default is NOTICE.
150           </para>
151         </listitem>
152       </varlistentry>
153
154       <varlistentry>
155         <term>CTDB_LOGGING=<parameter>STRING</parameter></term>
156         <listitem>
157           <para>
158             STRING specifies where ctdbd will write its log. The
159             default is
160             file:<filename>/usr/local/var/log/log.ctdb</filename>.
161           </para>
162           <para>
163             Valid values are:
164           </para>
165           <variablelist>
166             <varlistentry>
167               <term>file:<parameter>FILENAME</parameter></term>
168               <listitem>
169                 <para>
170                   FILENAME where ctdbd will write its log. This is usually
171                   <filename>/usr/local/var/log/log.ctdb</filename>.
172                 </para>
173               </listitem>
174             </varlistentry>
175             <varlistentry>
176               <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
177               <listitem>
178                 <para>
179                   CTDB will log to syslog.  By default this will use
180                   the syslog(3) API.
181                 </para>
182                 <para>
183                   If METHOD is specified then it specifies an
184                   extension that causes logging to be done in a
185                   non-blocking fashion.  This can be useful under
186                   heavy loads that might cause the syslog daemon to
187                   dequeue messages too slowly, which would otherwise
188                   cause CTDB to block when logging.  METHOD must be
189                   one of:
190                 </para>
191                 <variablelist>
192                   <varlistentry>
193                     <term>nonblocking</term>
194                     <listitem>
195                       <para>
196                         CTDB will log to syslog via
197                         <filename>/dev/log</filename> in non-blocking
198                         mode.
199                       </para>
200                     </listitem>
201                   </varlistentry>
202                   <varlistentry>
203                     <term>udp</term>
204                     <listitem>
205                       <para>
206                         CTDB will log to syslog via UDP to
207                         localhost:514.  The syslog daemon must be
208                         configured to listen on (at least)
209                         localhost:514.  Most implementations will log
210                         the messages against hostname "localhost" -
211                         this is a limit of the implementation for
212                         compatibility with more syslog daemon
213                         implementations.
214                       </para>
215                     </listitem>
216                   </varlistentry>
217                   <varlistentry>
218                     <term>udp-rfc5424</term>
219                     <listitem>
220                       <para>
221                         As with "udp" but messages are sent in RFC5424
222                         format.  This method will log the correct
223                         hostname but is not as widely implemented in
224                         syslog daemons.
225                       </para>
226                     </listitem>
227                   </varlistentry>
228                 </variablelist>
229               </listitem>
230             </varlistentry>
231           </variablelist>
232         </listitem>
233       </varlistentry>
234
235       <varlistentry>
236         <term>CTDB_NOSETSCHED=yes|no</term>
237         <listitem>
238           <para>
239             Defaults to no.
240           </para>
241           <para>
242             Usually CTDB runs with real-time priority.  If you are running
243             CTDB on a platform that does not support real-time priority,
244             you can set this.
245           </para>
246         </listitem>
247       </varlistentry>
248
249       <varlistentry>
250         <term>CTDB_NODE_ADDRESS=<parameter>IPADDR</parameter></term>
251         <listitem>
252           <para>
253             IPADDR is the private IP address that ctdbd will bind to.
254           </para>
255           <para>
256             By default ctdbd will select the first address from the
257             nodes list that in can bind to.  See also the
258             <citetitle>Private address</citetitle> section in
259             <citerefentry><refentrytitle>ctdb</refentrytitle>
260             <manvolnum>7</manvolnum></citerefentry>.
261           </para>
262           <para>
263             This option is only required when automatic address
264             detection can not be used.  This can be the case when
265             running multiple ctdbd daemons/nodes on the same physical
266             host (usually for testing), using InfiniBand for the
267             private network or on Linux when sysctl
268             net.ipv4.ip_nonlocal_bind=1.
269           </para>
270         </listitem>
271       </varlistentry>
272
273       <varlistentry>
274         <term>CTDB_RECOVERY_LOCK=<parameter>LOCK</parameter></term>
275         <listitem>
276           <para>
277             LOCK specifies the cluster-wide mutex used to detect and
278             prevent a partitioned cluster (or "split brain").
279           </para>
280           <para>
281             No default, but the default configuration file specifies
282             <filename>/some/place/on/shared/storage</filename>, which
283             should be change to a useful value.
284           </para>
285           <para>
286             For information about the recovery lock please see the
287             <citetitle>RECOVERY LOCK</citetitle> section in
288             <citerefentry><refentrytitle>ctdb</refentrytitle>
289             <manvolnum>7</manvolnum></citerefentry>.
290           </para>
291         </listitem>
292       </varlistentry>
293
294       <varlistentry>
295         <term>CTDB_SCRIPT_LOG_LEVEL=<parameter>DEBUGLEVEL</parameter></term>
296         <listitem>
297           <para>
298             Defaults to ERR.
299           </para>
300         </listitem>
301       </varlistentry>
302
303       <varlistentry>
304         <term>CTDB_START_AS_DISABLED=yes|no</term>
305         <listitem>
306           <para>
307             Default is no.
308           </para>
309         </listitem>
310       </varlistentry>
311
312       <varlistentry>
313         <term>CTDB_START_AS_STOPPED=yes|no</term>
314         <listitem>
315           <para>
316             Default is no.
317           </para>
318         </listitem>
319       </varlistentry>
320
321       <varlistentry>
322         <term>CTDB_TRANSPORT=tcp|infiniband</term>
323         <listitem>
324           <para>
325             Defaults to tcp.
326           </para>
327         </listitem>
328       </varlistentry>
329
330     </variablelist>
331
332   </refsect1>
333
334   <refsect1>
335     <title>FILES</title>
336
337     <simplelist>
338       <member><filename>/usr/local/etc/ctdb/ctdbd.conf</filename></member>
339       <member><filename>/etc/sysconfig/ctdb</filename></member>
340       <member><filename>/etc/default/ctdb</filename></member>
341     </simplelist>
342   </refsect1>
343
344   <refsect1>
345     <title>SEE ALSO</title>
346     <para>
347       <citerefentry><refentrytitle>ctdbd</refentrytitle>
348       <manvolnum>1</manvolnum></citerefentry>,
349
350       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
351       <manvolnum>1</manvolnum></citerefentry>,
352
353       <citerefentry><refentrytitle>onnode</refentrytitle>
354       <manvolnum>1</manvolnum></citerefentry>,
355
356       <citerefentry><refentrytitle>ctdb</refentrytitle>
357       <manvolnum>7</manvolnum></citerefentry>,
358
359       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
360       <manvolnum>7</manvolnum></citerefentry>,
361
362       <ulink url="http://ctdb.samba.org/"/>
363     </para>
364   </refsect1>
365
366   <refentryinfo>
367     <author>
368       <contrib>
369         This documentation was written by
370         Amitay Isaacs,
371         Martin Schwenke
372       </contrib>
373     </author>
374
375     <copyright>
376       <year>2007</year>
377       <holder>Andrew Tridgell</holder>
378       <holder>Ronnie Sahlberg</holder>
379     </copyright>
380     <legalnotice>
381       <para>
382         This program is free software; you can redistribute it and/or
383         modify it under the terms of the GNU General Public License as
384         published by the Free Software Foundation; either version 3 of
385         the License, or (at your option) any later version.
386       </para>
387       <para>
388         This program is distributed in the hope that it will be
389         useful, but WITHOUT ANY WARRANTY; without even the implied
390         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
391         PURPOSE.  See the GNU General Public License for more details.
392       </para>
393       <para>
394         You should have received a copy of the GNU General Public
395         License along with this program; if not, see
396         <ulink url="http://www.gnu.org/licenses"/>.
397       </para>
398     </legalnotice>
399   </refentryinfo>
400
401 </refentry>