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>/usr/local/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>/usr/local/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>/usr/local/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 Apart from a DIRECTORY, this can take a special value of
164 <option>tmpfs</option><optional>:<parameter>OPTIONS</parameter></optional>.
165 OPTIONS is a comma-separated list of any permissible
166 options to the tmpfs filesystem. The only pre-specified
167 default is <option>mode=700</option>, which can
168 overriden by specifying <option>mode</option> in
169 OPTIONS. It probably makes sense to specify a maximum
170 <option>size</option>.
173 Corresponds to <option>--dbdir</option>.
179 <term>CTDB_DBDIR_PERSISTENT=<parameter>DIRECTORY</parameter></term>
182 Defaults to <filename>/usr/local/var/lib/ctdb/persistent</filename>.
185 Corresponds to <option>--dbdir-persistent</option>.
191 <term>CTDB_DBDIR_STATE=<parameter>DIRECTORY</parameter></term>
194 Defaults to <filename>/usr/local/var/lib/ctdb/state</filename>.
197 Corresponds to <option>--dbdir-state</option>.
203 <term>CTDB_DEBUGLEVEL=<parameter>DEBUGLEVEL</parameter></term>
206 Default is NOTICE (2). Corresponds to <option>-d</option> or
207 <option>--debug</option>.
213 <term>CTDB_EVENT_SCRIPT_DIR=<parameter>DIRECTORY</parameter></term>
216 Default is <varname>CTDB_BASE</varname>/events.d, so usually
217 <filename>/usr/local/etc/ctdb/events.d</filename>. Corresponds to
218 <option>--event-script-dir</option>.
224 <term>CTDB_LOGGING=<parameter>STRING</parameter></term>
227 STRING specifies where ctdbd will write its log. The
229 file:<filename>/usr/local/var/log/log.ctdb</filename>.
230 Corresponds to <option>--logging</option>.
237 <term>file:<parameter>FILENAME</parameter></term>
240 FILENAME where ctdbd will write its log. This is usually
241 <filename>/usr/local/var/log/log.ctdb</filename>.
246 <term>syslog<optional>:<parameter>METHOD</parameter></optional></term>
249 CTDB will log to syslog. By default this will use
253 If METHOD is specified then it specifies an
254 extension that causes logging to be done in a
255 non-blocking fashion. This can be useful under
256 heavy loads that might cause the syslog daemon to
257 dequeue messages too slowly, which would otherwise
258 cause CTDB to block when logging. METHOD must be
263 <term>nonblocking</term>
266 CTDB will log to syslog via
267 <filename>/dev/log</filename> in non-blocking
276 CTDB will log to syslog via UDP to
277 localhost:514. The syslog daemon must be
278 configured to listen on (at least)
279 localhost:514. Most implementations will log
280 the messages against hostname "localhost" -
281 this is a limit of the implementation for
282 compatibility with more syslog daemon
288 <term>udp-rfc5424</term>
291 As with "udp" but messages are sent in RFC5424
292 format. This method will log the correct
293 hostname but is not as widely implemented in
306 <term>CTDB_NODES=<parameter>FILENAME</parameter></term>
309 Default is <varname>CTDB_BASE</varname>/nodes, so usually
310 <filename>/usr/local/etc/ctdb/nodes</filename>. Corresponds to
311 <option>--nlist</option>.
317 <term>CTDB_NOTIFY_SCRIPT=<parameter>FILENAME</parameter></term>
321 <filename>/usr/local/etc/ctdb/notify.sh</filename>. Corresponds to
322 <option>--notification-script</option>.
328 <term>CTDB_MAX_PERSISTENT_CHECK_ERRORS=<parameter>NUM</parameter></term>
331 Default 0. Corresponds to
332 <option>--max-persistent-check-errors</option>.
338 <term>CTDB_NODE_ADDRESS=<parameter>IPADDR</parameter></term>
341 IPADDR is the private IP address that ctdbd will bind to.
342 Corresponds to <option>--listen</option>.
345 By default ctdbd will select the first address from the
346 nodes list that in can bind to. See also
347 <citetitle>CTDB_NODES</citetitle>.
350 This option is only required when automatic address
351 detection can not be used. This can be the case when
352 running multiple ctdbd daemons/nodes on the same physical
353 host (usually for testing), using InfiniBand for the
354 private network or on Linux when sysctl
355 net.ipv4.ip_nonlocal_bind=1.
361 <term>CTDB_PUBLIC_ADDRESSES=<parameter>FILENAME</parameter></term>
365 <filename>/usr/local/etc/ctdb/public_addresses</filename>.
366 Corresponds to <option>--public-addresses</option>.
372 <term>CTDB_PUBLIC_INTERFACE=<parameter>INTERFACE</parameter></term>
375 No default. Corresponds to
376 <option>--public-interface</option>.
382 <term>CTDB_RECOVERY_LOCK=<parameter>FILENAME</parameter></term>
386 <filename>/some/place/on/shared/storage</filename>, which
387 should be change to a useful value. Corresponds to
388 <option>--reclock</option>.
391 For information about the recovery lock please see the
392 <citetitle>RECOVERY LOCK</citetitle> section in
393 <citerefentry><refentrytitle>ctdb</refentrytitle>
394 <manvolnum>7</manvolnum></citerefentry>.
400 <term>CTDB_SCRIPT_LOG_LEVEL=<parameter>DEBUGLEVEL</parameter></term>
403 Defaults to ERR (0). Corresponds to
404 <option>--script-log-level</option>.
410 <term>CTDB_SOCKET=<parameter>FILENAME</parameter></term>
413 Defaults to <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
414 Corresponds to <option>--socket</option>.
417 If you change this then you probably want to set this in
418 root's environment (perhaps in a file in
419 <filename>/etc/profile.d</filename>) so that you can use
420 the <citerefentry><refentrytitle>ctdb</refentrytitle>
421 <manvolnum>1</manvolnum></citerefentry> command in a
422 straightforward manner.
428 <term>CTDB_START_AS_DISABLED=yes|no</term>
431 Default is no. Corresponds to
432 <option>--start-as-disabled</option>.
438 <term>CTDB_START_AS_STOPPED=yes|no</term>
441 Default is no. Corresponds to
442 <option>--start-as-stopped</option>.
448 <term>CTDB_TRANSPORT=tcp|infiniband</term>
451 Defaults to tcp. Corresponds to
452 <option>--transport</option>.
460 While the following variables do not translate into daemon
461 options they are used by
462 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
463 <manvolnum>1</manvolnum></citerefentry> when starting and
464 stopping <citerefentry><refentrytitle>ctdbd</refentrytitle>
465 <manvolnum>1</manvolnum></citerefentry>.
471 <term>CTDB_SHUTDOWN_TIMEOUT=<parameter>NUM</parameter></term>
474 NUM is the number of seconds to wait for
475 <citerefentry><refentrytitle>ctdbd</refentrytitle>
476 <manvolnum>1</manvolnum></citerefentry> to shut down
477 gracefully before giving up and killing it.
487 <term>CTDB_STARTUP_TIMEOUT=<parameter>NUM</parameter></term>
490 NUM is the number of seconds to wait for
491 <citerefentry><refentrytitle>ctdbd</refentrytitle>
492 <manvolnum>1</manvolnum></citerefentry> complete early
493 initialisation up to a point where it is unlikely to
494 abort. If <command>ctdbd</command> doesn't complete the
495 "setup" event before this timeout then it is killed.
508 <title>NETWORK CONFIGURATION</title>
511 <title>NAT GATEWAY</title>
514 NAT gateway is used to configure fallback routing for nodes
515 when they do not host any public IP addresses. For example,
516 it allows unhealthy nodes to reliably communicate with
517 external infrastructure. One node in a NAT gateway group will
518 be designated as the NAT gateway master node and other (slave)
519 nodes will be configured with fallback routes via the NAT
520 gateway master node. For more information, see the
521 <citetitle>NAT GATEWAY</citetitle> section in
522 <citerefentry><refentrytitle>ctdb</refentrytitle>
523 <manvolnum>7</manvolnum></citerefentry>.
529 <term>CTDB_NATGW_DEFAULT_GATEWAY=<parameter>IPADDR</parameter></term>
532 IPADDR is an alternate network gateway to use on the NAT
533 gateway master node. If set, a fallback default route
534 is added via this network gateway.
537 No default. Setting this variable is optional - if not
538 set that no route is created on the NAT gateway master
545 <term>CTDB_NATGW_NODES=<parameter>FILENAME</parameter></term>
548 FILENAME contains the list of nodes that belong to the
549 same NAT gateway group.
554 <parameter>IPADDR</parameter> <optional>slave-only</optional>
558 IPADDR is the private IP address of each node in the NAT
562 If "slave-only" is specified then the corresponding node
563 can not be the NAT gateway master node. In this case
564 <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and
565 <varname>CTDB_NATGW_PUBLIC_IP</varname> are optional and
570 <filename>/usr/local/etc/ctdb/natgw_nodes</filename> when enabled.
576 <term>CTDB_NATGW_PRIVATE_NETWORK=<parameter>IPADDR/MASK</parameter></term>
579 IPADDR/MASK is the private sub-network that is
580 internally routed via the NAT gateway master node. This
581 is usually the private network that is used for node
591 <term>CTDB_NATGW_PUBLIC_IFACE=<parameter>IFACE</parameter></term>
594 IFACE is the network interface on which the
595 CTDB_NATGW_PUBLIC_IP will be configured.
604 <term>CTDB_NATGW_PUBLIC_IP=<parameter>IPADDR/MASK</parameter></term>
607 IPADDR/MASK indicates the IP address that is used for
608 outgoing traffic (originating from
609 CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
610 node. This <emphasis>must not</emphasis> be a
611 configured public IP address.
620 <term>CTDB_NATGW_STATIC_ROUTES=<parameter>IPADDR/MASK[@GATEWAY]</parameter> ...</term>
623 Each IPADDR/MASK identifies a network or host to which
624 NATGW should create a fallback route, instead of
625 creating a single default route. This can be used when
626 there is already a default route, via an interface that
627 can not reach required infrastructure, that overrides
628 the NAT gateway default route.
631 If GATEWAY is specified then the corresponding route on
632 the NATGW master node will be via GATEWAY. Such routes
634 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is not
635 specified. If GATEWAY is not specified for some
636 networks then routes are only created on the NATGW
637 master node for those networks if
638 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
642 This should be used with care to avoid causing traffic
643 to unnecessarily double-hop through the NAT gateway
644 master, even when a node is hosting public IP addresses.
645 Each specified network or host should probably have a
646 corresponding automatically created link route or static
658 <title>Example</title>
660 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
661 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
662 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
663 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
664 CTDB_NATGW_PUBLIC_IFACE=eth0
668 A variation that ensures that infrastructure (ADS, DNS, ...)
669 directly attached to the public network (10.0.0.0/24) is
670 always reachable would look like this:
673 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
674 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
675 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
676 CTDB_NATGW_PUBLIC_IFACE=eth0
677 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
680 Note that <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
688 <title>POLICY ROUTING</title>
691 A node running CTDB may be a component of a complex network
692 topology. In particular, public addresses may be spread
693 across several different networks (or VLANs) and it may not be
694 possible to route packets from these public addresses via the
695 system's default route. Therefore, CTDB has support for
696 policy routing via the <filename>13.per_ip_routing</filename>
697 eventscript. This allows routing to be specified for packets
698 sourced from each public address. The routes are added and
699 removed as CTDB moves public addresses between nodes.
703 For more information, see the <citetitle>POLICY
704 ROUTING</citetitle> section in
705 <citerefentry><refentrytitle>ctdb</refentrytitle>
706 <manvolnum>7</manvolnum></citerefentry>.
711 <term>CTDB_PER_IP_ROUTING_CONF=<parameter>FILENAME</parameter></term>
714 FILENAME contains elements for constructing the desired
715 routes for each source address.
719 The special FILENAME value
720 <constant>__auto_link_local__</constant> indicates that no
721 configuration file is provided and that CTDB should
722 generate reasonable link-local routes for each public IP
729 <parameter>IPADDR</parameter> <parameter>DEST-IPADDR/MASK</parameter> <optional><parameter>GATEWAY-IPADDR</parameter></optional>
735 <filename>/usr/local/etc/ctdb/policy_routing</filename> when enabled.
741 <term>CTDB_PER_IP_ROUTING_RULE_PREF=<parameter>NUM</parameter></term>
744 NUM sets the priority (or preference) for the routing
745 rules that are added by CTDB.
749 This should be (strictly) greater than 0 and (strictly)
750 less than 32766. A priority of 100 is recommended, unless
751 this conflicts with a priority already in use on the
753 <citerefentry><refentrytitle>ip</refentrytitle>
754 <manvolnum>8</manvolnum></citerefentry>, for more details.
761 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<parameter>LOW-NUM</parameter>,
762 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<parameter>HIGH-NUM</parameter>
766 CTDB determines a unique routing table number to use for
767 the routing related to each public address. LOW-NUM and
768 HIGH-NUM indicate the minimum and maximum routing table
769 numbers that are used.
773 <citerefentry><refentrytitle>ip</refentrytitle>
774 <manvolnum>8</manvolnum></citerefentry> uses some
775 reserved routing table numbers below 255. Therefore,
776 CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
781 CTDB uses the standard file
782 <filename>/etc/iproute2/rt_tables</filename> to maintain
783 a mapping between the routing table numbers and labels.
784 The label for a public address
785 <replaceable>ADDR</replaceable> will look like
786 ctdb.<replaceable>addr</replaceable>. This means that
787 the associated rules and routes are easy to read (and
792 No default, usually 1000 and 9000.
799 <title>Example</title>
801 CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
802 CTDB_PER_IP_ROUTING_RULE_PREF=100
803 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
804 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
814 For a general description see the <citetitle>LVS</citetitle>
815 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
816 <manvolnum>7</manvolnum></citerefentry>.
820 <title>Eventscript</title>
823 <member><filename>91.lvs</filename></member>
830 <term>CTDB_LVS_NODES=<parameter>FILENAME</parameter></term>
833 FILENAME contains the list of nodes that belong to the
839 <parameter>IPADDR</parameter> <optional>slave-only</optional>
843 IPADDR is the private IP address of each node in the LVS
847 If "slave-only" is specified then the corresponding node
848 can not be the LVS master node. In this case
849 <varname>CTDB_LVS_PUBLIC_IFACE</varname> and
850 <varname>CTDB_LVS_PUBLIC_IP</varname> are optional and
855 <filename>/usr/local/etc/ctdb/lvs_nodes</filename> when enabled.
861 <term>CTDB_LVS_PUBLIC_IFACE=<parameter>INTERFACE</parameter></term>
864 INTERFACE is the network interface that clients will use
865 to connection to <varname>CTDB_LVS_PUBLIC_IP</varname>.
866 This is optional for slave-only nodes.
873 <term>CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter></term>
876 CTDB_LVS_PUBLIC_IP is the LVS public address. No
886 <title>MISCELLANEOUS NETWORK CONFIGURATION</title>
891 <term>CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no</term>
894 Whether one or more offline interfaces should cause a
895 monitor event to fail if there are other interfaces that
896 are up. If this is "yes" and a node has some interfaces
897 that are down then <command>ctdb status</command> will
898 display the node as "PARTIALLYONLINE".
902 Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is
903 incompatible with NAT gateway, since NAT gateway relies
904 on the interface configured by CTDB_NATGW_PUBLIC_IFACE
920 <title>SERVICE CONFIGURATION</title>
923 CTDB can be configured to manage and/or monitor various NAS (and
924 other) services via its eventscripts.
928 In the simplest case CTDB will manage a service. This means the
929 service will be started and stopped along with CTDB, CTDB will
930 monitor the service and CTDB will do any required
931 reconfiguration of the service when public IP addresses are
939 <title>Eventscripts</title>
942 <member><filename>49.winbind</filename></member>
943 <member><filename>50.samba</filename></member>
950 <term>CTDB_MANAGES_SAMBA=yes|no</term>
953 Should CTDB manage Samba?
962 <term>CTDB_MANAGES_WINBIND=yes|no</term>
965 Should CTDB manage Winbind?
974 <term>CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter></term>
977 When monitoring Samba, check TCP ports in
978 space-separated PORT-LIST.
981 Default is to monitor ports that Samba is configured to listen on.
987 <term>CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no</term>
990 As part of monitoring, should CTDB skip the check for
991 the existence of each directory configured as share in
992 Samba. This may be desirable if there is a large number
1002 <term>CTDB_SERVICE_NMB=<parameter>SERVICE</parameter></term>
1005 Distribution specific SERVICE for managing nmbd.
1008 Default is distribution-dependant.
1013 <term>CTDB_SERVICE_SMB=<parameter>SERVICE</parameter></term>
1016 Distribution specific SERVICE for managing smbd.
1019 Default is distribution-dependant.
1025 <term>CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter></term>
1028 Distribution specific SERVICE for managing winbindd.
1031 Default is "winbind".
1044 This includes parameters for the kernel NFS server.
1045 Alternative NFS subsystems (such as <ulink
1046 url="https://github.com/nfs-ganesha/nfs-ganesha/wiki">NFS-Ganesha</ulink>)
1047 can be integrated using <varname>CTDB_NFS_CALLOUT</varname>.
1051 <title>Eventscript</title>
1054 <member><filename>60.nfs</filename></member>
1061 <term>CTDB_CLUSTER_FILESYSTEM_TYPE=gpfs</term>
1064 The type of cluster filesystem to use with NFS-ganesha.
1065 Currently only "gpfs" is supported.
1074 <term>CTDB_MANAGES_NFS=yes|no</term>
1077 Should CTDB manage NFS?
1086 <term>CTDB_NFS_CALLOUT=<parameter>COMMAND</parameter></term>
1089 COMMAND specifies the path to a callout to handle
1090 interactions with the configured NFS system, including
1091 startup, shutdown, monitoring.
1094 Default is the included
1095 <command>nfs-linux-kernel-callout</command>.
1101 <term>CTDB_NFS_SKIP_SHARE_CHECK=yes|no</term>
1104 As part of monitoring, should CTDB skip the check for
1105 the existence of each directory exported via NFS. This
1106 may be desirable if there is a large number of exports.
1115 <term>CTDB_RPCINFO_LOCALHOST=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1118 IPADDR or HOSTNAME indicates the address that
1119 <command>rpcinfo</command> should connect to when doing
1120 <command>rpcinfo</command> check on IPv4 RPC service during
1121 monitoring. Optimally this would be "localhost".
1122 However, this can add some performance overheads.
1125 Default is "127.0.0.1".
1131 <term>CTDB_RPCINFO_LOCALHOST6=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1134 IPADDR or HOSTNAME indicates the address that
1135 <command>rpcinfo</command> should connect to when doing
1136 <command>rpcinfo</command> check on IPv6 RPC service
1137 during monitoring. Optimally this would be "localhost6"
1138 (or similar). However, this can add some performance
1152 <title>APACHE HTTPD</title>
1155 CTDB can manage the Apache web server.
1159 <title>Eventscript</title>
1162 <member><filename>41.httpd</filename></member>
1168 <term>CTDB_MANAGES_HTTPD=yes|no</term>
1171 Should CTDB manage the Apache web server?
1182 <title>CLAMAV</title>
1185 CTDB has support to manage the popular anti-virus daemon
1190 <title>Eventscript</title>
1193 <member><filename>31.clamd</filename></member>
1197 This eventscript is not enabled by default. Use
1198 <command>ctdb enablescript</command> to enable it.
1206 <term>CTDB_MANAGES_CLAMD=yes|no</term>
1209 Should CTDB manage ClamAV?
1218 <term>CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter></term>
1221 FILENAME is the socket to monitor ClamAV.
1234 <title>ISCSI</title>
1237 CTDB has support for managing the Linux iSCSI tgtd service.
1241 <title>Eventscript</title>
1244 <member><filename>70.iscsi</filename></member>
1251 <term>CTDB_MANAGES_ISCSI=yes|no</term>
1254 Should CTDB manage iSCSI tgtd?
1263 <term>CTDB_START_ISCSI_SCRIPTS=<parameter>DIRECTORY</parameter></term>
1266 DIRECTORY on shared storage containing scripts to start
1267 tgtd for each public IP address.
1278 <title>MULTIPATHD</title>
1281 CTDB can monitor multipath devices to ensure that active paths
1286 <title>Eventscript</title>
1289 <member><filename>20.multipathd</filename></member>
1293 This eventscript is not enabled by default. Use
1294 <command>ctdb enablescript</command> to enable it.
1300 <term>CTDB_MONITOR_MPDEVICES=<parameter>MP-DEVICE-LIST</parameter></term>
1303 MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
1314 <title>VSFTPD</title>
1317 CTDB can manage the vsftpd FTP server.
1321 <title>Eventscript</title>
1324 <member><filename>40.vsftpd</filename></member>
1330 <term>CTDB_MANAGES_VSFTPD=yes|no</term>
1333 Should CTDB manage the vsftpd FTP server?
1345 SYSTEM RESOURCE MONITORING CONFIGURATION
1349 CTDB can experience seemingly random (performance and other)
1350 issues if system resources become too constrained. Options in
1351 this section can be enabled to allow certain system resources
1352 to be checked. They allows warnings to be logged and nodes to
1353 be marked unhealthy when system resource usage reaches the
1354 configured thresholds.
1358 Some checks are enabled by default. It is recommended that
1359 these checks remain enabled or are augmented by extra checks.
1360 There is no supported way of completely disabling the checks.
1364 <title>Eventscripts</title>
1367 <member><filename>05.system</filename></member>
1371 Filesystem and memory usage monitoring is in
1372 <filename>05.system</filename>.
1379 <term>CTDB_MONITOR_FILESYSTEM_USAGE=<parameter>FS-LIMIT-LIST</parameter></term>
1382 FS-LIMIT-LIST is a space-separated list of
1383 <parameter>FILESYSTEM</parameter>:<parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1384 triples indicating that warnings should be logged if the
1385 space used on FILESYSTEM reaches WARN_LIMIT%. If usage
1386 reaches UNHEALTHY_LIMIT then the node should be flagged
1387 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1388 left blank, meaning that check will be omitted.
1392 Default is to warn for each filesystem containing a
1393 database directory (<envar>CTDB_DBDIR</envar>,
1394 <envar>CTDB_DBDIR_PERSISTENT</envar>,
1395 <envar>CTDB_DBDIR_STATE</envar>) with a threshold of
1402 <term>CTDB_MONITOR_MEMORY_USAGE=<parameter>MEM-LIMITS</parameter></term>
1405 MEM-LIMITS takes the form
1406 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1407 indicating that warnings should be logged if memory
1408 usage reaches WARN_LIMIT%. If usage reaches
1409 UNHEALTHY_LIMIT then the node should be flagged
1410 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1411 left blank, meaning that check will be omitted.
1414 Default is 80, so warnings will be logged when memory
1421 <term>CTDB_MONITOR_SWAP_USAGE=<parameter>SWAP-LIMITS</parameter></term>
1424 SWAP-LIMITS takes the form
1425 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1426 indicating that warnings should be logged if
1427 swap usage reaches WARN_LIMIT%. If usage reaches
1428 UNHEALTHY_LIMIT then the node should be flagged
1429 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1430 left blank, meaning that check will be omitted.
1433 Default is 25, so warnings will be logged when swap
1443 <title>MISCELLANEOUS SERVICE-RELATED CONFIGURATION</title>
1448 <term>CTDB_MANAGED_SERVICES=<parameter>SERVICE-LIST</parameter></term>
1451 SERVICE-LIST is a space-separated list of SERVICEs that
1452 CTDB should manage. This can be used as an alternative
1454 <varname>CTDB_MANAGES_<replaceable>SERVICE</replaceable></varname>
1464 <term>CTDB_SERVICE_AUTOSTARTSTOP=yes|no</term>
1467 When CTDB should start and stop services if they become
1468 managed or unmanaged.
1484 TUNABLES CONFIGURATION
1489 <citerefentry><refentrytitle>ctdbd-tunables</refentrytitle>
1490 <manvolnum>7</manvolnum></citerefentry>) can be set from the
1491 configuration file. They are set as follows:
1494 CTDB_SET_<replaceable>TUNABLE</replaceable>=<replaceable>VALUE</replaceable>
1501 <screen format="linespecific">
1502 CTDB_SET_MonitorInterval=20
1513 Variable in this section are for debugging and testing CTDB.
1514 They should not generally be needed.
1520 <term>CTDB_DEBUG_HUNG_SCRIPT=<parameter>FILENAME</parameter></term>
1523 FILENAME is a script to run to log debug information when
1524 an event script times out.
1527 Default is <filename><varname>CTDB_BASE</varname>/debug-hung-script.sh</filename>.
1533 <term>CTDB_DEBUG_HUNG_SCRIPT_LOGFILE=<parameter>FILENAME</parameter></term>
1536 FILENAME specifies where log messages should go when
1537 debugging hung eventscripts. This is a testing option.
1538 See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1541 No default. Messages go to stdout/stderr and are logged
1542 to the same place as other CTDB log messages.
1548 <term>CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<parameter>REGEXP</parameter></term>
1551 REGEXP specifies interesting processes for which stack
1552 traces should be logged when debugging hung eventscripts
1553 and those processes are matched in pstree output. REGEXP
1554 is an extended regexp so choices are separated by pipes
1555 ('|'). However, REGEXP should not contain parentheses.
1556 See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1559 Default is "exportfs|rpcinfo".
1565 <term>CTDB_DEBUG_LOCKS=<parameter>FILENAME</parameter></term>
1568 FILENAME is a script to run to log debug information when
1569 an CTDB fails to freeze databases during recovery.
1573 <filename><varname>CTDB_BASE</varname>/debug_locks.sh</filename>.
1579 <term>CTDB_SYS_ETCDIR=<parameter>DIRECTORY</parameter></term>
1582 DIRECTORY containing system configuration files. This is
1583 used to provide alternate configuration when testing and
1584 should not need to be changed from the default.
1587 Default is <filename>/etc</filename>.
1593 <term>CTDB_INIT_STYLE=debian|redhat|suse</term>
1596 This is the init style used by the Linux distribution (or
1597 other operating system) being used. This is usually
1598 determined dynamically by checking the system. This
1599 variable is used by the initscript to determine which init
1600 system primitives to use. It is also used by some
1601 eventscripts to choose the name of initscripts for certain
1602 services, since these can vary between distributions.
1608 If this option needs to be changed from the calculated
1609 default for the initscript to function properly, then it
1610 must be set in the distribution-specific initscript
1611 configuration, such as
1612 <filename>/etc/sysconfig/ctdb</filename>
1618 <term>CTDB_MAX_CORRUPT_DB_BACKUPS=<parameter>NUM</parameter></term>
1621 NUM is the maximum number of volatile TDB database backups
1622 to be kept (for each database) when a corrupt database is
1623 found during startup. Volatile TDBs are zeroed during
1624 startup so backups are needed to debug any corruption that
1625 occurs before a restart.
1634 <term>CTDB_MAX_OPEN_FILES=<parameter>NUM</parameter></term>
1637 NUM is the maximum number of open files.
1640 There is no default.
1646 <term>CTDB_RC_LOCAL=<parameter>FILENAME</parameter></term>
1649 FILENAME is a script fragment to be sourced by the
1650 <filename>functions</filename> that is sourced by scripts.
1651 On example use would be to override function definitions
1652 in unit tests. As a sanity check, this file must be
1653 executable for it to be used.
1662 <term>CTDB_RUN_TIMEOUT_MONITOR=yes|no</term>
1665 Whether CTDB should simulate timing out monitor events.
1666 This uses the <filename>99.timeout</filename> eventscript.
1675 <term>CTDB_SCRIPT_DEBUGLEVEL=<parameter>NUM</parameter></term>
1678 NUM is the level debugging messages printed by CTDB
1679 scripts. Setting this to a higher number (e.g. 4) will
1680 cause some scripts to log more messages.
1689 <term>CTDB_SUPPRESS_COREFILE=yes|no</term>
1692 Whether CTDB core files should be suppressed.
1701 <term>CTDB_VALGRIND=yes|no|<parameter>COMMAND</parameter></term>
1704 If "yes", this causes
1705 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1706 <manvolnum>1</manvolnum></citerefentry> to be run under
1707 <citerefentry><refentrytitle>valgrind</refentrytitle>
1708 <manvolnum>1</manvolnum></citerefentry> with logs going to
1709 <filename>/usr/local/var/log/ctdb_valgrind</filename>. If neither
1710 "yes" nor "no" then the value is assumed to be a COMMAND
1711 (e.g. a <command>valgrind</command> variation, a
1712 <citerefentry><refentrytitle>gdb</refentrytitle>
1713 <manvolnum>1</manvolnum></citerefentry> command) that is
1714 used in place of the default <command>valgrind</command>
1715 command. In either case, the <option>--valgrind</option>
1716 option is passed to <command>ctdbd</command>.
1725 <term>CTDB_VARDIR=<parameter>DIRECTORY</parameter></term>
1728 DIRECTORY containing CTDB files that are modified at
1732 Defaults to <filename>/usr/local/var/lib/ctdb</filename>.
1743 <title>FILES</title>
1746 <member><filename>/usr/local/etc/ctdb/ctdbd.conf</filename></member>
1747 <member><filename>/etc/sysconfig/ctdb</filename></member>
1748 <member><filename>/etc/default/ctdb</filename></member>
1749 <member><filename>/usr/local/etc/ctdb/sysconfig/ctdb</filename></member>
1754 <title>SEE ALSO</title>
1756 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1757 <manvolnum>1</manvolnum></citerefentry>,
1759 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
1760 <manvolnum>1</manvolnum></citerefentry>,
1762 <citerefentry><refentrytitle>onnode</refentrytitle>
1763 <manvolnum>1</manvolnum></citerefentry>,
1765 <citerefentry><refentrytitle>ctdb</refentrytitle>
1766 <manvolnum>7</manvolnum></citerefentry>,
1768 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
1769 <manvolnum>7</manvolnum></citerefentry>,
1771 <ulink url="http://ctdb.samba.org/"/>
1778 This documentation was written by
1786 <holder>Andrew Tridgell</holder>
1787 <holder>Ronnie Sahlberg</holder>
1791 This program is free software; you can redistribute it and/or
1792 modify it under the terms of the GNU General Public License as
1793 published by the Free Software Foundation; either version 3 of
1794 the License, or (at your option) any later version.
1797 This program is distributed in the hope that it will be
1798 useful, but WITHOUT ANY WARRANTY; without even the implied
1799 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1800 PURPOSE. See the GNU General Public License for more details.
1803 You should have received a copy of the GNU General Public
1804 License along with this program; if not, see
1805 <ulink url="http://www.gnu.org/licenses"/>.