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