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