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