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