ctdb-logging: Add logging via UDP to 127.0.0.1:514 to syslog backend
[nivanova/samba-autobuild/.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>/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>/etc/ctdb/sysconfig/ctdb</filename> - this is
48       deprecated.
49     </para>
50
51   </refsect1>
52
53   <refsect1>
54     <title>
55       INITSCRIPT CONFIGURATION
56     </title>
57
58     <para>
59       Some options must be available to the initscript so they need to
60       be set in the distribution-specific initscript configuration,
61       such as <filename>/etc/sysconfig/ctdb</filename> or
62       <filename>/etc/default/ctdb</filename>.
63     </para>
64
65     <variablelist>
66
67       <varlistentry>
68         <term>CTDB_PIDFILE=<parameter>FILENAME</parameter></term>
69         <listitem>
70           <para>
71             FILENAME is the name of the file used to contain the
72             process ID (PID) of the main CTDB daemon when it is
73             running.  This is passed from the initscript to
74             <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
75             <manvolnum>1</manvolnum></citerefentry>.
76           </para>
77
78           <para>
79             Default is <filename>/var/run/ctdb/ctdbd.pid</filename>.
80             Corresponds to <option>--pidfile</option>.
81           </para>
82         </listitem>
83       </varlistentry>
84
85     </variablelist>
86   </refsect1>
87
88   <refsect1>
89     <title>
90       GLOBAL CONFIGURATION
91     </title>
92
93     <para>
94       These options may be used in the initscripts, daemon and
95       scripts.
96     </para>
97
98     <variablelist>
99
100       <varlistentry>
101         <term>CTDB_BASE=<parameter>DIRECTORY</parameter></term>
102         <listitem>
103           <para>
104             DIRECTORY containing CTDB scripts and configuration files.
105           </para>
106         </listitem>
107       </varlistentry>
108
109       <varlistentry>
110         <term>CTDB_VARDIR=<parameter>DIRECTORY</parameter></term>
111         <listitem>
112           <para>
113             DIRECTORY containing CTDB files that are modified at
114             runtime.
115           </para>
116           <para>
117             Defaults to <filename>/var/ctdb</filename>, unless
118             <filename>/var/lib/ctdb</filename> already exists in which
119             case it is used.
120           </para>
121         </listitem>
122       </varlistentry>
123
124
125     </variablelist>
126   </refsect1>
127
128   <refsect1>
129     <title>
130       DAEMON CONFIGURATION
131     </title>
132
133     <para>
134       Variables in this section are processed by
135       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
136       <manvolnum>1</manvolnum></citerefentry> and are converted into
137       command-line arguments to
138       <citerefentry><refentrytitle>ctdbd</refentrytitle>
139       <manvolnum>1</manvolnum></citerefentry>.  Correspondence with
140       <citerefentry><refentrytitle>ctdbd</refentrytitle>
141       <manvolnum>1</manvolnum></citerefentry> options is shown for
142       each variable.  The the documentation for the relevant options
143       for more details.
144     </para>
145
146     <para>
147       Many of these variables are also used by event scripts.
148     </para>
149
150     <variablelist>
151
152       <varlistentry>
153         <term>CTDB_CAPABILITY_LMASTER=yes|no</term>
154         <listitem>
155           <para>
156             Defaults to yes.  Corresponds to <option>--no-lmaster</option>.
157           </para>
158         </listitem>
159       </varlistentry>
160
161       <varlistentry>
162         <term>CTDB_CAPABILITY_RECMASTER=yes|no</term>
163         <listitem>
164           <para>
165             Defaults to yes.  Corresponds to
166             <option>--no-recmaster</option>.
167           </para>
168         </listitem>
169       </varlistentry>
170
171       <varlistentry>
172         <term>CTDB_DBDIR=<parameter>DIRECTORY</parameter></term>
173         <listitem>
174           <para>
175             Defaults to <varname>CTDB_VARDIR</varname>.  Corresponds to
176             <option>--dbdir</option>.
177           </para>
178         </listitem>
179       </varlistentry>
180
181       <varlistentry>
182         <term>CTDB_DBDIR_PERSISTENT=<parameter>DIRECTORY</parameter></term>
183         <listitem>
184           <para>
185             Defaults to <varname>CTDB_VARDIR</varname>/persistent.
186             Corresponds to <option>--dbdir-persistent</option>.
187           </para>
188         </listitem>
189       </varlistentry>
190
191       <varlistentry>
192         <term>CTDB_DBDIR_STATE=<parameter>DIRECTORY</parameter></term>
193         <listitem>
194           <para>
195             Defaults to <varname>CTDB_VARDIR</varname>/state.
196             Corresponds to <option>--dbdir-state</option>.
197           </para>
198         </listitem>
199       </varlistentry>
200
201       <varlistentry>
202         <term>CTDB_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
203         <listitem>
204           <para>
205             Default is ERR (0).  Corresponds to <option>-d</option> or
206             <option>--debug</option>.
207           </para>
208         </listitem>
209       </varlistentry>
210
211       <varlistentry>
212         <term>CTDB_EVENT_SCRIPT_DIR=<parameter>DIRECTORY</parameter></term>
213         <listitem>
214           <para>
215             Default is <varname>CTDB_BASE</varname>/events.d, so usually
216             <filename>/etc/ctdb/events.d</filename>.  Corresponds to
217             <option>--event-script-dir</option>.
218           </para>
219         </listitem>
220       </varlistentry>
221
222       <varlistentry>
223         <term>CTDB_LOGGING=<parameter>STRING</parameter></term>
224         <listitem>
225           <para>
226             STRING specifies where ctdbd will write its log. The
227             default is file:<filename>/var/log/log.ctdb</filename> or
228             similar - the prefix may differ depending on how CTDB was
229             built.  Corresponds to <option>--logging</option>.
230           </para>
231           <para>
232             Valid values are:
233           </para>
234           <variablelist>
235             <varlistentry>
236               <term>file:<parameter>FILENAME</parameter></term>
237               <listitem>
238                 <para>
239                   FILENAME where ctdbd will write its log. This is usually
240                   <filename>/var/log/log.ctdb</filename>.
241                 </para>
242               </listitem>
243             </varlistentry>
244             <varlistentry>
245               <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
246               <listitem>
247                 <para>
248                   CTDB will log to syslog.  By default this will use
249                   the syslog(3) API.
250                 </para>
251                 <para>
252                   If METHOD is specified then it specifies an
253                   extension that causes logging to be done in a
254                   non-blocking fashion.  This can be useful under
255                   heavy loads that might cause the syslog daemon to
256                   dequeue messages too slowly, which would otherwise
257                   cause CTDB to block when logging.  METHOD must be
258                   one of:
259                 </para>
260                 <variablelist>
261                   <varlistentry>
262                     <term>nonblocking</term>
263                     <listitem>
264                       <para>
265                         CTDB will log to syslog via
266                         <filename>/dev/log</filename> in non-blocking
267                         mode.
268                       </para>
269                     </listitem>
270                   </varlistentry>
271                   <varlistentry>
272                     <term>udp</term>
273                     <listitem>
274                       <para>
275                         CTDB will log to syslog via UDP to
276                         localhost:514.  The syslog daemon must be
277                         configured to listen on (at least)
278                         localhost:514.  Most implementations will log
279                         the messages against hostname "localhost" -
280                         this is a limit of the implementation for
281                         compatibility with more syslog daemon
282                         implementations.
283                       </para>
284                     </listitem>
285                   </varlistentry>
286                 </variablelist>
287               </listitem>
288             </varlistentry>
289           </variablelist>
290         </listitem>
291       </varlistentry>
292
293       <varlistentry>
294         <term>CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter></term>
295         <listitem>
296           <para>
297             No default.  Corresponds to "<option>--lvs</option>
298             <option>--single-public-ip IPADDR"</option>.
299           </para>
300         </listitem>
301       </varlistentry>
302
303       <varlistentry>
304         <term>CTDB_NODES=<parameter>FILENAME</parameter></term>
305         <listitem>
306           <para>
307             Default is <varname>CTDB_BASE</varname>/nodes, so usually
308             <filename>/etc/ctdb/nodes</filename>.  Corresponds to
309             <option>--nlist</option>.
310           </para>
311         </listitem>
312       </varlistentry>
313
314       <varlistentry>
315         <term>CTDB_NOTIFY_SCRIPT=<parameter>FILENAME</parameter></term>
316         <listitem>
317           <para>
318             No default, usually
319             <filename>/etc/ctdb/notify.sh</filename>.  Corresponds to
320             <option>--notification-script</option>.
321           </para>
322         </listitem>
323       </varlistentry>
324
325       <varlistentry>
326         <term>CTDB_MAX_PERSISTENT_CHECK_ERRORS=<parameter>NUM</parameter></term>
327         <listitem>
328           <para>
329             Default 0.  Corresponds to
330             <option>--max-persistent-check-errors</option>.
331           </para>
332         </listitem>
333       </varlistentry>
334
335       <varlistentry>
336         <term>CTDB_PUBLIC_ADDRESSES=<parameter>FILENAME</parameter></term>
337         <listitem>
338           <para>
339             No default, usually
340             <filename>/etc/ctdb/public_addresses</filename>.
341             Corresponds to <option>--public-addresses</option>.
342           </para>
343         </listitem>
344       </varlistentry>
345
346       <varlistentry>
347         <term>CTDB_PUBLIC_INTERFACE=<parameter>INTERFACE</parameter></term>
348         <listitem>
349           <para>
350             No default.  Corresponds to
351             <option>--public-interface</option>.
352           </para>
353         </listitem>
354       </varlistentry>
355
356       <varlistentry>
357         <term>CTDB_RECOVERY_LOCK=<parameter>FILENAME</parameter></term>
358         <listitem>
359           <para>
360             Defaults to
361             <filename>/some/place/on/shared/storage</filename>, which
362             should be change to a useful value.  Corresponds to
363             <option>--reclock</option>.
364           </para>
365         </listitem>
366       </varlistentry>
367
368       <varlistentry>
369         <term>CTDB_SCRIPT_LOG_LEVEL=<parameter>DEBUGLEVEL</parameter></term>
370         <listitem>
371           <para>
372             Defaults to ERR (0).  Corresponds to
373             <option>--script-log-level</option>.
374           </para>
375         </listitem>
376       </varlistentry>
377
378       <varlistentry>
379         <term>CTDB_SOCKET=<parameter>FILENAME</parameter></term>
380         <listitem>
381           <para>
382             Defaults to <filename>/tmp/ctdb.socket</filename>.
383             Corresponds to <option>--socket</option>.
384           </para>
385           <para>
386             If you change this then you probably want to set this in
387             root's enviroment (perhaps in a file in
388             <filename>/etc/profile.d</filename>) so that you can use
389             the <citerefentry><refentrytitle>ctdb</refentrytitle>
390             <manvolnum>1</manvolnum></citerefentry> command in a
391             straightforward manner.
392           </para>
393         </listitem>
394       </varlistentry>
395
396       <varlistentry>
397         <term>CTDB_START_AS_DISABLED=yes|no</term>
398         <listitem>
399           <para>
400             Default is no.  Corresponds to
401             <option>--start-as-disabled</option>.
402           </para>
403         </listitem>
404       </varlistentry>
405
406       <varlistentry>
407         <term>CTDB_START_AS_STOPPED=yes|no</term>
408         <listitem>
409           <para>
410             Default is no.  Corresponds to
411             <option>--start-as-stopped</option>.
412           </para>
413         </listitem>
414       </varlistentry>
415
416       <varlistentry>
417         <term>CTDB_TRANSPORT=tcp|infiniband</term>
418         <listitem>
419           <para>
420             Defaults to tcp.  Corresponds to
421             <option>--transport</option>.
422           </para>
423         </listitem>
424       </varlistentry>
425
426     </variablelist>
427
428     <para>
429       While the following variables do not translate into daemon
430       options they are used by
431       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
432       <manvolnum>1</manvolnum></citerefentry> when starting and
433       stopping <citerefentry><refentrytitle>ctdbd</refentrytitle>
434       <manvolnum>1</manvolnum></citerefentry>.
435     </para>
436
437     <variablelist>
438
439       <varlistentry>
440         <term>CTDB_SHUTDOWN_TIMEOUT=<parameter>NUM</parameter></term>
441         <listitem>
442           <para>
443             NUM is the number of seconds to wait for
444             <citerefentry><refentrytitle>ctdbd</refentrytitle>
445             <manvolnum>1</manvolnum></citerefentry> to shut down
446             gracefully before giving up and killing it.
447           </para>
448
449           <para>
450             Defaults is 30.
451           </para>
452         </listitem>
453       </varlistentry>
454
455       <varlistentry>
456         <term>CTDB_STARTUP_TIMEOUT=<parameter>NUM</parameter></term>
457         <listitem>
458           <para>
459             NUM is the number of seconds to wait for
460             <citerefentry><refentrytitle>ctdbd</refentrytitle>
461             <manvolnum>1</manvolnum></citerefentry> complete early
462             initialisation up to a point where it is unlikely to
463             abort.  If <command>ctdbd</command> doesn't complete the
464             "setup" event before this timeout then it is killed.
465           </para>
466
467           <para>
468             Defaults is 10.
469           </para>
470         </listitem>
471       </varlistentry>
472
473     </variablelist>
474   </refsect1>
475
476   <refsect1>
477     <title>NETWORK CONFIGURATION</title>
478
479     <refsect2>
480       <title>NAT GATEWAY</title>
481
482       <para>
483         NAT gateway is used to configure fallback routing for nodes
484         when they do not host any public IP addresses.  For example,
485         it allows unhealthy nodes to reliably communicate with
486         external infrastructure.  One node in a NAT gateway group will
487         be designated as the NAT gateway master node and other (slave)
488         nodes will be configured with fallback routes via the NAT
489         gateway master node.  For more information, see the
490         <citetitle>NAT GATEWAY</citetitle> section in
491         <citerefentry><refentrytitle>ctdb</refentrytitle>
492         <manvolnum>7</manvolnum></citerefentry>.
493       </para>
494
495       <variablelist>
496
497         <varlistentry>
498           <term>CTDB_NATGW_DEFAULT_GATEWAY=<parameter>IPADDR</parameter></term>
499           <listitem>
500             <para>
501               IPADDR is an alternate network gateway to use on the NAT
502               gateway master node.  If set, a fallback default route
503               is added via this network gateway.
504             </para>
505             <para>
506               No default.  Setting this variable is optional - if not
507               set that no route is created on the NAT gateway master
508               node.
509             </para>
510           </listitem>
511         </varlistentry>
512
513         <varlistentry>
514           <term>CTDB_NATGW_NODES=<parameter>FILENAME</parameter></term>
515           <listitem>
516             <para>
517               FILENAME contains the list of nodes that belong to the
518               same NAT gateway group.
519             </para>
520             <para>
521               File format:
522               <screen>
523 <parameter>IPADDR</parameter>
524               </screen>
525             </para>
526             <para>
527               No default, usually
528               <filename>/etc/ctdb/natgw_nodes</filename> when enabled.
529             </para>
530           </listitem>
531         </varlistentry>
532
533         <varlistentry>
534           <term>CTDB_NATGW_PRIVATE_NETWORK=<parameter>IPADDR/MASK</parameter></term>
535           <listitem>
536             <para>
537               IPADDR/MASK is the private sub-network that is
538               internally routed via the NAT gateway master node.  This
539               is usually the private network that is used for node
540               addresses.
541             </para>
542             <para>
543               No default.
544             </para>
545           </listitem>
546         </varlistentry>
547
548         <varlistentry>
549           <term>CTDB_NATGW_PUBLIC_IFACE=<parameter>IFACE</parameter></term>
550           <listitem>
551             <para>
552               IFACE is the network interface on which the
553               CTDB_NATGW_PUBLIC_IP will be configured.
554             </para>
555             <para>
556               No default.
557             </para>
558           </listitem>
559         </varlistentry>
560
561         <varlistentry>
562           <term>CTDB_NATGW_PUBLIC_IP=<parameter>IPADDR/MASK</parameter></term>
563           <listitem>
564             <para>
565               IPADDR/MASK indicates the IP address that is used for
566               outgoing traffic (originating from
567               CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
568               node.  This <emphasis>must not</emphasis> be a
569               configured public IP address.
570             </para>
571             <para>
572               No default.
573             </para>
574           </listitem>
575         </varlistentry>
576
577         <varlistentry>
578           <term>CTDB_NATGW_SLAVE_ONLY=yes|no</term>
579           <listitem>
580             <para>
581               When set to "yes" a node can not be a NAT gateway master
582               node.  In this case
583               <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and
584               <varname>CTDB_NATGW_PUBLIC_IP</varname> are optional
585               and unused.
586             </para>
587             <para>
588               Default is no.
589             </para>
590           </listitem>
591         </varlistentry>
592
593         <varlistentry>
594           <term>CTDB_NATGW_STATIC_ROUTES=<parameter>IPADDR/MASK[@GATEWAY]</parameter> ...</term>
595           <listitem>
596             <para>
597               Each IPADDR/MASK identifies a network or host to which
598               NATGW should create a fallback route, instead of
599               creating a single default route.  This can be used when
600               there is already a default route, via an interface that
601               can not reach required infrastructure, that overrides
602               the NAT gateway default route.
603             </para>
604             <para>
605               If GATEWAY is specified then the corresponding route on
606               the NATGW master node will be via GATEWAY.  Such routes
607               are created even if
608               <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is not
609               specified.  If GATEWAY is not specified for some
610               networks then routes are only created on the NATGW
611               master node for those networks if
612               <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
613               specified.
614             </para>
615             <para>
616               This should be used with care to avoid causing traffic
617               to unnecessarily double-hop through the NAT gateway
618               master, even when a node is hosting public IP addresses.
619               Each specified network or host should probably have a
620               corresponding automatically created link route or static
621               route to avoid this.
622             </para>
623             <para>
624               No default.
625             </para>
626           </listitem>
627         </varlistentry>
628
629       </variablelist>
630
631       <refsect3>
632         <title>Example</title>
633         <screen>
634 CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
635 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
636 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
637 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
638 CTDB_NATGW_PUBLIC_IFACE=eth0
639         </screen>
640
641         <para>
642           A variation that ensures that infrastructure (ADS, DNS, ...)
643           directly attached to the public network (10.0.0.0/24) is
644           always reachable would look like this:
645         </para>
646         <screen>
647 CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
648 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
649 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
650 CTDB_NATGW_PUBLIC_IFACE=eth0
651 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
652         </screen>
653         <para>
654           Note that <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
655           not specified.
656         </para>
657       </refsect3>
658
659     </refsect2>
660
661     <refsect2>
662       <title>POLICY ROUTING</title>
663
664       <para>
665         A node running CTDB may be a component of a complex network
666         topology.  In particular, public addresses may be spread
667         across several different networks (or VLANs) and it may not be
668         possible to route packets from these public addresses via the
669         system's default route.  Therefore, CTDB has support for
670         policy routing via the <filename>13.per_ip_routing</filename>
671         eventscript.  This allows routing to be specified for packets
672         sourced from each public address.  The routes are added and
673         removed as CTDB moves public addresses between nodes.
674       </para>
675
676       <para>
677         For more information, see the <citetitle>POLICY
678         ROUTING</citetitle> section in
679         <citerefentry><refentrytitle>ctdb</refentrytitle>
680         <manvolnum>7</manvolnum></citerefentry>.
681       </para>
682
683       <variablelist>
684         <varlistentry>
685           <term>CTDB_PER_IP_ROUTING_CONF=<parameter>FILENAME</parameter></term>
686           <listitem>
687             <para>
688               FILENAME contains elements for constructing the desired
689               routes for each source address.
690             </para>
691
692             <para>
693               The special FILENAME value
694               <constant>__auto_link_local__</constant> indicates that no
695               configuration file is provided and that CTDB should
696               generate reasonable link-local routes for each public IP
697               address.
698             </para>
699
700             <para>
701               File format:
702               <screen>
703 <parameter>IPADDR</parameter> <parameter>DEST-IPADDR/MASK</parameter> <optional><parameter>GATEWAY-IPADDR</parameter></optional>
704               </screen>
705             </para>
706
707             <para>
708               No default, usually
709               <filename>/etc/ctdb/policy_routing</filename> when enabled.
710             </para>
711           </listitem>
712         </varlistentry>
713
714         <varlistentry>
715           <term>CTDB_PER_IP_ROUTING_RULE_PREF=<parameter>NUM</parameter></term>
716         <listitem>
717           <para>
718             NUM sets the priority (or preference) for the routing
719             rules that are added by CTDB.
720           </para>
721
722           <para>
723             This should be (strictly) greater than 0 and (strictly)
724             less than 32766.  A priority of 100 is recommended, unless
725             this conflicts with a priority already in use on the
726             system.  See
727             <citerefentry><refentrytitle>ip</refentrytitle>
728             <manvolnum>8</manvolnum></citerefentry>, for more details.
729           </para>
730         </listitem>
731         </varlistentry>
732
733         <varlistentry>
734           <term>
735             CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<parameter>LOW-NUM</parameter>,
736             CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<parameter>HIGH-NUM</parameter>
737           </term>
738           <listitem>
739             <para>
740               CTDB determines a unique routing table number to use for
741               the routing related to each public address.  LOW-NUM and
742               HIGH-NUM indicate the minimum and maximum routing table
743               numbers that are used.
744             </para>
745
746             <para>
747               <citerefentry><refentrytitle>ip</refentrytitle>
748               <manvolnum>8</manvolnum></citerefentry> uses some
749               reserved routing table numbers below 255.  Therefore,
750               CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
751               greater than 255.
752             </para>
753
754             <para>
755               CTDB uses the standard file
756               <filename>/etc/iproute2/rt_tables</filename> to maintain
757               a mapping between the routing table numbers and labels.
758               The label for a public address
759               <replaceable>ADDR</replaceable> will look like
760               ctdb.<replaceable>addr</replaceable>.  This means that
761               the associated rules and routes are easy to read (and
762               manipulate).
763             </para>
764
765             <para>
766               No default, usually 1000 and 9000.
767             </para>
768           </listitem>
769         </varlistentry>
770       </variablelist>
771
772       <refsect3>
773         <title>Example</title>
774         <screen>
775 CTDB_PER_IP_ROUTING_CONF=/etc/ctdb/policy_routing
776 CTDB_PER_IP_ROUTING_RULE_PREF=100
777 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
778 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
779         </screen>
780       </refsect3>
781
782     </refsect2>
783
784     <refsect2>
785       <title>MISCELLANEOUS NETWORK CONFIGURATION</title>
786
787       <variablelist>
788
789         <varlistentry>
790           <term>CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no</term>
791           <listitem>
792             <para>
793               Whether one or more offline interfaces should cause a
794               monitor event to fail if there are other interfaces that
795               are up.  If this is "yes" and a node has some interfaces
796               that are down then <command>ctdb status</command> will
797               display the node as "PARTIALLYONLINE".
798             </para>
799
800             <para>
801               Default is "no".
802             </para>
803           </listitem>
804         </varlistentry>
805
806       </variablelist>
807     </refsect2>
808
809   </refsect1>
810
811   <refsect1>
812     <title>SERVICE CONFIGURATION</title>
813
814     <para>
815       CTDB can be configured to manage and/or monitor various NAS (and
816       other) services via its eventscripts.
817     </para>
818
819     <para>
820       In the simplest case CTDB will manage a service.  This means the
821       service will be started and stopped along with CTDB, CTDB will
822       monitor the service and CTDB will do any required
823       reconfiguration of the service when public IP addresses are
824       failed over.
825     </para>
826
827     <refsect2>
828       <title>SAMBA</title>
829
830       <refsect3>
831         <title>Eventscripts</title>
832
833         <simplelist>
834           <member><filename>49.winbind</filename></member>
835           <member><filename>50.samba</filename></member>
836         </simplelist>
837       </refsect3>
838
839       <variablelist>
840
841         <varlistentry>
842           <term>CTDB_MANAGES_SAMBA=yes|no</term>
843           <listitem>
844             <para>
845               Should CTDB manage Samba?
846             </para>
847             <para>
848               Default is no.
849             </para>
850           </listitem>
851         </varlistentry>
852
853         <varlistentry>
854           <term>CTDB_MANAGES_WINBIND=yes|no</term>
855           <listitem>
856             <para>
857               Should CTDB manage Winbind?
858             </para>
859             <para>
860               Default is no.
861             </para>
862           </listitem>
863         </varlistentry>
864
865         <varlistentry>
866           <term>CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter></term>
867           <listitem>
868             <para>
869               When monitoring Samba, check TCP ports in
870               space-separated PORT-LIST.
871             </para>
872             <para>
873               Default is to monitor ports that Samba is configured to listen on.
874             </para>
875           </listitem>
876         </varlistentry>
877
878         <varlistentry>
879           <term>CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no</term>
880           <listitem>
881             <para>
882               As part of monitoring, should CTDB skip the check for
883               the existence of each directory configured as share in
884               Samba.  This may be desirable if there is a large number
885               of shares.
886             </para>
887             <para>
888               Default is no.
889             </para>
890           </listitem>
891         </varlistentry>
892
893         <varlistentry>
894           <term>CTDB_SERVICE_NMB=<parameter>SERVICE</parameter></term>
895           <listitem>
896             <para>
897               Distribution specific SERVICE for managing nmbd.
898             </para>
899             <para>
900               Default is distribution-dependant.
901             </para>
902           </listitem>
903         </varlistentry>
904         <varlistentry>
905           <term>CTDB_SERVICE_SMB=<parameter>SERVICE</parameter></term>
906           <listitem>
907             <para>
908               Distribution specific SERVICE for managing smbd.
909             </para>
910             <para>
911               Default is distribution-dependant.
912             </para>
913           </listitem>
914         </varlistentry>
915
916         <varlistentry>
917           <term>CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter></term>
918           <listitem>
919             <para>
920               Distribution specific SERVICE for managing winbindd.
921             </para>
922             <para>
923               Default is "winbind".
924             </para>
925           </listitem>
926         </varlistentry>
927
928       </variablelist>
929
930     </refsect2>
931
932     <refsect2>
933       <title>NFS</title>
934
935       <para>
936         This includes parameters for the kernel NFS server and the
937         user-space
938         <ulink url="https://github.com/nfs-ganesha/nfs-ganesha/wiki">NFS-Ganesha</ulink>
939         server.
940       </para>
941
942       <refsect3>
943         <title>Eventscripts</title>
944
945         <simplelist>
946           <member><filename>60.nfs</filename></member>
947           <member><filename>60.ganesha</filename></member>
948         </simplelist>
949       </refsect3>
950
951       <variablelist>
952
953         <varlistentry>
954           <term>CTDB_CLUSTER_FILESYSTEM_TYPE=gpfs</term>
955           <listitem>
956             <para>
957               The type of cluster filesystem to use with NFS-ganesha.
958               Currently only "gpfs" is supported.
959             </para>
960             <para>
961               Default is "gpfs".
962             </para>
963           </listitem>
964         </varlistentry>
965
966         <varlistentry>
967           <term>CTDB_GANESHA_REC_SUBDIR<parameter>SUBDIR</parameter></term>
968           <listitem>
969             <para>
970               SUBDIR is the name of a top-level subdirectory in the
971               first cluster filesystem.  This subdirectory is used to
972               allow communication between NFS-Ganesha and the
973               <filename>60.ganesha</filename> script.
974             </para>
975             <para>
976               Default is ".ganesha".
977             </para>
978           </listitem>
979         </varlistentry>
980
981         <varlistentry>
982           <term>CTDB_MANAGES_NFS=yes|no</term>
983           <listitem>
984             <para>
985               Should CTDB manage NFS?
986             </para>
987             <para>
988               Default is no.
989             </para>
990           </listitem>
991         </varlistentry>
992
993         <varlistentry>
994           <term>CTDB_MONITOR_NFS_THREAD_COUNT=yes|no</term>
995           <listitem>
996             <para>
997               Whether to monitor the NFS kernel server thread count.
998             </para>
999             <para>
1000               This works around a limitation in some NFS initscripts
1001               where some threads can be stuck in host filesystem calls
1002               (perhaps due to slow storage), a restart occurs, some
1003               threads don't exit, the start only adds the missing
1004               number of threads, the stuck threads exit, and the
1005               result is a lower than expected thread count.  Note that
1006               if you must also set <varname>RPCNFSDCOUNT</varname>
1007               (RedHat/Debian) or <varname>USE_KERNEL_NFSD_NUMBER</varname>
1008               (SUSE) in your NFS configuration so the monitoring code
1009               knows how many threads there should be - if neither of
1010               these are set then this option will be ignored.
1011             </para>
1012             <para>
1013               Default is no.
1014             </para>
1015           </listitem>
1016         </varlistentry>
1017
1018         <varlistentry>
1019           <term>CTDB_NFS_DUMP_STUCK_THREADS=<parameter>NUM</parameter></term>
1020           <listitem>
1021             <para>
1022               NUM is the number of NFS kernel server threads to dump
1023               stack traces for if some are still alive after stopping
1024               NFS during a restart.
1025             </para>
1026             <para>
1027               Default is 5.  Set this to 0 to disable this feature.
1028             </para>
1029           </listitem>
1030         </varlistentry>
1031
1032         <varlistentry>
1033           <term>CTDB_NFS_SERVER_MODE=kernel|ganesha</term>
1034           <listitem>
1035             <para>
1036               Selects which NFS server to be managed.
1037             </para>
1038             <para>
1039               This replaces the deprecated variable
1040               <varname>NFS_SERVER_MODE</varname>.
1041             </para>
1042             <para>
1043               Default is "kernel".
1044             </para>
1045           </listitem>
1046         </varlistentry>
1047
1048         <varlistentry>
1049           <term>CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK=yes|no</term>
1050           <listitem>
1051             <para>
1052               During monitoring, should CTDB skip the
1053               <command>rpcinfo</command> check that is used to see if
1054               the NFS kernel server is functional.
1055             </para>
1056             <para>
1057               Default is no.
1058             </para>
1059           </listitem>
1060         </varlistentry>
1061
1062         <varlistentry>
1063           <term>CTDB_NFS_SKIP_SHARE_CHECK=yes|no</term>
1064           <listitem>
1065             <para>
1066               As part of monitoring, should CTDB skip the check for
1067               the existence of each directory exported via NFS.  This
1068               may be desirable if there is a large number of exports.
1069             </para>
1070             <para>
1071               Default is no.
1072             </para>
1073           </listitem>
1074         </varlistentry>
1075
1076         <varlistentry>
1077           <term>CTDB_RPCINFO_LOCALHOST=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1078           <listitem>
1079             <para>
1080               IPADDR or HOSTNAME indicates the address that
1081               <command>rpcinfo</command> should connect to when doing
1082               <command>rpcinfo</command> check on RPC service during
1083               monitoring.  Optimally this would be "localhost".
1084               However, this can add some performance overheads.
1085             </para>
1086             <para>
1087               Default is "127.0.0.1".
1088             </para>
1089           </listitem>
1090         </varlistentry>
1091
1092         <varlistentry>
1093           <term>CTDB_SKIP_GANESHA_NFSD_CHECK=yes|no</term>
1094           <listitem>
1095             <para>
1096               As part of monitoring, should CTDB skip the check for
1097               the existence of each directory exported via
1098               NFS-Ganesha.  This may be desirable if there is a large
1099               number of exports.
1100             </para>
1101             <para>
1102               Default is no.
1103             </para>
1104           </listitem>
1105         </varlistentry>
1106
1107       </variablelist>
1108
1109     </refsect2>
1110
1111     <refsect2>
1112       <title>APACHE HTTPD</title>
1113
1114       <para>
1115         CTDB can manage the Apache web server.
1116       </para>
1117
1118       <refsect3>
1119         <title>Eventscript</title>
1120
1121         <simplelist>
1122           <member><filename>41.httpd</filename></member>
1123         </simplelist>
1124       </refsect3>
1125
1126       <variablelist>
1127         <varlistentry>
1128           <term>CTDB_MANAGES_HTTPD=yes|no</term>
1129           <listitem>
1130             <para>
1131               Should CTDB manage the Apache web server?
1132             </para>
1133             <para>
1134               Default is no.
1135             </para>
1136           </listitem>
1137         </varlistentry>
1138       </variablelist>
1139     </refsect2>
1140
1141     <refsect2>
1142       <title>CLAMAV</title>
1143
1144       <para>
1145         CTDB has support to manage the popular anti-virus daemon
1146         ClamAV.
1147       </para>
1148
1149       <refsect3>
1150         <title>Eventscript</title>
1151
1152         <simplelist>
1153           <member><filename>31.clamd</filename></member>
1154         </simplelist>
1155
1156         <para>
1157           This eventscript is not enabled by default.  Use
1158           <command>ctdb enablescript</command> to enable it.
1159         </para>
1160
1161       </refsect3>
1162
1163       <variablelist>
1164
1165         <varlistentry>
1166           <term>CTDB_MANAGES_CLAMD=yes|no</term>
1167           <listitem>
1168             <para>
1169               Should CTDB manage ClamAV?
1170             </para>
1171             <para>
1172               Default is no.
1173             </para>
1174           </listitem>
1175         </varlistentry>
1176
1177         <varlistentry>
1178           <term>CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter></term>
1179           <listitem>
1180             <para>
1181               FILENAME is the socket to monitor ClamAV.
1182             </para>
1183             <para>
1184               No default.
1185             </para>
1186           </listitem>
1187         </varlistentry>
1188
1189       </variablelist>
1190
1191     </refsect2>
1192
1193     <refsect2>
1194       <title>ISCSI</title>
1195
1196       <para>
1197         CTDB has support for managing the Linux iSCSI tgtd service.
1198       </para>
1199
1200       <refsect3>
1201         <title>Eventscript</title>
1202
1203         <simplelist>
1204           <member><filename>70.iscsi</filename></member>
1205         </simplelist>
1206       </refsect3>
1207
1208       <variablelist>
1209
1210         <varlistentry>
1211           <term>CTDB_MANAGES_ISCSI=yes|no</term>
1212           <listitem>
1213             <para>
1214               Should CTDB manage iSCSI tgtd?
1215             </para>
1216             <para>
1217               Default is no.
1218             </para>
1219           </listitem>
1220         </varlistentry>
1221
1222         <varlistentry>
1223           <term>CTDB_START_ISCSI_SCRIPTS=<parameter>DIRECTORY</parameter></term>
1224           <listitem>
1225             <para>
1226               DIRECTORY on shared storage containing scripts to start
1227               tgtd for each public IP address.
1228             </para>
1229             <para>
1230               No default.
1231             </para>
1232           </listitem>
1233         </varlistentry>
1234       </variablelist>
1235     </refsect2>
1236
1237     <refsect2>
1238       <title>MULTIPATHD</title>
1239
1240       <para>
1241         CTDB can monitor multipath devices to ensure that active paths
1242         are available.
1243       </para>
1244
1245       <refsect3>
1246         <title>Eventscript</title>
1247
1248         <simplelist>
1249           <member><filename>20.multipathd</filename></member>
1250         </simplelist>
1251
1252         <para>
1253           This eventscript is not enabled by default.  Use
1254           <command>ctdb enablescript</command> to enable it.
1255         </para>
1256       </refsect3>
1257
1258       <variablelist>
1259         <varlistentry>
1260           <term>CTDB_MONITOR_MPDEVICES=<parameter>MP-DEVICE-LIST</parameter></term>
1261           <listitem>
1262             <para>
1263               MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
1264             </para>
1265             <para>
1266               No default.
1267             </para>
1268           </listitem>
1269         </varlistentry>
1270       </variablelist>
1271     </refsect2>
1272
1273     <refsect2>
1274       <title>VSFTPD</title>
1275
1276       <para>
1277         CTDB can manage the vsftpd FTP server.
1278       </para>
1279
1280       <refsect3>
1281         <title>Eventscript</title>
1282
1283         <simplelist>
1284           <member><filename>40.vsftpd</filename></member>
1285         </simplelist>
1286       </refsect3>
1287
1288       <variablelist>
1289         <varlistentry>
1290           <term>CTDB_MANAGES_VSFTPD=yes|no</term>
1291           <listitem>
1292             <para>
1293               Should CTDB manage the vsftpd FTP server?
1294             </para>
1295             <para>
1296               Default is no.
1297             </para>
1298           </listitem>
1299         </varlistentry>
1300       </variablelist>
1301     </refsect2>
1302
1303     <refsect2>
1304       <title>
1305         SYSTEM RESOURCE MONITORING CONFIGURATION
1306       </title>
1307
1308       <para>
1309         CTDB can experience seemingly random (performance and other)
1310         issues if system resources become too contrained.  Options in
1311         this section can be enabled to allow certain system resources to
1312         be checked.
1313       </para>
1314
1315       <refsect3>
1316         <title>Eventscripts</title>
1317
1318         <simplelist>
1319           <member><filename>00.ctdb</filename></member>
1320           <member><filename>40.fs_use</filename></member>
1321         </simplelist>
1322
1323         <para>
1324           Filesystem usage monitoring is in
1325           <filename>40.fs_use</filename>.  This eventscript is not
1326           enabled by default.  Use <command>ctdb
1327           enablescript</command> to enable it.
1328         </para>
1329       </refsect3>
1330
1331       <variablelist>
1332
1333         <varlistentry>
1334           <term>CTDB_CHECK_FS_USE=<parameter>FS-LIMIT-LIST</parameter></term>
1335           <listitem>
1336             <para>
1337               FS-LIMIT-LIST is a space-separated list of
1338               <parameter>FILESYSTEM</parameter>:<parameter>LIMIT</parameter>
1339               pairs indicating that a node should be flagged unhealthy
1340               if the space used on FILESYSTEM reaches LIMIT%.
1341             </para>
1342
1343             <para>
1344               No default.
1345             </para>
1346
1347             <para>
1348               Note that this feature uses the
1349               <filename>40.fs_use</filename> eventscript, which is not
1350               enabled by default.  Use <command>ctdb
1351               enablescript</command> to enable it.
1352             </para>
1353           </listitem>
1354         </varlistentry>
1355
1356         <varlistentry>
1357           <term>CTDB_CHECK_SWAP_IS_NOT_USED=yes|no</term>
1358           <listitem>
1359             <para>
1360               Should a warning be logged if swap space is in use.
1361             </para>
1362             <para>
1363               Default is no.
1364             </para>
1365           </listitem>
1366         </varlistentry>
1367
1368         <varlistentry>
1369           <term>CTDB_MONITOR_FREE_MEMORY=<parameter>NUM</parameter></term>
1370           <listitem>
1371             <para>
1372               NUM is a lower limit on available system memory, expressed
1373               in megabytes.  If this is set and the amount of available
1374               memory falls below this limit then some debug information
1375               will be logged, the node will be disabled and then CTDB
1376               will be shut down.
1377             </para>
1378             <para>
1379               No default.
1380             </para>
1381           </listitem>
1382         </varlistentry>
1383
1384         <varlistentry>
1385           <term>CTDB_MONITOR_FREE_MEMORY_WARN=<parameter>NUM</parameter></term>
1386           <listitem>
1387             <para>
1388               NUM is a lower limit on available system memory, expressed
1389               in megabytes.  If this is set and the amount of available
1390               memory falls below this limit then a warning will be
1391               logged.
1392             </para>
1393             <para>
1394               No default.
1395             </para>
1396           </listitem>
1397         </varlistentry>
1398
1399       </variablelist>
1400     </refsect2>
1401
1402     <refsect2>
1403       <title>MISCELLANEOUS SERVICE-RELATED CONFIGURATION</title>
1404
1405       <variablelist>
1406
1407         <varlistentry>
1408           <term>CTDB_MANAGED_SERVICES=<parameter>SERVICE-LIST</parameter></term>
1409           <listitem>
1410             <para>
1411               SERVICE-LIST is a space-separated list of SERVICEs that
1412               CTDB should manage.  This can be used as an alternative
1413               to the
1414               <varname>CTDB_MANAGES_<replaceable>SERVICE</replaceable></varname>
1415               variables.
1416             </para>
1417             <para>
1418               No default.
1419             </para>
1420           </listitem>
1421         </varlistentry>
1422
1423         <varlistentry>
1424           <term>CTDB_SERVICE_AUTOSTARTSTOP=yes|no</term>
1425           <listitem>
1426             <para>
1427               When CTDB should start and stop services if they become
1428               managed or unmanaged.
1429             </para>
1430             <para>
1431               Default is no.
1432             </para>
1433           </listitem>
1434         </varlistentry>
1435
1436       </variablelist>
1437
1438     </refsect2>
1439
1440   </refsect1>
1441
1442   <refsect1>
1443     <title>
1444       TUNABLES CONFIGURATION
1445     </title>
1446
1447     <para>
1448       CTDB tunables (see
1449       <citerefentry><refentrytitle>ctdbd-tunables</refentrytitle>
1450       <manvolnum>7</manvolnum></citerefentry>) can be set from the
1451       configuration file.  They are set as follows:
1452
1453       <literallayout>
1454 CTDB_SET_<replaceable>TUNABLE</replaceable>=<replaceable>VALUE</replaceable>
1455       </literallayout>
1456     </para>
1457
1458     <para>
1459       For example:
1460
1461       <screen format="linespecific">
1462 CTDB_SET_MonitorInterval=20
1463       </screen>
1464     </para>
1465   </refsect1>
1466
1467   <refsect1>
1468     <title>
1469       DEBUG AND TEST
1470     </title>
1471
1472     <para>
1473       Variable in this section are for debugging and testing CTDB.
1474       They should not generally be needed.
1475     </para>
1476
1477     <variablelist>
1478
1479       <varlistentry>
1480         <term>CTDB_DEBUG_HUNG_SCRIPT=<parameter>FILENAME</parameter></term>
1481         <listitem>
1482           <para>
1483             FILENAME is a script to run to log debug information when
1484             an event script times out.
1485           </para>
1486           <para>
1487             Default is <filename><varname>CTDB_BASE</varname>/debug-hung-script.sh</filename>.
1488           </para>
1489         </listitem>
1490       </varlistentry>
1491
1492       <varlistentry>
1493         <term>CTDB_DEBUG_HUNG_SCRIPT_LOGFILE=<parameter>FILENAME</parameter></term>
1494         <listitem>
1495           <para>
1496             FILENAME specifies where log messages should go when
1497             debugging hung eventscripts.  This is a testing option.
1498             See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1499           </para>
1500           <para>
1501             No default.  Messages go to stdout/stderr and are logged
1502             to the same place as other CTDB log messages.
1503           </para>
1504         </listitem>
1505       </varlistentry>
1506
1507       <varlistentry>
1508         <term>CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<parameter>REGEXP</parameter></term>
1509         <listitem>
1510           <para>
1511             REGEXP specifies interesting processes for which stack
1512             traces should be logged when debugging hung eventscripts
1513             and those processes are matched in pstree output.  See
1514             also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1515           </para>
1516           <para>
1517             Default is "exportfs\|rpcinfo".
1518           </para>
1519         </listitem>
1520       </varlistentry>
1521
1522       <varlistentry>
1523         <term>CTDB_DEBUG_LOCKS=<parameter>FILENAME</parameter></term>
1524         <listitem>
1525           <para>
1526             FILENAME is a script to run to log debug information when
1527             an CTDB fails to freeze databases during recovery.
1528           </para>
1529           <para>
1530             No default, usually
1531             <filename><varname>CTDB_BASE</varname>/debug_locks.sh</filename>.
1532           </para>
1533         </listitem>
1534       </varlistentry>
1535
1536       <varlistentry>
1537         <term>CTDB_ETCDIR=<parameter>DIRECTORY</parameter></term>
1538         <listitem>
1539           <para>
1540             DIRECTORY containing system configuration files.  This is
1541             used to provide alternate configuration when testing and
1542             should not need to be changed from the default.
1543           </para>
1544           <para>
1545             Default is <filename>/etc</filename>.
1546           </para>
1547         </listitem>
1548       </varlistentry>
1549
1550       <varlistentry>
1551         <term>CTDB_INIT_STYLE=debian|redhat|suse</term>
1552         <listitem>
1553           <para>
1554             This is the init style used by the Linux distribution (or
1555             other operating system) being used.  This is usually
1556             determined dynamically by checking the system.  This
1557             variable is used by the initscript to determine which init
1558             system primitives to use.  It is also used by some
1559             eventscripts to choose the name of initscripts for certain
1560             services, since these can vary between distributions.
1561           </para>
1562           <para>
1563             No fixed default.
1564           </para>
1565           <para>
1566             If this option needs to be changed from the calculated
1567             default for the initscript to function properly, then it
1568             must be set in the distribution-specific initscript
1569             configuration, such as
1570             <filename>/etc/sysconfig/ctdb</filename>
1571           </para>
1572         </listitem>
1573       </varlistentry>
1574
1575       <varlistentry>
1576         <term>CTDB_MAX_CORRUPT_DB_BACKUPS=<parameter>NUM</parameter></term>
1577         <listitem>
1578           <para>
1579             NUM is the maximum number of volatile TDB database backups
1580             to be kept (for each database) when a corrupt database is
1581             found during startup.  Volatile TDBs are zeroed during
1582             startup so backups are needed to debug any corruption that
1583             occurs before a restart.
1584           </para>
1585           <para>
1586             Default is 10.
1587           </para>
1588         </listitem>
1589       </varlistentry>
1590
1591       <varlistentry>
1592         <term>CTDB_RC_LOCAL=<parameter>FILENAME</parameter></term>
1593         <listitem>
1594           <para>
1595             FILENAME is a script fragment to be sourced by the
1596             <filename>functions</filename> that is sourced by scripts.
1597             On example use would be to override function definitions
1598             in unit tests.  As a sanity check, this file must be
1599             executable for it to be used.
1600           </para>
1601           <para>
1602             No default.
1603           </para>
1604         </listitem>
1605       </varlistentry>
1606
1607       <varlistentry>
1608         <term>CTDB_RUN_TIMEOUT_MONITOR=yes|no</term>
1609         <listitem>
1610           <para>
1611             Whether CTDB should simulate timing out monitor events.
1612             This uses the <filename>99.timeout</filename> eventscript.
1613           </para>
1614           <para>
1615             Default is no.
1616           </para>
1617         </listitem>
1618       </varlistentry>
1619
1620       <varlistentry>
1621         <term>CTDB_SCRIPT_DEBUGLEVEL=<parameter>NUM</parameter></term>
1622         <listitem>
1623           <para>
1624             NUM is the level debugging messages printed by CTDB
1625             scripts.  Setting this to a higher number (e.g. 4) will
1626             cause some scripts to log more messages.
1627           </para>
1628           <para>
1629             Default is 2.
1630           </para>
1631         </listitem>
1632       </varlistentry>
1633
1634       <varlistentry>
1635         <term>CTDB_SUPPRESS_COREFILE=yes|no</term>
1636         <listitem>
1637           <para>
1638             Whether CTDB core files should be suppressed.
1639           </para>
1640           <para>
1641             Default is no.
1642           </para>
1643         </listitem>
1644       </varlistentry>
1645
1646       <varlistentry>
1647         <term>CTDB_VALGRIND=yes|no|<parameter>COMMAND</parameter></term>
1648         <listitem>
1649           <para>
1650             If "yes", this causes
1651             <citerefentry><refentrytitle>ctdbd</refentrytitle>
1652             <manvolnum>1</manvolnum></citerefentry> to be run under
1653             <citerefentry><refentrytitle>valgrind</refentrytitle>
1654             <manvolnum>1</manvolnum></citerefentry> with logs going to
1655             <filename>/var/log/ctdb_valgrind</filename>.  If neither
1656             "yes" nor "no" then the value is assumed to be a COMMAND
1657             (e.g. a <command>valgrind</command> variation, a
1658             <citerefentry><refentrytitle>gdb</refentrytitle>
1659             <manvolnum>1</manvolnum></citerefentry> command) that is
1660             used in place of the default <command>valgrind</command>
1661             command.  In either case, the <option>--valgrind</option>
1662             option is passed to <command>ctdbd</command>.
1663           </para>
1664           <para>
1665             Default is no.
1666           </para>
1667         </listitem>
1668       </varlistentry>
1669
1670     </variablelist>
1671
1672   </refsect1>
1673
1674
1675   <refsect1>
1676     <title>FILES</title>
1677
1678     <simplelist>
1679       <member><filename>/etc/ctdb/ctdbd.conf</filename></member>
1680       <member><filename>/etc/sysconfig/ctdb</filename></member>
1681       <member><filename>/etc/default/ctdb</filename></member>
1682       <member><filename>/etc/ctdb/sysconfig/ctdb</filename></member>
1683     </simplelist>
1684   </refsect1>
1685
1686   <refsect1>
1687     <title>SEE ALSO</title>
1688     <para>
1689       <citerefentry><refentrytitle>ctdbd</refentrytitle>
1690       <manvolnum>1</manvolnum></citerefentry>,
1691
1692       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
1693       <manvolnum>1</manvolnum></citerefentry>,
1694
1695       <citerefentry><refentrytitle>onnode</refentrytitle>
1696       <manvolnum>1</manvolnum></citerefentry>,
1697
1698       <citerefentry><refentrytitle>ctdb</refentrytitle>
1699       <manvolnum>7</manvolnum></citerefentry>,
1700
1701       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
1702       <manvolnum>7</manvolnum></citerefentry>,
1703
1704       <ulink url="http://ctdb.samba.org/"/>
1705     </para>
1706   </refsect1>
1707
1708   <refentryinfo>
1709     <author>
1710       <contrib>
1711         This documentation was written by
1712         Amitay Isaacs,
1713         Martin Schwenke
1714       </contrib>
1715     </author>
1716
1717     <copyright>
1718       <year>2007</year>
1719       <holder>Andrew Tridgell</holder>
1720       <holder>Ronnie Sahlberg</holder>
1721     </copyright>
1722     <legalnotice>
1723       <para>
1724         This program is free software; you can redistribute it and/or
1725         modify it under the terms of the GNU General Public License as
1726         published by the Free Software Foundation; either version 3 of
1727         the License, or (at your option) any later version.
1728       </para>
1729       <para>
1730         This program is distributed in the hope that it will be
1731         useful, but WITHOUT ANY WARRANTY; without even the implied
1732         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1733         PURPOSE.  See the GNU General Public License for more details.
1734       </para>
1735       <para>
1736         You should have received a copy of the GNU General Public
1737         License along with this program; if not, see
1738         <ulink url="http://www.gnu.org/licenses"/>.
1739       </para>
1740     </legalnotice>
1741   </refentryinfo>
1742
1743 </refentry>