1 <?xml version="1.0" encoding="iso-8859-1"?>
3 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
6 <refentry id="ctdbd.conf.5">
9 <refentrytitle>ctdbd.conf</refentrytitle>
10 <manvolnum>5</manvolnum>
11 <refmiscinfo class="source">ctdb</refmiscinfo>
12 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
16 <refname>ctdbd.conf</refname>
17 <refpurpose>CTDB daemon configuration file</refpurpose>
21 <title>DESCRIPTION</title>
24 This file contains CTDB configuration variables that are affect
25 the operation of CTDB. The default location of this file is
26 <filename>/etc/ctdb/ctdbd.conf</filename>.
30 This file is a shell script (see
31 <citerefentry><refentrytitle>sh</refentrytitle>
32 <manvolnum>1</manvolnum></citerefentry>) but is usually limited
33 to simple variable assignments and shell-style comments.
37 CTDB configuration variables are grouped into several categories below.
41 Variables defined in this document can also be set in a
42 distribution-specific configuration file such as
43 <filename>/etc/sysconfig/ctdb</filename> (Red Hat) or
44 <filename>/etc/default/ctdb</filename> (Debian). However, these
45 files should be reserved for variables used by the initscript.
46 A historical alternative is
47 <filename>/etc/ctdb/sysconfig/ctdb</filename> - this is
55 INITSCRIPT CONFIGURATION
59 Some options must be available to the initscript so they need to
60 be set in the distribution-specific initscript configuration,
61 such as <filename>/etc/sysconfig/ctdb</filename> or
62 <filename>/etc/default/ctdb</filename>.
68 <term>CTDB_PIDFILE=<parameter>FILENAME</parameter></term>
71 FILENAME is the name of the file used to contain the
72 process ID (PID) of the main CTDB daemon when it is
73 running. This is passed from the initscript to
74 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
75 <manvolnum>1</manvolnum></citerefentry>.
79 Default is <filename>/var/run/ctdb/ctdbd.pid</filename>.
80 Corresponds to <option>--pidfile</option>.
94 These options may be used in the initscripts, daemon and
101 <term>CTDB_BASE=<parameter>DIRECTORY</parameter></term>
104 DIRECTORY containing CTDB scripts and configuration files.
118 Variables in this section are processed by
119 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
120 <manvolnum>1</manvolnum></citerefentry> and are converted into
121 command-line arguments to
122 <citerefentry><refentrytitle>ctdbd</refentrytitle>
123 <manvolnum>1</manvolnum></citerefentry>. Correspondence with
124 <citerefentry><refentrytitle>ctdbd</refentrytitle>
125 <manvolnum>1</manvolnum></citerefentry> options is shown for
126 each variable. The the documentation for the relevant options
131 Many of these variables are also used by event scripts.
137 <term>CTDB_CAPABILITY_LMASTER=yes|no</term>
140 Defaults to yes. Corresponds to <option>--no-lmaster</option>.
146 <term>CTDB_CAPABILITY_RECMASTER=yes|no</term>
149 Defaults to yes. Corresponds to
150 <option>--no-recmaster</option>.
156 <term>CTDB_DBDIR=<parameter>DIRECTORY</parameter></term>
159 Defaults to <filename>/usr/local/var/lib/ctdb</filename>.
162 Corresponds to <option>--dbdir</option>.
168 <term>CTDB_DBDIR_PERSISTENT=<parameter>DIRECTORY</parameter></term>
171 Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
174 Corresponds to <option>--dbdir-persistent</option>.
180 <term>CTDB_DBDIR_STATE=<parameter>DIRECTORY</parameter></term>
183 Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
186 Corresponds to <option>--dbdir-state</option>.
192 <term>CTDB_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
195 Default is NOTICE (2). Corresponds to <option>-d</option> or
196 <option>--debug</option>.
202 <term>CTDB_EVENT_SCRIPT_DIR=<parameter>DIRECTORY</parameter></term>
205 Default is <varname>CTDB_BASE</varname>/events.d, so usually
206 <filename>/etc/ctdb/events.d</filename>. Corresponds to
207 <option>--event-script-dir</option>.
213 <term>CTDB_LOGGING=<parameter>STRING</parameter></term>
216 STRING specifies where ctdbd will write its log. The
217 default is file:<filename>/var/log/log.ctdb</filename> or
218 similar - the prefix may differ depending on how CTDB was
219 built. Corresponds to <option>--logging</option>.
226 <term>file:<parameter>FILENAME</parameter></term>
229 FILENAME where ctdbd will write its log. This is usually
230 <filename>/var/log/log.ctdb</filename>.
235 <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
238 CTDB will log to syslog. By default this will use
242 If METHOD is specified then it specifies an
243 extension that causes logging to be done in a
244 non-blocking fashion. This can be useful under
245 heavy loads that might cause the syslog daemon to
246 dequeue messages too slowly, which would otherwise
247 cause CTDB to block when logging. METHOD must be
252 <term>nonblocking</term>
255 CTDB will log to syslog via
256 <filename>/dev/log</filename> in non-blocking
265 CTDB will log to syslog via UDP to
266 localhost:514. The syslog daemon must be
267 configured to listen on (at least)
268 localhost:514. Most implementations will log
269 the messages against hostname "localhost" -
270 this is a limit of the implementation for
271 compatibility with more syslog daemon
277 <term>udp-rfc5424</term>
280 As with "udp" but messages are sent in RFC5424
281 format. This method will log the correct
282 hostname but is not as widely implemented in
295 <term>CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter></term>
298 No default. Corresponds to "<option>--lvs</option>
299 <option>--single-public-ip IPADDR"</option>.
305 <term>CTDB_NODES=<parameter>FILENAME</parameter></term>
308 Default is <varname>CTDB_BASE</varname>/nodes, so usually
309 <filename>/etc/ctdb/nodes</filename>. Corresponds to
310 <option>--nlist</option>.
316 <term>CTDB_NOTIFY_SCRIPT=<parameter>FILENAME</parameter></term>
320 <filename>/etc/ctdb/notify.sh</filename>. Corresponds to
321 <option>--notification-script</option>.
327 <term>CTDB_MAX_PERSISTENT_CHECK_ERRORS=<parameter>NUM</parameter></term>
330 Default 0. Corresponds to
331 <option>--max-persistent-check-errors</option>.
337 <term>CTDB_NODE_ADDRESS=<parameter>FILENAME</parameter></term>
340 IPADDR is the private IP address that ctdbd will bind to.
341 Corresponds to <option>--listen</option>.
344 By default ctdbd will select the first address from the
345 nodes list that in can bind to. See also
346 <citetitle>CTDB_NODES</citetitle>.
349 This option is only required when automatic address
350 detection can not be used. This can be the case when
351 running multiple ctdbd daemons/nodes on the same physical
352 host (usually for testing), using InfiniBand for the
353 private network or on Linux when sysctl
354 net.ipv4.ip_nonlocal_bind=1.
360 <term>CTDB_PUBLIC_ADDRESSES=<parameter>FILENAME</parameter></term>
364 <filename>/etc/ctdb/public_addresses</filename>.
365 Corresponds to <option>--public-addresses</option>.
371 <term>CTDB_PUBLIC_INTERFACE=<parameter>INTERFACE</parameter></term>
374 No default. Corresponds to
375 <option>--public-interface</option>.
381 <term>CTDB_RECOVERY_LOCK=<parameter>FILENAME</parameter></term>
385 <filename>/some/place/on/shared/storage</filename>, which
386 should be change to a useful value. Corresponds to
387 <option>--reclock</option>.
390 For information about the recovery lock please see the
391 <citetitle>RECOVERY LOCK</citetitle> section in
392 <citerefentry><refentrytitle>ctdb</refentrytitle>
393 <manvolnum>7</manvolnum></citerefentry>.
399 <term>CTDB_SCRIPT_LOG_LEVEL=<parameter>DEBUGLEVEL</parameter></term>
402 Defaults to ERR (0). Corresponds to
403 <option>--script-log-level</option>.
409 <term>CTDB_SOCKET=<parameter>FILENAME</parameter></term>
412 Defaults to <filename>/tmp/ctdb.socket</filename>.
413 Corresponds to <option>--socket</option>.
416 If you change this then you probably want to set this in
417 root's enviroment (perhaps in a file in
418 <filename>/etc/profile.d</filename>) so that you can use
419 the <citerefentry><refentrytitle>ctdb</refentrytitle>
420 <manvolnum>1</manvolnum></citerefentry> command in a
421 straightforward manner.
427 <term>CTDB_START_AS_DISABLED=yes|no</term>
430 Default is no. Corresponds to
431 <option>--start-as-disabled</option>.
437 <term>CTDB_START_AS_STOPPED=yes|no</term>
440 Default is no. Corresponds to
441 <option>--start-as-stopped</option>.
447 <term>CTDB_TRANSPORT=tcp|infiniband</term>
450 Defaults to tcp. Corresponds to
451 <option>--transport</option>.
459 While the following variables do not translate into daemon
460 options they are used by
461 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
462 <manvolnum>1</manvolnum></citerefentry> when starting and
463 stopping <citerefentry><refentrytitle>ctdbd</refentrytitle>
464 <manvolnum>1</manvolnum></citerefentry>.
470 <term>CTDB_SHUTDOWN_TIMEOUT=<parameter>NUM</parameter></term>
473 NUM is the number of seconds to wait for
474 <citerefentry><refentrytitle>ctdbd</refentrytitle>
475 <manvolnum>1</manvolnum></citerefentry> to shut down
476 gracefully before giving up and killing it.
486 <term>CTDB_STARTUP_TIMEOUT=<parameter>NUM</parameter></term>
489 NUM is the number of seconds to wait for
490 <citerefentry><refentrytitle>ctdbd</refentrytitle>
491 <manvolnum>1</manvolnum></citerefentry> complete early
492 initialisation up to a point where it is unlikely to
493 abort. If <command>ctdbd</command> doesn't complete the
494 "setup" event before this timeout then it is killed.
507 <title>NETWORK CONFIGURATION</title>
510 <title>NAT GATEWAY</title>
513 NAT gateway is used to configure fallback routing for nodes
514 when they do not host any public IP addresses. For example,
515 it allows unhealthy nodes to reliably communicate with
516 external infrastructure. One node in a NAT gateway group will
517 be designated as the NAT gateway master node and other (slave)
518 nodes will be configured with fallback routes via the NAT
519 gateway master node. For more information, see the
520 <citetitle>NAT GATEWAY</citetitle> section in
521 <citerefentry><refentrytitle>ctdb</refentrytitle>
522 <manvolnum>7</manvolnum></citerefentry>.
528 <term>CTDB_NATGW_DEFAULT_GATEWAY=<parameter>IPADDR</parameter></term>
531 IPADDR is an alternate network gateway to use on the NAT
532 gateway master node. If set, a fallback default route
533 is added via this network gateway.
536 No default. Setting this variable is optional - if not
537 set that no route is created on the NAT gateway master
544 <term>CTDB_NATGW_NODES=<parameter>FILENAME</parameter></term>
547 FILENAME contains the list of nodes that belong to the
548 same NAT gateway group.
553 <parameter>IPADDR</parameter>
558 <filename>/etc/ctdb/natgw_nodes</filename> when enabled.
564 <term>CTDB_NATGW_PRIVATE_NETWORK=<parameter>IPADDR/MASK</parameter></term>
567 IPADDR/MASK is the private sub-network that is
568 internally routed via the NAT gateway master node. This
569 is usually the private network that is used for node
579 <term>CTDB_NATGW_PUBLIC_IFACE=<parameter>IFACE</parameter></term>
582 IFACE is the network interface on which the
583 CTDB_NATGW_PUBLIC_IP will be configured.
592 <term>CTDB_NATGW_PUBLIC_IP=<parameter>IPADDR/MASK</parameter></term>
595 IPADDR/MASK indicates the IP address that is used for
596 outgoing traffic (originating from
597 CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
598 node. This <emphasis>must not</emphasis> be a
599 configured public IP address.
608 <term>CTDB_NATGW_SLAVE_ONLY=yes|no</term>
611 When set to "yes" a node can not be a NAT gateway master
613 <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and
614 <varname>CTDB_NATGW_PUBLIC_IP</varname> are optional
624 <term>CTDB_NATGW_STATIC_ROUTES=<parameter>IPADDR/MASK[@GATEWAY]</parameter> ...</term>
627 Each IPADDR/MASK identifies a network or host to which
628 NATGW should create a fallback route, instead of
629 creating a single default route. This can be used when
630 there is already a default route, via an interface that
631 can not reach required infrastructure, that overrides
632 the NAT gateway default route.
635 If GATEWAY is specified then the corresponding route on
636 the NATGW master node will be via GATEWAY. Such routes
638 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is not
639 specified. If GATEWAY is not specified for some
640 networks then routes are only created on the NATGW
641 master node for those networks if
642 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
646 This should be used with care to avoid causing traffic
647 to unnecessarily double-hop through the NAT gateway
648 master, even when a node is hosting public IP addresses.
649 Each specified network or host should probably have a
650 corresponding automatically created link route or static
662 <title>Example</title>
664 CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
665 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
666 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
667 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
668 CTDB_NATGW_PUBLIC_IFACE=eth0
672 A variation that ensures that infrastructure (ADS, DNS, ...)
673 directly attached to the public network (10.0.0.0/24) is
674 always reachable would look like this:
677 CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
678 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
679 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
680 CTDB_NATGW_PUBLIC_IFACE=eth0
681 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
684 Note that <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
692 <title>POLICY ROUTING</title>
695 A node running CTDB may be a component of a complex network
696 topology. In particular, public addresses may be spread
697 across several different networks (or VLANs) and it may not be
698 possible to route packets from these public addresses via the
699 system's default route. Therefore, CTDB has support for
700 policy routing via the <filename>13.per_ip_routing</filename>
701 eventscript. This allows routing to be specified for packets
702 sourced from each public address. The routes are added and
703 removed as CTDB moves public addresses between nodes.
707 For more information, see the <citetitle>POLICY
708 ROUTING</citetitle> section in
709 <citerefentry><refentrytitle>ctdb</refentrytitle>
710 <manvolnum>7</manvolnum></citerefentry>.
715 <term>CTDB_PER_IP_ROUTING_CONF=<parameter>FILENAME</parameter></term>
718 FILENAME contains elements for constructing the desired
719 routes for each source address.
723 The special FILENAME value
724 <constant>__auto_link_local__</constant> indicates that no
725 configuration file is provided and that CTDB should
726 generate reasonable link-local routes for each public IP
733 <parameter>IPADDR</parameter> <parameter>DEST-IPADDR/MASK</parameter> <optional><parameter>GATEWAY-IPADDR</parameter></optional>
739 <filename>/etc/ctdb/policy_routing</filename> when enabled.
745 <term>CTDB_PER_IP_ROUTING_RULE_PREF=<parameter>NUM</parameter></term>
748 NUM sets the priority (or preference) for the routing
749 rules that are added by CTDB.
753 This should be (strictly) greater than 0 and (strictly)
754 less than 32766. A priority of 100 is recommended, unless
755 this conflicts with a priority already in use on the
757 <citerefentry><refentrytitle>ip</refentrytitle>
758 <manvolnum>8</manvolnum></citerefentry>, for more details.
765 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<parameter>LOW-NUM</parameter>,
766 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<parameter>HIGH-NUM</parameter>
770 CTDB determines a unique routing table number to use for
771 the routing related to each public address. LOW-NUM and
772 HIGH-NUM indicate the minimum and maximum routing table
773 numbers that are used.
777 <citerefentry><refentrytitle>ip</refentrytitle>
778 <manvolnum>8</manvolnum></citerefentry> uses some
779 reserved routing table numbers below 255. Therefore,
780 CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
785 CTDB uses the standard file
786 <filename>/etc/iproute2/rt_tables</filename> to maintain
787 a mapping between the routing table numbers and labels.
788 The label for a public address
789 <replaceable>ADDR</replaceable> will look like
790 ctdb.<replaceable>addr</replaceable>. This means that
791 the associated rules and routes are easy to read (and
796 No default, usually 1000 and 9000.
803 <title>Example</title>
805 CTDB_PER_IP_ROUTING_CONF=/etc/ctdb/policy_routing
806 CTDB_PER_IP_ROUTING_RULE_PREF=100
807 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
808 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
815 <title>MISCELLANEOUS NETWORK CONFIGURATION</title>
820 <term>CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no</term>
823 Whether one or more offline interfaces should cause a
824 monitor event to fail if there are other interfaces that
825 are up. If this is "yes" and a node has some interfaces
826 that are down then <command>ctdb status</command> will
827 display the node as "PARTIALLYONLINE".
842 <title>SERVICE CONFIGURATION</title>
845 CTDB can be configured to manage and/or monitor various NAS (and
846 other) services via its eventscripts.
850 In the simplest case CTDB will manage a service. This means the
851 service will be started and stopped along with CTDB, CTDB will
852 monitor the service and CTDB will do any required
853 reconfiguration of the service when public IP addresses are
861 <title>Eventscripts</title>
864 <member><filename>49.winbind</filename></member>
865 <member><filename>50.samba</filename></member>
872 <term>CTDB_MANAGES_SAMBA=yes|no</term>
875 Should CTDB manage Samba?
884 <term>CTDB_MANAGES_WINBIND=yes|no</term>
887 Should CTDB manage Winbind?
896 <term>CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter></term>
899 When monitoring Samba, check TCP ports in
900 space-separated PORT-LIST.
903 Default is to monitor ports that Samba is configured to listen on.
909 <term>CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no</term>
912 As part of monitoring, should CTDB skip the check for
913 the existence of each directory configured as share in
914 Samba. This may be desirable if there is a large number
924 <term>CTDB_SERVICE_NMB=<parameter>SERVICE</parameter></term>
927 Distribution specific SERVICE for managing nmbd.
930 Default is distribution-dependant.
935 <term>CTDB_SERVICE_SMB=<parameter>SERVICE</parameter></term>
938 Distribution specific SERVICE for managing smbd.
941 Default is distribution-dependant.
947 <term>CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter></term>
950 Distribution specific SERVICE for managing winbindd.
953 Default is "winbind".
966 This includes parameters for the kernel NFS server.
967 Alternative NFS subsystems (such as <ulink
968 url="https://github.com/nfs-ganesha/nfs-ganesha/wiki">NFS-Ganesha</ulink>)
969 can be integrated using <varname>CTDB_NFS_CALLOUT</varname>.
973 <title>Eventscript</title>
976 <member><filename>60.nfs</filename></member>
983 <term>CTDB_CLUSTER_FILESYSTEM_TYPE=gpfs</term>
986 The type of cluster filesystem to use with NFS-ganesha.
987 Currently only "gpfs" is supported.
996 <term>CTDB_MANAGES_NFS=yes|no</term>
999 Should CTDB manage NFS?
1008 <term>CTDB_NFS_CALLOUT=<parameter>COMMAND</parameter></term>
1011 COMMAND specifies the path to a callout to handle
1012 interactions with the configured NFS system, including
1013 startup, shutdown, monitoring.
1016 Default is the included
1017 <command>nfs-linux-kernel-callout</command>.
1023 <term>CTDB_NFS_SKIP_SHARE_CHECK=yes|no</term>
1026 As part of monitoring, should CTDB skip the check for
1027 the existence of each directory exported via NFS. This
1028 may be desirable if there is a large number of exports.
1037 <term>CTDB_RPCINFO_LOCALHOST=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1040 IPADDR or HOSTNAME indicates the address that
1041 <command>rpcinfo</command> should connect to when doing
1042 <command>rpcinfo</command> check on IPv4 RPC service during
1043 monitoring. Optimally this would be "localhost".
1044 However, this can add some performance overheads.
1047 Default is "127.0.0.1".
1053 <term>CTDB_RPCINFO_LOCALHOST6=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1056 IPADDR or HOSTNAME indicates the address that
1057 <command>rpcinfo</command> should connect to when doing
1058 <command>rpcinfo</command> check on IPv6 RPC service
1059 during monitoring. Optimally this would be "localhost6"
1060 (or similar). However, this can add some performance
1074 <title>APACHE HTTPD</title>
1077 CTDB can manage the Apache web server.
1081 <title>Eventscript</title>
1084 <member><filename>41.httpd</filename></member>
1090 <term>CTDB_MANAGES_HTTPD=yes|no</term>
1093 Should CTDB manage the Apache web server?
1104 <title>CLAMAV</title>
1107 CTDB has support to manage the popular anti-virus daemon
1112 <title>Eventscript</title>
1115 <member><filename>31.clamd</filename></member>
1119 This eventscript is not enabled by default. Use
1120 <command>ctdb enablescript</command> to enable it.
1128 <term>CTDB_MANAGES_CLAMD=yes|no</term>
1131 Should CTDB manage ClamAV?
1140 <term>CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter></term>
1143 FILENAME is the socket to monitor ClamAV.
1156 <title>ISCSI</title>
1159 CTDB has support for managing the Linux iSCSI tgtd service.
1163 <title>Eventscript</title>
1166 <member><filename>70.iscsi</filename></member>
1173 <term>CTDB_MANAGES_ISCSI=yes|no</term>
1176 Should CTDB manage iSCSI tgtd?
1185 <term>CTDB_START_ISCSI_SCRIPTS=<parameter>DIRECTORY</parameter></term>
1188 DIRECTORY on shared storage containing scripts to start
1189 tgtd for each public IP address.
1200 <title>MULTIPATHD</title>
1203 CTDB can monitor multipath devices to ensure that active paths
1208 <title>Eventscript</title>
1211 <member><filename>20.multipathd</filename></member>
1215 This eventscript is not enabled by default. Use
1216 <command>ctdb enablescript</command> to enable it.
1222 <term>CTDB_MONITOR_MPDEVICES=<parameter>MP-DEVICE-LIST</parameter></term>
1225 MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
1236 <title>VSFTPD</title>
1239 CTDB can manage the vsftpd FTP server.
1243 <title>Eventscript</title>
1246 <member><filename>40.vsftpd</filename></member>
1252 <term>CTDB_MANAGES_VSFTPD=yes|no</term>
1255 Should CTDB manage the vsftpd FTP server?
1267 SYSTEM RESOURCE MONITORING CONFIGURATION
1271 CTDB can experience seemingly random (performance and other)
1272 issues if system resources become too constrained. Options in
1273 this section can be enabled to allow certain system resources
1274 to be checked. They allows warnings to be logged and nodes to
1275 be marked unhealthy when system resource usage reaches the
1276 configured thresholds.
1280 Some checks are enabled by default. It is recommended that
1281 these checks remain enabled or are augmented by extra checks.
1282 There is no supported way of completely disabling the checks.
1286 <title>Eventscripts</title>
1289 <member><filename>05.system</filename></member>
1293 Filesystem and memory usage monitoring is in
1294 <filename>05.system</filename>.
1301 <term>CTDB_MONITOR_FILESYSTEM_USAGE=<parameter>FS-LIMIT-LIST</parameter></term>
1304 FS-LIMIT-LIST is a space-separated list of
1305 <parameter>FILESYSTEM</parameter>:<parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1306 triples indicating that warnings should be logged if the
1307 space used on FILESYSTEM reaches WARN_LIMIT%. If usage
1308 reaches UNHEALTHY_LIMIT then the node should be flagged
1309 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1310 left blank, meaning that check will be omitted.
1314 Default is to warn for each filesystem containing a
1315 database directory (<envar>CTDB_DBDIR</envar>,
1316 <envar>CTDB_DBDIR_PERSISTENT</envar>,
1317 <envar>CTDB_DBDIR_STATE</envar>) with a threshold of
1324 <term>CTDB_MONITOR_MEMORY_USAGE=<parameter>MEM-LIMITS</parameter></term>
1327 MEM-LIMITS takes the form
1328 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1329 indicating that warnings should be logged if memory
1330 usage reaches WARN_LIMIT%. If usage reaches
1331 UNHEALTHY_LIMIT then the node should be flagged
1332 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1333 left blank, meaning that check will be omitted.
1336 Default is 80, so warnings will be logged when memory
1343 <term>CTDB_MONITOR_SWAP_USAGE=<parameter>SWAP-LIMITS</parameter></term>
1346 SWAP-LIMITS takes the form
1347 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1348 indicating that warnings should be logged if
1349 swap usage reaches WARN_LIMIT%. If usage reaches
1350 UNHEALTHY_LIMIT then the node should be flagged
1351 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1352 left blank, meaning that check will be omitted.
1355 Default is 25, so warnings will be logged when swap
1365 <title>MISCELLANEOUS SERVICE-RELATED CONFIGURATION</title>
1370 <term>CTDB_MANAGED_SERVICES=<parameter>SERVICE-LIST</parameter></term>
1373 SERVICE-LIST is a space-separated list of SERVICEs that
1374 CTDB should manage. This can be used as an alternative
1376 <varname>CTDB_MANAGES_<replaceable>SERVICE</replaceable></varname>
1386 <term>CTDB_SERVICE_AUTOSTARTSTOP=yes|no</term>
1389 When CTDB should start and stop services if they become
1390 managed or unmanaged.
1406 TUNABLES CONFIGURATION
1411 <citerefentry><refentrytitle>ctdbd-tunables</refentrytitle>
1412 <manvolnum>7</manvolnum></citerefentry>) can be set from the
1413 configuration file. They are set as follows:
1416 CTDB_SET_<replaceable>TUNABLE</replaceable>=<replaceable>VALUE</replaceable>
1423 <screen format="linespecific">
1424 CTDB_SET_MonitorInterval=20
1435 Variable in this section are for debugging and testing CTDB.
1436 They should not generally be needed.
1442 <term>CTDB_DEBUG_HUNG_SCRIPT=<parameter>FILENAME</parameter></term>
1445 FILENAME is a script to run to log debug information when
1446 an event script times out.
1449 Default is <filename><varname>CTDB_BASE</varname>/debug-hung-script.sh</filename>.
1455 <term>CTDB_DEBUG_HUNG_SCRIPT_LOGFILE=<parameter>FILENAME</parameter></term>
1458 FILENAME specifies where log messages should go when
1459 debugging hung eventscripts. This is a testing option.
1460 See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1463 No default. Messages go to stdout/stderr and are logged
1464 to the same place as other CTDB log messages.
1470 <term>CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<parameter>REGEXP</parameter></term>
1473 REGEXP specifies interesting processes for which stack
1474 traces should be logged when debugging hung eventscripts
1475 and those processes are matched in pstree output. REGEXP
1476 is an extended regexp so choices are separated by pipes
1477 ('|'). However, REGEXP should not contain parentheses.
1478 See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1481 Default is "exportfs|rpcinfo".
1487 <term>CTDB_DEBUG_LOCKS=<parameter>FILENAME</parameter></term>
1490 FILENAME is a script to run to log debug information when
1491 an CTDB fails to freeze databases during recovery.
1495 <filename><varname>CTDB_BASE</varname>/debug_locks.sh</filename>.
1501 <term>CTDB_SYS_ETCDIR=<parameter>DIRECTORY</parameter></term>
1504 DIRECTORY containing system configuration files. This is
1505 used to provide alternate configuration when testing and
1506 should not need to be changed from the default.
1509 Default is <filename>/etc</filename>.
1515 <term>CTDB_INIT_STYLE=debian|redhat|suse</term>
1518 This is the init style used by the Linux distribution (or
1519 other operating system) being used. This is usually
1520 determined dynamically by checking the system. This
1521 variable is used by the initscript to determine which init
1522 system primitives to use. It is also used by some
1523 eventscripts to choose the name of initscripts for certain
1524 services, since these can vary between distributions.
1530 If this option needs to be changed from the calculated
1531 default for the initscript to function properly, then it
1532 must be set in the distribution-specific initscript
1533 configuration, such as
1534 <filename>/etc/sysconfig/ctdb</filename>
1540 <term>CTDB_MAX_CORRUPT_DB_BACKUPS=<parameter>NUM</parameter></term>
1543 NUM is the maximum number of volatile TDB database backups
1544 to be kept (for each database) when a corrupt database is
1545 found during startup. Volatile TDBs are zeroed during
1546 startup so backups are needed to debug any corruption that
1547 occurs before a restart.
1556 <term>CTDB_MAX_OPEN_FILES=<parameter>NUM</parameter></term>
1559 NUM is the maximum number of open files.
1562 There is no default.
1568 <term>CTDB_RC_LOCAL=<parameter>FILENAME</parameter></term>
1571 FILENAME is a script fragment to be sourced by the
1572 <filename>functions</filename> that is sourced by scripts.
1573 On example use would be to override function definitions
1574 in unit tests. As a sanity check, this file must be
1575 executable for it to be used.
1584 <term>CTDB_RUN_TIMEOUT_MONITOR=yes|no</term>
1587 Whether CTDB should simulate timing out monitor events.
1588 This uses the <filename>99.timeout</filename> eventscript.
1597 <term>CTDB_SCRIPT_DEBUGLEVEL=<parameter>NUM</parameter></term>
1600 NUM is the level debugging messages printed by CTDB
1601 scripts. Setting this to a higher number (e.g. 4) will
1602 cause some scripts to log more messages.
1611 <term>CTDB_SUPPRESS_COREFILE=yes|no</term>
1614 Whether CTDB core files should be suppressed.
1623 <term>CTDB_VALGRIND=yes|no|<parameter>COMMAND</parameter></term>
1626 If "yes", this causes
1627 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1628 <manvolnum>1</manvolnum></citerefentry> to be run under
1629 <citerefentry><refentrytitle>valgrind</refentrytitle>
1630 <manvolnum>1</manvolnum></citerefentry> with logs going to
1631 <filename>/var/log/ctdb_valgrind</filename>. If neither
1632 "yes" nor "no" then the value is assumed to be a COMMAND
1633 (e.g. a <command>valgrind</command> variation, a
1634 <citerefentry><refentrytitle>gdb</refentrytitle>
1635 <manvolnum>1</manvolnum></citerefentry> command) that is
1636 used in place of the default <command>valgrind</command>
1637 command. In either case, the <option>--valgrind</option>
1638 option is passed to <command>ctdbd</command>.
1647 <term>CTDB_VARDIR=<parameter>DIRECTORY</parameter></term>
1650 DIRECTORY containing CTDB files that are modified at
1654 Defaults to <filename>/usr/local/var/lib/ctdb</filename>.
1665 <title>FILES</title>
1668 <member><filename>/etc/ctdb/ctdbd.conf</filename></member>
1669 <member><filename>/etc/sysconfig/ctdb</filename></member>
1670 <member><filename>/etc/default/ctdb</filename></member>
1671 <member><filename>/etc/ctdb/sysconfig/ctdb</filename></member>
1676 <title>SEE ALSO</title>
1678 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1679 <manvolnum>1</manvolnum></citerefentry>,
1681 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
1682 <manvolnum>1</manvolnum></citerefentry>,
1684 <citerefentry><refentrytitle>onnode</refentrytitle>
1685 <manvolnum>1</manvolnum></citerefentry>,
1687 <citerefentry><refentrytitle>ctdb</refentrytitle>
1688 <manvolnum>7</manvolnum></citerefentry>,
1690 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
1691 <manvolnum>7</manvolnum></citerefentry>,
1693 <ulink url="http://ctdb.samba.org/"/>
1700 This documentation was written by
1708 <holder>Andrew Tridgell</holder>
1709 <holder>Ronnie Sahlberg</holder>
1713 This program is free software; you can redistribute it and/or
1714 modify it under the terms of the GNU General Public License as
1715 published by the Free Software Foundation; either version 3 of
1716 the License, or (at your option) any later version.
1719 This program is distributed in the hope that it will be
1720 useful, but WITHOUT ANY WARRANTY; without even the implied
1721 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1722 PURPOSE. See the GNU General Public License for more details.
1725 You should have received a copy of the GNU General Public
1726 License along with this program; if not, see
1727 <ulink url="http://www.gnu.org/licenses"/>.