ctdb: Drop configuration file ctdbd.conf
[samba.git] / ctdb / doc / ctdb-script.options.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="ctdb-script.options.5">
7
8   <refmeta>
9     <refentrytitle>ctdb-script.options</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>ctdb-script.options</refname>
17     <refpurpose>CTDB scripts configuration files</refpurpose>
18   </refnamediv>
19
20   <refsect1>
21     <title>DESCRIPTION</title>
22
23     <para>
24       Each CTDB script has 2 possible locations for its configuration options:
25     </para>
26
27     <variablelist>
28
29       <varlistentry>
30         <term>
31           <filename>/usr/local/etc/ctdb/script.options</filename>
32         </term>
33         <listitem>
34           <para>
35             This is a catch-all global file for general purpose
36             scripts and for options that are used in multiple event
37             scripts.
38           </para>
39         </listitem>
40       </varlistentry>
41
42       <varlistentry>
43         <term>
44           <parameter>SCRIPT</parameter>.options
45         </term>
46         <listitem>
47           <para>
48             That is, options for
49             <filename><parameter>SCRIPT</parameter></filename> are
50             placed in a file alongside the script, with a ".script"
51             suffix added.  This style is usually recommended for event
52             scripts.
53           </para>
54
55           <para>
56             Options in this script-specific file override those in
57             the global file.
58           </para>
59         </listitem>
60       </varlistentry>
61
62     </variablelist>
63
64     <para>
65       These files should include simple shell-style variable
66       assignments and shell-style comments.
67     </para>
68
69   </refsect1>
70
71   <refsect1>
72     <title>NETWORK CONFIGURATION</title>
73
74     <refsect2>
75       <title>10.interface</title>
76
77       <para>
78         This event script handles monitoring of interfaces using by
79         public IP addresses.
80       </para>
81
82       <variablelist>
83
84         <varlistentry>
85           <term>
86             CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no
87           </term>
88           <listitem>
89             <para>
90               Whether one or more offline interfaces should cause a
91               monitor event to fail if there are other interfaces that
92               are up.  If this is "yes" and a node has some interfaces
93               that are down then <command>ctdb status</command> will
94               display the node as "PARTIALLYONLINE".
95             </para>
96
97             <para>
98               Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is not
99               generally compatible with NAT gateway or LVS.  NAT
100               gateway relies on the interface configured by
101               CTDB_NATGW_PUBLIC_IFACE to be up and LVS replies on
102               CTDB_LVS_PUBLIC_IFACE to be up.  CTDB does not check if
103               these options are set in an incompatible way so care is
104               needed to understand the interaction.
105             </para>
106
107             <para>
108               Default is "no".
109             </para>
110           </listitem>
111         </varlistentry>
112
113       </variablelist>
114     </refsect2>
115
116     <refsect2>
117       <title>11.natgw</title>
118
119       <para>
120         Provides CTDB's NAT gateway functionality.
121       </para>
122
123       <para>
124         NAT gateway is used to configure fallback routing for nodes
125         when they do not host any public IP addresses.  For example,
126         it allows unhealthy nodes to reliably communicate with
127         external infrastructure.  One node in a NAT gateway group will
128         be designated as the NAT gateway master node and other (slave)
129         nodes will be configured with fallback routes via the NAT
130         gateway master node.  For more information, see the
131         <citetitle>NAT GATEWAY</citetitle> section in
132         <citerefentry><refentrytitle>ctdb</refentrytitle>
133         <manvolnum>7</manvolnum></citerefentry>.
134       </para>
135
136       <variablelist>
137
138         <varlistentry>
139           <term>CTDB_NATGW_DEFAULT_GATEWAY=<parameter>IPADDR</parameter></term>
140           <listitem>
141             <para>
142               IPADDR is an alternate network gateway to use on the NAT
143               gateway master node.  If set, a fallback default route
144               is added via this network gateway.
145             </para>
146             <para>
147               No default.  Setting this variable is optional - if not
148               set that no route is created on the NAT gateway master
149               node.
150             </para>
151           </listitem>
152         </varlistentry>
153
154         <varlistentry>
155           <term>CTDB_NATGW_NODES=<parameter>FILENAME</parameter></term>
156           <listitem>
157             <para>
158               FILENAME contains the list of nodes that belong to the
159               same NAT gateway group.
160             </para>
161             <para>
162               File format:
163               <screen>
164 <parameter>IPADDR</parameter> <optional>slave-only</optional>
165               </screen>
166             </para>
167             <para>
168               IPADDR is the private IP address of each node in the NAT
169               gateway group.
170             </para>
171             <para>
172               If "slave-only" is specified then the corresponding node
173               can not be the NAT gateway master node.  In this case
174               <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and
175               <varname>CTDB_NATGW_PUBLIC_IP</varname> are optional and
176               unused.
177             </para>
178             <para>
179               No default, usually
180               <filename>/usr/local/etc/ctdb/natgw_nodes</filename> when enabled.
181             </para>
182           </listitem>
183         </varlistentry>
184
185         <varlistentry>
186           <term>CTDB_NATGW_PRIVATE_NETWORK=<parameter>IPADDR/MASK</parameter></term>
187           <listitem>
188             <para>
189               IPADDR/MASK is the private sub-network that is
190               internally routed via the NAT gateway master node.  This
191               is usually the private network that is used for node
192               addresses.
193             </para>
194             <para>
195               No default.
196             </para>
197           </listitem>
198         </varlistentry>
199
200         <varlistentry>
201           <term>CTDB_NATGW_PUBLIC_IFACE=<parameter>IFACE</parameter></term>
202           <listitem>
203             <para>
204               IFACE is the network interface on which the
205               CTDB_NATGW_PUBLIC_IP will be configured.
206             </para>
207             <para>
208               No default.
209             </para>
210           </listitem>
211         </varlistentry>
212
213         <varlistentry>
214           <term>CTDB_NATGW_PUBLIC_IP=<parameter>IPADDR/MASK</parameter></term>
215           <listitem>
216             <para>
217               IPADDR/MASK indicates the IP address that is used for
218               outgoing traffic (originating from
219               CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
220               node.  This <emphasis>must not</emphasis> be a
221               configured public IP address.
222             </para>
223             <para>
224               No default.
225             </para>
226           </listitem>
227         </varlistentry>
228
229         <varlistentry>
230           <term>CTDB_NATGW_STATIC_ROUTES=<parameter>IPADDR/MASK[@GATEWAY]</parameter> ...</term>
231           <listitem>
232             <para>
233               Each IPADDR/MASK identifies a network or host to which
234               NATGW should create a fallback route, instead of
235               creating a single default route.  This can be used when
236               there is already a default route, via an interface that
237               can not reach required infrastructure, that overrides
238               the NAT gateway default route.
239             </para>
240             <para>
241               If GATEWAY is specified then the corresponding route on
242               the NATGW master node will be via GATEWAY.  Such routes
243               are created even if
244               <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is not
245               specified.  If GATEWAY is not specified for some
246               networks then routes are only created on the NATGW
247               master node for those networks if
248               <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
249               specified.
250             </para>
251             <para>
252               This should be used with care to avoid causing traffic
253               to unnecessarily double-hop through the NAT gateway
254               master, even when a node is hosting public IP addresses.
255               Each specified network or host should probably have a
256               corresponding automatically created link route or static
257               route to avoid this.
258             </para>
259             <para>
260               No default.
261             </para>
262           </listitem>
263         </varlistentry>
264
265       </variablelist>
266
267       <refsect3>
268         <title>Example</title>
269         <screen>
270 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
271 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
272 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
273 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
274 CTDB_NATGW_PUBLIC_IFACE=eth0
275         </screen>
276
277         <para>
278           A variation that ensures that infrastructure (ADS, DNS, ...)
279           directly attached to the public network (10.0.0.0/24) is
280           always reachable would look like this:
281         </para>
282         <screen>
283 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
284 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
285 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
286 CTDB_NATGW_PUBLIC_IFACE=eth0
287 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
288         </screen>
289         <para>
290           Note that <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
291           not specified.
292         </para>
293       </refsect3>
294
295     </refsect2>
296
297     <refsect2>
298       <title>13.per_ip_routing</title>
299
300       <para>
301         Provides CTDB's policy routing functionality.
302       </para>
303
304       <para>
305         A node running CTDB may be a component of a complex network
306         topology.  In particular, public addresses may be spread
307         across several different networks (or VLANs) and it may not be
308         possible to route packets from these public addresses via the
309         system's default route.  Therefore, CTDB has support for
310         policy routing via the <filename>13.per_ip_routing</filename>
311         eventscript.  This allows routing to be specified for packets
312         sourced from each public address.  The routes are added and
313         removed as CTDB moves public addresses between nodes.
314       </para>
315
316       <para>
317         For more information, see the <citetitle>POLICY
318         ROUTING</citetitle> section in
319         <citerefentry><refentrytitle>ctdb</refentrytitle>
320         <manvolnum>7</manvolnum></citerefentry>.
321       </para>
322
323       <variablelist>
324         <varlistentry>
325           <term>CTDB_PER_IP_ROUTING_CONF=<parameter>FILENAME</parameter></term>
326           <listitem>
327             <para>
328               FILENAME contains elements for constructing the desired
329               routes for each source address.
330             </para>
331
332             <para>
333               The special FILENAME value
334               <constant>__auto_link_local__</constant> indicates that no
335               configuration file is provided and that CTDB should
336               generate reasonable link-local routes for each public IP
337               address.
338             </para>
339
340             <para>
341               File format:
342               <screen>
343                 <parameter>IPADDR</parameter> <parameter>DEST-IPADDR/MASK</parameter> <optional><parameter>GATEWAY-IPADDR</parameter></optional>
344               </screen>
345             </para>
346
347             <para>
348               No default, usually
349               <filename>/usr/local/etc/ctdb/policy_routing</filename>
350               when enabled.
351             </para>
352           </listitem>
353         </varlistentry>
354
355         <varlistentry>
356           <term>
357             CTDB_PER_IP_ROUTING_RULE_PREF=<parameter>NUM</parameter>
358           </term>
359         <listitem>
360           <para>
361             NUM sets the priority (or preference) for the routing
362             rules that are added by CTDB.
363           </para>
364
365           <para>
366             This should be (strictly) greater than 0 and (strictly)
367             less than 32766.  A priority of 100 is recommended, unless
368             this conflicts with a priority already in use on the
369             system.  See
370             <citerefentry><refentrytitle>ip</refentrytitle>
371             <manvolnum>8</manvolnum></citerefentry>, for more details.
372           </para>
373         </listitem>
374         </varlistentry>
375
376         <varlistentry>
377           <term>
378             CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<parameter>LOW-NUM</parameter>,
379             CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<parameter>HIGH-NUM</parameter>
380           </term>
381           <listitem>
382             <para>
383               CTDB determines a unique routing table number to use for
384               the routing related to each public address.  LOW-NUM and
385               HIGH-NUM indicate the minimum and maximum routing table
386               numbers that are used.
387             </para>
388
389             <para>
390               <citerefentry><refentrytitle>ip</refentrytitle>
391               <manvolnum>8</manvolnum></citerefentry> uses some
392               reserved routing table numbers below 255.  Therefore,
393               CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
394               greater than 255.
395             </para>
396
397             <para>
398               CTDB uses the standard file
399               <filename>/etc/iproute2/rt_tables</filename> to maintain
400               a mapping between the routing table numbers and labels.
401               The label for a public address
402               <replaceable>ADDR</replaceable> will look like
403               ctdb.<replaceable>addr</replaceable>.  This means that
404               the associated rules and routes are easy to read (and
405               manipulate).
406             </para>
407
408             <para>
409               No default, usually 1000 and 9000.
410             </para>
411           </listitem>
412         </varlistentry>
413       </variablelist>
414
415       <refsect3>
416         <title>Example</title>
417         <screen>
418 CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
419 CTDB_PER_IP_ROUTING_RULE_PREF=100
420 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
421 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
422         </screen>
423       </refsect3>
424
425     </refsect2>
426
427     <refsect2>
428       <title>91.lvs</title>
429
430       <para>
431         Provides CTDB's LVS functionality.
432       </para>
433
434       <para>
435         For a general description see the <citetitle>LVS</citetitle>
436         section in <citerefentry><refentrytitle>ctdb</refentrytitle>
437         <manvolnum>7</manvolnum></citerefentry>.
438       </para>
439
440       <variablelist>
441
442         <varlistentry>
443           <term>
444             CTDB_LVS_NODES=<parameter>FILENAME</parameter>
445           </term>
446           <listitem>
447             <para>
448               FILENAME contains the list of nodes that belong to the
449               same LVS group.
450             </para>
451             <para>
452               File format:
453               <screen>
454 <parameter>IPADDR</parameter> <optional>slave-only</optional>
455               </screen>
456             </para>
457             <para>
458               IPADDR is the private IP address of each node in the LVS
459               group.
460             </para>
461             <para>
462               If "slave-only" is specified then the corresponding node
463               can not be the LVS master node.  In this case
464               <varname>CTDB_LVS_PUBLIC_IFACE</varname> and
465               <varname>CTDB_LVS_PUBLIC_IP</varname> are optional and
466               unused.
467             </para>
468             <para>
469               No default, usually
470               <filename>/usr/local/etc/ctdb/lvs_nodes</filename> when enabled.
471             </para>
472           </listitem>
473         </varlistentry>
474
475         <varlistentry>
476           <term>
477             CTDB_LVS_PUBLIC_IFACE=<parameter>INTERFACE</parameter>
478           </term>
479           <listitem>
480             <para>
481               INTERFACE is the network interface that clients will use
482               to connection to <varname>CTDB_LVS_PUBLIC_IP</varname>.
483               This is optional for slave-only nodes.
484               No default.
485             </para>
486           </listitem>
487         </varlistentry>
488
489         <varlistentry>
490           <term>
491             CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter>
492           </term>
493           <listitem>
494             <para>
495               CTDB_LVS_PUBLIC_IP is the LVS public address.  No
496               default.
497           </para>
498           </listitem>
499         </varlistentry>
500
501       </variablelist>
502     </refsect2>
503
504   </refsect1>
505
506   <refsect1>
507     <title>SERVICE CONFIGURATION</title>
508
509     <para>
510       CTDB can be configured to manage and/or monitor various NAS (and
511       other) services via its eventscripts.
512     </para>
513
514     <para>
515       In the simplest case CTDB will manage a service.  This means the
516       service will be started and stopped along with CTDB, CTDB will
517       monitor the service and CTDB will do any required
518       reconfiguration of the service when public IP addresses are
519       failed over.
520     </para>
521
522     <refsect2>
523       <title>20.multipathd</title>
524
525       <para>
526         Provides CTDB's Linux multipathd service management.
527       </para>
528
529       <para>
530         It can monitor multipath devices to ensure that active paths
531         are available.
532       </para>
533
534       <variablelist>
535         <varlistentry>
536           <term>
537             CTDB_MONITOR_MPDEVICES=<parameter>MP-DEVICE-LIST</parameter>
538           </term>
539           <listitem>
540             <para>
541               MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
542             </para>
543             <para>
544               No default.
545             </para>
546           </listitem>
547         </varlistentry>
548       </variablelist>
549     </refsect2>
550
551     <refsect2>
552       <title>31.clamd</title>
553
554       <para>
555         This event script provide CTDB's ClamAV anti-virus service
556         management.
557       </para>
558
559       <para>
560         This eventscript is not enabled by default.  Use <command>ctdb
561         enablescript</command> to enable it.
562       </para>
563
564       <variablelist>
565
566         <varlistentry>
567           <term>
568             CTDB_MANAGES_CLAMD=yes|no
569           </term>
570           <listitem>
571             <para>
572               Should CTDB manage ClamAV?
573             </para>
574             <para>
575               Default is no.
576             </para>
577           </listitem>
578         </varlistentry>
579
580         <varlistentry>
581           <term>
582             CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter>
583           </term>
584           <listitem>
585             <para>
586               FILENAME is the socket to monitor ClamAV.
587             </para>
588             <para>
589               No default.
590             </para>
591           </listitem>
592         </varlistentry>
593
594       </variablelist>
595
596     </refsect2>
597
598     <refsect2>
599       <title>40.vsftpd</title>
600
601       <para>
602         Provides CTDB's vsftpd FTP service management.
603       </para>
604
605       <variablelist>
606         <varlistentry>
607           <term>CTDB_MANAGES_VSFTPD=yes|no</term>
608           <listitem>
609             <para>
610               Should CTDB manage the vsftpd FTP server?
611             </para>
612             <para>
613               Default is no.
614             </para>
615           </listitem>
616         </varlistentry>
617       </variablelist>
618     </refsect2>
619
620     <refsect2>
621       <title>41.httpd</title>
622
623       <para>
624         Provides CTDB's Apache web service management.
625       </para>
626
627       <variablelist>
628         <varlistentry>
629           <term>
630             CTDB_MANAGES_HTTPD=yes|no
631           </term>
632           <listitem>
633             <para>
634               Should CTDB manage the Apache web server?
635             </para>
636             <para>
637               Default is no.
638             </para>
639           </listitem>
640         </varlistentry>
641       </variablelist>
642     </refsect2>
643
644     <refsect2>
645       <title>49.winbind</title>
646
647       <para>
648         Provides CTDB's Samba winbind service management.
649       </para>
650
651       <variablelist>
652
653         <varlistentry>
654           <term>
655             CTDB_MANAGES_WINBIND=yes|no
656           </term>
657           <listitem>
658             <para>
659               Should CTDB manage Winbind?
660             </para>
661             <para>
662               Default is no.
663             </para>
664           </listitem>
665         </varlistentry>
666
667         <varlistentry>
668           <term>
669             CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter>
670           </term>
671           <listitem>
672             <para>
673               Distribution specific SERVICE for managing winbindd.
674             </para>
675             <para>
676               Default is "winbind".
677             </para>
678           </listitem>
679         </varlistentry>
680
681       </variablelist>
682
683     </refsect2>
684
685     <refsect2>
686       <title>50.samba</title>
687
688       <para>
689         Provides the core of CTDB's Samba file service management.
690       </para>
691
692       <variablelist>
693
694         <varlistentry>
695           <term>
696             CTDB_MANAGES_SAMBA=yes|no
697           </term>
698           <listitem>
699             <para>
700               Should CTDB manage Samba?
701             </para>
702             <para>
703               Default is no.
704             </para>
705           </listitem>
706         </varlistentry>
707
708         <varlistentry>
709           <term>
710             CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter>
711           </term>
712           <listitem>
713             <para>
714               When monitoring Samba, check TCP ports in
715               space-separated PORT-LIST.
716             </para>
717             <para>
718               Default is to monitor ports that Samba is configured to listen on.
719             </para>
720           </listitem>
721         </varlistentry>
722
723         <varlistentry>
724           <term>
725             CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no
726           </term>
727           <listitem>
728             <para>
729               As part of monitoring, should CTDB skip the check for
730               the existence of each directory configured as share in
731               Samba.  This may be desirable if there is a large number
732               of shares.
733             </para>
734             <para>
735               Default is no.
736             </para>
737           </listitem>
738         </varlistentry>
739
740         <varlistentry>
741           <term>
742             CTDB_SERVICE_NMB=<parameter>SERVICE</parameter>
743           </term>
744           <listitem>
745             <para>
746               Distribution specific SERVICE for managing nmbd.
747             </para>
748             <para>
749               Default is distribution-dependant.
750             </para>
751           </listitem>
752         </varlistentry>
753         <varlistentry>
754           <term>
755             CTDB_SERVICE_SMB=<parameter>SERVICE</parameter>
756           </term>
757           <listitem>
758             <para>
759               Distribution specific SERVICE for managing smbd.
760             </para>
761             <para>
762               Default is distribution-dependant.
763             </para>
764           </listitem>
765         </varlistentry>
766
767       </variablelist>
768
769     </refsect2>
770
771     <refsect2>
772       <title>60.nfs</title>
773
774       <para>
775         This event script (along with 06.nfs) provides CTDB's NFS
776         service management.
777       </para>
778
779       <para>
780         This includes parameters for the kernel NFS server.
781         Alternative NFS subsystems (such as <ulink
782         url="https://github.com/nfs-ganesha/nfs-ganesha/wiki">NFS-Ganesha</ulink>)
783         can be integrated using <varname>CTDB_NFS_CALLOUT</varname>.
784       </para>
785
786       <variablelist>
787
788         <varlistentry>
789           <term>
790             CTDB_MANAGES_NFS=yes|no
791           </term>
792           <listitem>
793             <para>
794               Should CTDB manage NFS?
795             </para>
796             <para>
797               Default is no.
798             </para>
799           </listitem>
800         </varlistentry>
801
802         <varlistentry>
803           <term>
804             CTDB_NFS_CALLOUT=<parameter>COMMAND</parameter>
805           </term>
806           <listitem>
807             <para>
808               COMMAND specifies the path to a callout to handle
809               interactions with the configured NFS system, including
810               startup, shutdown, monitoring.
811             </para>
812             <para>
813               Default is the included
814               <command>nfs-linux-kernel-callout</command>.
815             </para>
816           </listitem>
817         </varlistentry>
818
819         <varlistentry>
820           <term>
821             CTDB_NFS_CHECKS_DIR=<parameter>DIRECTORY</parameter>
822           </term>
823           <listitem>
824             <para>
825               Specifies the path to a DIRECTORY containing files that
826               describe how to monitor the responsiveness of NFS RPC
827               services.  See the README file for this directory for an
828               explanation of the contents of these "check" files.
829             </para>
830             <para>
831               CTDB_NFS_CHECKS_DIR can be used to point to different
832               sets of checks for different NFS servers.
833             </para>
834             <para>
835               One way of using this is to have it point to, say,
836               <filename>/usr/local/etc/ctdb/nfs-checks-enabled.d</filename>
837               and populate it with symbolic links to the desired check
838               files.  This avoids duplication and is upgrade-safe.
839             </para>
840             <para>
841               Default is
842               <filename>/usr/local/etc/ctdb/nfs-checks.d</filename>,
843               which contains NFS RPC checks suitable for Linux kernel
844               NFS.
845             </para>
846           </listitem>
847         </varlistentry>
848
849         <varlistentry>
850           <term>
851             CTDB_NFS_SKIP_SHARE_CHECK=yes|no
852           </term>
853           <listitem>
854             <para>
855               As part of monitoring, should CTDB skip the check for
856               the existence of each directory exported via NFS.  This
857               may be desirable if there is a large number of exports.
858             </para>
859             <para>
860               Default is no.
861             </para>
862           </listitem>
863         </varlistentry>
864
865         <varlistentry>
866           <term>
867             CTDB_RPCINFO_LOCALHOST=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter>
868           </term>
869           <listitem>
870             <para>
871               IPADDR or HOSTNAME indicates the address that
872               <command>rpcinfo</command> should connect to when doing
873               <command>rpcinfo</command> check on IPv4 RPC service during
874               monitoring.  Optimally this would be "localhost".
875               However, this can add some performance overheads.
876             </para>
877             <para>
878               Default is "127.0.0.1".
879             </para>
880           </listitem>
881         </varlistentry>
882
883         <varlistentry>
884           <term>
885             CTDB_RPCINFO_LOCALHOST6=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter>
886           </term>
887           <listitem>
888             <para>
889               IPADDR or HOSTNAME indicates the address that
890               <command>rpcinfo</command> should connect to when doing
891               <command>rpcinfo</command> check on IPv6 RPC service
892               during monitoring.  Optimally this would be "localhost6"
893               (or similar).  However, this can add some performance
894               overheads.
895             </para>
896             <para>
897               Default is "::1".
898             </para>
899           </listitem>
900         </varlistentry>
901
902         <varlistentry>
903           <term>
904             CTDB_NFS_STATE_FS_TYPE=<parameter>TYPE</parameter>
905           </term>
906           <listitem>
907             <para>
908               The type of filesystem used for a clustered NFS' shared
909               state. No default.
910             </para>
911           </listitem>
912         </varlistentry>
913
914         <varlistentry>
915           <term>
916             CTDB_NFS_STATE_MNT=<parameter>DIR</parameter>
917           </term>
918           <listitem>
919             <para>
920               The directory where a clustered NFS' shared state will be
921               located. No default.
922             </para>
923           </listitem>
924         </varlistentry>
925
926       </variablelist>
927
928     </refsect2>
929
930     <refsect2>
931       <title>70.iscsi</title>
932
933       <para>
934         Provides CTDB's Linux iSCSI tgtd service management.
935       </para>
936
937       <variablelist>
938
939         <varlistentry>
940           <term>
941             CTDB_MANAGES_ISCSI=yes|no
942           </term>
943           <listitem>
944             <para>
945               Should CTDB manage iSCSI tgtd?
946             </para>
947             <para>
948               Default is no.
949             </para>
950           </listitem>
951         </varlistentry>
952
953         <varlistentry>
954           <term>
955             CTDB_START_ISCSI_SCRIPTS=<parameter>DIRECTORY</parameter>
956           </term>
957           <listitem>
958             <para>
959               DIRECTORY on shared storage containing scripts to start
960               tgtd for each public IP address.
961             </para>
962             <para>
963               No default.
964             </para>
965           </listitem>
966         </varlistentry>
967       </variablelist>
968     </refsect2>
969
970   </refsect1>
971
972   <refsect1>
973     <title>
974       DATABASE SETUP
975       </title>
976
977       <para>
978         CTDB checks the consistency of databases during startup.
979       </para>
980
981       <refsect2>
982         <title>00.ctdb</title>
983
984         <variablelist>
985
986           <varlistentry>
987             <term>CTDB_MAX_CORRUPT_DB_BACKUPS=<parameter>NUM</parameter></term>
988             <listitem>
989               <para>
990                 NUM is the maximum number of volatile TDB database
991                 backups to be kept (for each database) when a corrupt
992                 database is found during startup.  Volatile TDBs are
993                 zeroed during startup so backups are needed to debug
994                 any corruption that occurs before a restart.
995               </para>
996               <para>
997                 Default is 10.
998               </para>
999             </listitem>
1000           </varlistentry>
1001
1002         </variablelist>
1003       </refsect2>
1004
1005   </refsect1>
1006
1007   <refsect1>
1008     <title>SYSTEM RESOURCE MONITORING</title>
1009
1010     <refsect2>
1011       <title>
1012         05.system
1013       </title>
1014
1015       <para>
1016         Provides CTDB's filesystem and memory usage monitoring.
1017       </para>
1018
1019       <para>
1020         CTDB can experience seemingly random (performance and other)
1021         issues if system resources become too constrained.  Options in
1022         this section can be enabled to allow certain system resources
1023         to be checked.  They allows warnings to be logged and nodes to
1024         be marked unhealthy when system resource usage reaches the
1025         configured thresholds.
1026       </para>
1027
1028       <para>
1029         Some checks are enabled by default.  It is recommended that
1030         these checks remain enabled or are augmented by extra checks.
1031         There is no supported way of completely disabling the checks.
1032       </para>
1033
1034       <variablelist>
1035
1036         <varlistentry>
1037           <term>
1038             CTDB_MONITOR_FILESYSTEM_USAGE=<parameter>FS-LIMIT-LIST</parameter>
1039           </term>
1040           <listitem>
1041             <para>
1042               FS-LIMIT-LIST is a space-separated list of
1043               <parameter>FILESYSTEM</parameter>:<parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1044               triples indicating that warnings should be logged if the
1045               space used on FILESYSTEM reaches WARN_LIMIT%.  If usage
1046               reaches UNHEALTHY_LIMIT then the node should be flagged
1047               unhealthy.  Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1048               left blank, meaning that check will be omitted.
1049             </para>
1050
1051             <para>
1052               Default is to warn for each filesystem containing a
1053               database directory
1054               (<literal>volatile&nbsp;database&nbsp;directory</literal>,
1055               <literal>persistent&nbsp;database&nbsp;directory</literal>,
1056               <literal>state&nbsp;database&nbsp;directory</literal>)
1057               with a threshold of 90%.
1058             </para>
1059           </listitem>
1060         </varlistentry>
1061
1062         <varlistentry>
1063           <term>
1064             CTDB_MONITOR_MEMORY_USAGE=<parameter>MEM-LIMITS</parameter>
1065           </term>
1066           <listitem>
1067             <para>
1068               MEM-LIMITS takes the form
1069               <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1070               indicating that warnings should be logged if memory
1071               usage reaches WARN_LIMIT%.  If usage reaches
1072               UNHEALTHY_LIMIT then the node should be flagged
1073               unhealthy.  Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1074               left blank, meaning that check will be omitted.
1075             </para>
1076             <para>
1077               Default is 80, so warnings will be logged when memory
1078               usage reaches 80%.
1079             </para>
1080           </listitem>
1081         </varlistentry>
1082
1083         <varlistentry>
1084           <term>
1085             CTDB_MONITOR_SWAP_USAGE=<parameter>SWAP-LIMITS</parameter>
1086           </term>
1087           <listitem>
1088             <para>
1089               SWAP-LIMITS takes the form
1090               <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1091                indicating that warnings should be logged if
1092               swap usage reaches WARN_LIMIT%.  If usage reaches
1093               UNHEALTHY_LIMIT then the node should be flagged
1094               unhealthy.  Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1095               left blank, meaning that check will be omitted.
1096             </para>
1097             <para>
1098               Default is 25, so warnings will be logged when swap
1099               usage reaches 25%.
1100             </para>
1101           </listitem>
1102         </varlistentry>
1103
1104       </variablelist>
1105     </refsect2>
1106
1107   </refsect1>
1108
1109
1110   <refsect1>
1111     <title>EVENT SCRIPT DEBUGGING</title>
1112
1113     <refsect2>
1114       <title>
1115         debug-hung-script.sh
1116       </title>
1117
1118       <variablelist>
1119
1120         <varlistentry>
1121           <term>CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<parameter>REGEXP</parameter></term>
1122           <listitem>
1123             <para>
1124               REGEXP specifies interesting processes for which stack
1125               traces should be logged when debugging hung eventscripts
1126               and those processes are matched in pstree output.
1127               REGEXP is an extended regexp so choices are separated by
1128               pipes ('|').  However, REGEXP should not contain
1129               parentheses.  See also
1130               <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1131             </para>
1132             <para>
1133               Default is "exportfs|rpcinfo".
1134             </para>
1135           </listitem>
1136         </varlistentry>
1137
1138       </variablelist>
1139     </refsect2>
1140
1141   </refsect1>
1142
1143   <refsect1>
1144     <title>FILES</title>
1145
1146     <simplelist>
1147       <member><filename>/usr/local/etc/ctdb/script.options</filename></member>
1148     </simplelist>
1149   </refsect1>
1150
1151   <refsect1>
1152     <title>SEE ALSO</title>
1153     <para>
1154       <citerefentry><refentrytitle>ctdbd</refentrytitle>
1155       <manvolnum>1</manvolnum></citerefentry>,
1156
1157       <citerefentry><refentrytitle>ctdb</refentrytitle>
1158       <manvolnum>7</manvolnum></citerefentry>,
1159
1160       <ulink url="http://ctdb.samba.org/"/>
1161     </para>
1162   </refsect1>
1163
1164   <refentryinfo>
1165     <author>
1166       <contrib>
1167         This documentation was written by
1168         Amitay Isaacs,
1169         Martin Schwenke
1170       </contrib>
1171     </author>
1172
1173     <copyright>
1174       <year>2007</year>
1175       <holder>Andrew Tridgell</holder>
1176       <holder>Ronnie Sahlberg</holder>
1177     </copyright>
1178     <legalnotice>
1179       <para>
1180         This program is free software; you can redistribute it and/or
1181         modify it under the terms of the GNU General Public License as
1182         published by the Free Software Foundation; either version 3 of
1183         the License, or (at your option) any later version.
1184       </para>
1185       <para>
1186         This program is distributed in the hope that it will be
1187         useful, but WITHOUT ANY WARRANTY; without even the implied
1188         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1189         PURPOSE.  See the GNU General Public License for more details.
1190       </para>
1191       <para>
1192         You should have received a copy of the GNU General Public
1193         License along with this program; if not, see
1194         <ulink url="http://www.gnu.org/licenses"/>.
1195       </para>
1196     </legalnotice>
1197   </refentryinfo>
1198
1199 </refentry>