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