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_NOSETSCHED=yes|no</term>
320 Defaults to no. Corresponds to <option>--nosetsched</option>.
323 Usually CTDB runs with real-time priority. If you are running
324 CTDB on a platform that does not support real-time priority,
331 <term>CTDB_NOTIFY_SCRIPT=<parameter>FILENAME</parameter></term>
335 <filename>/usr/local/etc/ctdb/notify.sh</filename>. Corresponds to
336 <option>--notification-script</option>.
342 <term>CTDB_MAX_PERSISTENT_CHECK_ERRORS=<parameter>NUM</parameter></term>
345 Default 0. Corresponds to
346 <option>--max-persistent-check-errors</option>.
352 <term>CTDB_NODE_ADDRESS=<parameter>IPADDR</parameter></term>
355 IPADDR is the private IP address that ctdbd will bind to.
356 Corresponds to <option>--listen</option>.
359 By default ctdbd will select the first address from the
360 nodes list that in can bind to. See also
361 <citetitle>CTDB_NODES</citetitle>.
364 This option is only required when automatic address
365 detection can not be used. This can be the case when
366 running multiple ctdbd daemons/nodes on the same physical
367 host (usually for testing), using InfiniBand for the
368 private network or on Linux when sysctl
369 net.ipv4.ip_nonlocal_bind=1.
375 <term>CTDB_PUBLIC_ADDRESSES=<parameter>FILENAME</parameter></term>
379 <filename>/usr/local/etc/ctdb/public_addresses</filename>.
380 Corresponds to <option>--public-addresses</option>.
386 <term>CTDB_PUBLIC_INTERFACE=<parameter>INTERFACE</parameter></term>
389 No default. Corresponds to
390 <option>--public-interface</option>.
396 <term>CTDB_RECOVERY_LOCK=<parameter>LOCK</parameter></term>
399 LOCK specifies the cluster-wide mutex used to detect and
400 prevent a partitioned cluster (or "split brain").
403 No default, but the default configuration file specifies
404 <filename>/some/place/on/shared/storage</filename>, which
405 should be change to a useful value. Corresponds to
406 <option>--reclock</option>.
409 For information about the recovery lock please see the
410 <citetitle>RECOVERY LOCK</citetitle> section in
411 <citerefentry><refentrytitle>ctdb</refentrytitle>
412 <manvolnum>7</manvolnum></citerefentry>.
418 <term>CTDB_SCRIPT_LOG_LEVEL=<parameter>DEBUGLEVEL</parameter></term>
421 Defaults to ERR (0). Corresponds to
422 <option>--script-log-level</option>.
428 <term>CTDB_SOCKET=<parameter>FILENAME</parameter></term>
431 Defaults to <filename>/usr/local/var/run/ctdb/ctdbd.socket</filename>.
432 Corresponds to <option>--socket</option>.
435 If you change this then you probably want to set this in
436 root's environment (perhaps in a file in
437 <filename>/etc/profile.d</filename>) so that you can use
438 the <citerefentry><refentrytitle>ctdb</refentrytitle>
439 <manvolnum>1</manvolnum></citerefentry> command in a
440 straightforward manner.
446 <term>CTDB_START_AS_DISABLED=yes|no</term>
449 Default is no. Corresponds to
450 <option>--start-as-disabled</option>.
456 <term>CTDB_START_AS_STOPPED=yes|no</term>
459 Default is no. Corresponds to
460 <option>--start-as-stopped</option>.
466 <term>CTDB_TRANSPORT=tcp|infiniband</term>
469 Defaults to tcp. Corresponds to
470 <option>--transport</option>.
478 While the following variables do not translate into daemon
479 options they are used by
480 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
481 <manvolnum>1</manvolnum></citerefentry> when starting and
482 stopping <citerefentry><refentrytitle>ctdbd</refentrytitle>
483 <manvolnum>1</manvolnum></citerefentry>.
489 <term>CTDB_SHUTDOWN_TIMEOUT=<parameter>NUM</parameter></term>
492 NUM is the number of seconds to wait for
493 <citerefentry><refentrytitle>ctdbd</refentrytitle>
494 <manvolnum>1</manvolnum></citerefentry> to shut down
495 gracefully before giving up and killing it.
505 <term>CTDB_STARTUP_TIMEOUT=<parameter>NUM</parameter></term>
508 NUM is the number of seconds to wait for
509 <citerefentry><refentrytitle>ctdbd</refentrytitle>
510 <manvolnum>1</manvolnum></citerefentry> complete early
511 initialisation up to a point where it is unlikely to
512 abort. If <command>ctdbd</command> doesn't complete the
513 "setup" event before this timeout then it is killed.
526 <title>NETWORK CONFIGURATION</title>
529 <title>NAT GATEWAY</title>
532 NAT gateway is used to configure fallback routing for nodes
533 when they do not host any public IP addresses. For example,
534 it allows unhealthy nodes to reliably communicate with
535 external infrastructure. One node in a NAT gateway group will
536 be designated as the NAT gateway master node and other (slave)
537 nodes will be configured with fallback routes via the NAT
538 gateway master node. For more information, see the
539 <citetitle>NAT GATEWAY</citetitle> section in
540 <citerefentry><refentrytitle>ctdb</refentrytitle>
541 <manvolnum>7</manvolnum></citerefentry>.
547 <term>CTDB_NATGW_DEFAULT_GATEWAY=<parameter>IPADDR</parameter></term>
550 IPADDR is an alternate network gateway to use on the NAT
551 gateway master node. If set, a fallback default route
552 is added via this network gateway.
555 No default. Setting this variable is optional - if not
556 set that no route is created on the NAT gateway master
563 <term>CTDB_NATGW_NODES=<parameter>FILENAME</parameter></term>
566 FILENAME contains the list of nodes that belong to the
567 same NAT gateway group.
572 <parameter>IPADDR</parameter> <optional>slave-only</optional>
576 IPADDR is the private IP address of each node in the NAT
580 If "slave-only" is specified then the corresponding node
581 can not be the NAT gateway master node. In this case
582 <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and
583 <varname>CTDB_NATGW_PUBLIC_IP</varname> are optional and
588 <filename>/usr/local/etc/ctdb/natgw_nodes</filename> when enabled.
594 <term>CTDB_NATGW_PRIVATE_NETWORK=<parameter>IPADDR/MASK</parameter></term>
597 IPADDR/MASK is the private sub-network that is
598 internally routed via the NAT gateway master node. This
599 is usually the private network that is used for node
609 <term>CTDB_NATGW_PUBLIC_IFACE=<parameter>IFACE</parameter></term>
612 IFACE is the network interface on which the
613 CTDB_NATGW_PUBLIC_IP will be configured.
622 <term>CTDB_NATGW_PUBLIC_IP=<parameter>IPADDR/MASK</parameter></term>
625 IPADDR/MASK indicates the IP address that is used for
626 outgoing traffic (originating from
627 CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
628 node. This <emphasis>must not</emphasis> be a
629 configured public IP address.
638 <term>CTDB_NATGW_STATIC_ROUTES=<parameter>IPADDR/MASK[@GATEWAY]</parameter> ...</term>
641 Each IPADDR/MASK identifies a network or host to which
642 NATGW should create a fallback route, instead of
643 creating a single default route. This can be used when
644 there is already a default route, via an interface that
645 can not reach required infrastructure, that overrides
646 the NAT gateway default route.
649 If GATEWAY is specified then the corresponding route on
650 the NATGW master node will be via GATEWAY. Such routes
652 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is not
653 specified. If GATEWAY is not specified for some
654 networks then routes are only created on the NATGW
655 master node for those networks if
656 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
660 This should be used with care to avoid causing traffic
661 to unnecessarily double-hop through the NAT gateway
662 master, even when a node is hosting public IP addresses.
663 Each specified network or host should probably have a
664 corresponding automatically created link route or static
676 <title>Example</title>
678 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
679 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
680 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
681 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
682 CTDB_NATGW_PUBLIC_IFACE=eth0
686 A variation that ensures that infrastructure (ADS, DNS, ...)
687 directly attached to the public network (10.0.0.0/24) is
688 always reachable would look like this:
691 CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
692 CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
693 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
694 CTDB_NATGW_PUBLIC_IFACE=eth0
695 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
698 Note that <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
706 <title>POLICY ROUTING</title>
709 A node running CTDB may be a component of a complex network
710 topology. In particular, public addresses may be spread
711 across several different networks (or VLANs) and it may not be
712 possible to route packets from these public addresses via the
713 system's default route. Therefore, CTDB has support for
714 policy routing via the <filename>13.per_ip_routing</filename>
715 eventscript. This allows routing to be specified for packets
716 sourced from each public address. The routes are added and
717 removed as CTDB moves public addresses between nodes.
721 For more information, see the <citetitle>POLICY
722 ROUTING</citetitle> section in
723 <citerefentry><refentrytitle>ctdb</refentrytitle>
724 <manvolnum>7</manvolnum></citerefentry>.
729 <term>CTDB_PER_IP_ROUTING_CONF=<parameter>FILENAME</parameter></term>
732 FILENAME contains elements for constructing the desired
733 routes for each source address.
737 The special FILENAME value
738 <constant>__auto_link_local__</constant> indicates that no
739 configuration file is provided and that CTDB should
740 generate reasonable link-local routes for each public IP
747 <parameter>IPADDR</parameter> <parameter>DEST-IPADDR/MASK</parameter> <optional><parameter>GATEWAY-IPADDR</parameter></optional>
753 <filename>/usr/local/etc/ctdb/policy_routing</filename> when enabled.
759 <term>CTDB_PER_IP_ROUTING_RULE_PREF=<parameter>NUM</parameter></term>
762 NUM sets the priority (or preference) for the routing
763 rules that are added by CTDB.
767 This should be (strictly) greater than 0 and (strictly)
768 less than 32766. A priority of 100 is recommended, unless
769 this conflicts with a priority already in use on the
771 <citerefentry><refentrytitle>ip</refentrytitle>
772 <manvolnum>8</manvolnum></citerefentry>, for more details.
779 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<parameter>LOW-NUM</parameter>,
780 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<parameter>HIGH-NUM</parameter>
784 CTDB determines a unique routing table number to use for
785 the routing related to each public address. LOW-NUM and
786 HIGH-NUM indicate the minimum and maximum routing table
787 numbers that are used.
791 <citerefentry><refentrytitle>ip</refentrytitle>
792 <manvolnum>8</manvolnum></citerefentry> uses some
793 reserved routing table numbers below 255. Therefore,
794 CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
799 CTDB uses the standard file
800 <filename>/etc/iproute2/rt_tables</filename> to maintain
801 a mapping between the routing table numbers and labels.
802 The label for a public address
803 <replaceable>ADDR</replaceable> will look like
804 ctdb.<replaceable>addr</replaceable>. This means that
805 the associated rules and routes are easy to read (and
810 No default, usually 1000 and 9000.
817 <title>Example</title>
819 CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
820 CTDB_PER_IP_ROUTING_RULE_PREF=100
821 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
822 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
832 For a general description see the <citetitle>LVS</citetitle>
833 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
834 <manvolnum>7</manvolnum></citerefentry>.
838 <title>Eventscript</title>
841 <member><filename>91.lvs</filename></member>
848 <term>CTDB_LVS_NODES=<parameter>FILENAME</parameter></term>
851 FILENAME contains the list of nodes that belong to the
857 <parameter>IPADDR</parameter> <optional>slave-only</optional>
861 IPADDR is the private IP address of each node in the LVS
865 If "slave-only" is specified then the corresponding node
866 can not be the LVS master node. In this case
867 <varname>CTDB_LVS_PUBLIC_IFACE</varname> and
868 <varname>CTDB_LVS_PUBLIC_IP</varname> are optional and
873 <filename>/usr/local/etc/ctdb/lvs_nodes</filename> when enabled.
879 <term>CTDB_LVS_PUBLIC_IFACE=<parameter>INTERFACE</parameter></term>
882 INTERFACE is the network interface that clients will use
883 to connection to <varname>CTDB_LVS_PUBLIC_IP</varname>.
884 This is optional for slave-only nodes.
891 <term>CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter></term>
894 CTDB_LVS_PUBLIC_IP is the LVS public address. No
904 <title>MISCELLANEOUS NETWORK CONFIGURATION</title>
909 <term>CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no</term>
912 Whether one or more offline interfaces should cause a
913 monitor event to fail if there are other interfaces that
914 are up. If this is "yes" and a node has some interfaces
915 that are down then <command>ctdb status</command> will
916 display the node as "PARTIALLYONLINE".
920 Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is
921 incompatible with NAT gateway, since NAT gateway relies
922 on the interface configured by CTDB_NATGW_PUBLIC_IFACE
938 <title>SERVICE CONFIGURATION</title>
941 CTDB can be configured to manage and/or monitor various NAS (and
942 other) services via its eventscripts.
946 In the simplest case CTDB will manage a service. This means the
947 service will be started and stopped along with CTDB, CTDB will
948 monitor the service and CTDB will do any required
949 reconfiguration of the service when public IP addresses are
957 <title>Eventscripts</title>
960 <member><filename>49.winbind</filename></member>
961 <member><filename>50.samba</filename></member>
968 <term>CTDB_MANAGES_SAMBA=yes|no</term>
971 Should CTDB manage Samba?
980 <term>CTDB_MANAGES_WINBIND=yes|no</term>
983 Should CTDB manage Winbind?
992 <term>CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter></term>
995 When monitoring Samba, check TCP ports in
996 space-separated PORT-LIST.
999 Default is to monitor ports that Samba is configured to listen on.
1005 <term>CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no</term>
1008 As part of monitoring, should CTDB skip the check for
1009 the existence of each directory configured as share in
1010 Samba. This may be desirable if there is a large number
1020 <term>CTDB_SERVICE_NMB=<parameter>SERVICE</parameter></term>
1023 Distribution specific SERVICE for managing nmbd.
1026 Default is distribution-dependant.
1031 <term>CTDB_SERVICE_SMB=<parameter>SERVICE</parameter></term>
1034 Distribution specific SERVICE for managing smbd.
1037 Default is distribution-dependant.
1043 <term>CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter></term>
1046 Distribution specific SERVICE for managing winbindd.
1049 Default is "winbind".
1062 This includes parameters for the kernel NFS server.
1063 Alternative NFS subsystems (such as <ulink
1064 url="https://github.com/nfs-ganesha/nfs-ganesha/wiki">NFS-Ganesha</ulink>)
1065 can be integrated using <varname>CTDB_NFS_CALLOUT</varname>.
1069 <title>Eventscript</title>
1072 <member><filename>60.nfs</filename></member>
1079 <term>CTDB_MANAGES_NFS=yes|no</term>
1082 Should CTDB manage NFS?
1091 <term>CTDB_NFS_CALLOUT=<parameter>COMMAND</parameter></term>
1094 COMMAND specifies the path to a callout to handle
1095 interactions with the configured NFS system, including
1096 startup, shutdown, monitoring.
1099 Default is the included
1100 <command>nfs-linux-kernel-callout</command>.
1106 <term>CTDB_NFS_SKIP_SHARE_CHECK=yes|no</term>
1109 As part of monitoring, should CTDB skip the check for
1110 the existence of each directory exported via NFS. This
1111 may be desirable if there is a large number of exports.
1120 <term>CTDB_RPCINFO_LOCALHOST=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1123 IPADDR or HOSTNAME indicates the address that
1124 <command>rpcinfo</command> should connect to when doing
1125 <command>rpcinfo</command> check on IPv4 RPC service during
1126 monitoring. Optimally this would be "localhost".
1127 However, this can add some performance overheads.
1130 Default is "127.0.0.1".
1136 <term>CTDB_RPCINFO_LOCALHOST6=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter></term>
1139 IPADDR or HOSTNAME indicates the address that
1140 <command>rpcinfo</command> should connect to when doing
1141 <command>rpcinfo</command> check on IPv6 RPC service
1142 during monitoring. Optimally this would be "localhost6"
1143 (or similar). However, this can add some performance
1153 <term>CTDB_NFS_STATE_FS_TYPE=<parameter>TYPE</parameter></term>
1156 The type of filesystem used for a clustered NFS' shared
1163 <term>CTDB_NFS_STATE_MNT=<parameter>DIR</parameter></term>
1166 The directory where a clustered NFS' shared state will be
1167 located. No default.
1177 <title>APACHE HTTPD</title>
1180 CTDB can manage the Apache web server.
1184 <title>Eventscript</title>
1187 <member><filename>41.httpd</filename></member>
1193 <term>CTDB_MANAGES_HTTPD=yes|no</term>
1196 Should CTDB manage the Apache web server?
1207 <title>CLAMAV</title>
1210 CTDB has support to manage the popular anti-virus daemon
1215 <title>Eventscript</title>
1218 <member><filename>31.clamd</filename></member>
1222 This eventscript is not enabled by default. Use
1223 <command>ctdb enablescript</command> to enable it.
1231 <term>CTDB_MANAGES_CLAMD=yes|no</term>
1234 Should CTDB manage ClamAV?
1243 <term>CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter></term>
1246 FILENAME is the socket to monitor ClamAV.
1259 <title>ISCSI</title>
1262 CTDB has support for managing the Linux iSCSI tgtd service.
1266 <title>Eventscript</title>
1269 <member><filename>70.iscsi</filename></member>
1276 <term>CTDB_MANAGES_ISCSI=yes|no</term>
1279 Should CTDB manage iSCSI tgtd?
1288 <term>CTDB_START_ISCSI_SCRIPTS=<parameter>DIRECTORY</parameter></term>
1291 DIRECTORY on shared storage containing scripts to start
1292 tgtd for each public IP address.
1303 <title>MULTIPATHD</title>
1306 CTDB can monitor multipath devices to ensure that active paths
1311 <title>Eventscript</title>
1314 <member><filename>20.multipathd</filename></member>
1318 This eventscript is not enabled by default. Use
1319 <command>ctdb enablescript</command> to enable it.
1325 <term>CTDB_MONITOR_MPDEVICES=<parameter>MP-DEVICE-LIST</parameter></term>
1328 MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
1339 <title>VSFTPD</title>
1342 CTDB can manage the vsftpd FTP server.
1346 <title>Eventscript</title>
1349 <member><filename>40.vsftpd</filename></member>
1355 <term>CTDB_MANAGES_VSFTPD=yes|no</term>
1358 Should CTDB manage the vsftpd FTP server?
1370 SYSTEM RESOURCE MONITORING CONFIGURATION
1374 CTDB can experience seemingly random (performance and other)
1375 issues if system resources become too constrained. Options in
1376 this section can be enabled to allow certain system resources
1377 to be checked. They allows warnings to be logged and nodes to
1378 be marked unhealthy when system resource usage reaches the
1379 configured thresholds.
1383 Some checks are enabled by default. It is recommended that
1384 these checks remain enabled or are augmented by extra checks.
1385 There is no supported way of completely disabling the checks.
1389 <title>Eventscripts</title>
1392 <member><filename>05.system</filename></member>
1396 Filesystem and memory usage monitoring is in
1397 <filename>05.system</filename>.
1404 <term>CTDB_MONITOR_FILESYSTEM_USAGE=<parameter>FS-LIMIT-LIST</parameter></term>
1407 FS-LIMIT-LIST is a space-separated list of
1408 <parameter>FILESYSTEM</parameter>:<parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1409 triples indicating that warnings should be logged if the
1410 space used on FILESYSTEM reaches WARN_LIMIT%. If usage
1411 reaches UNHEALTHY_LIMIT then the node should be flagged
1412 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1413 left blank, meaning that check will be omitted.
1417 Default is to warn for each filesystem containing a
1418 database directory (<envar>CTDB_DBDIR</envar>,
1419 <envar>CTDB_DBDIR_PERSISTENT</envar>,
1420 <envar>CTDB_DBDIR_STATE</envar>) with a threshold of
1427 <term>CTDB_MONITOR_MEMORY_USAGE=<parameter>MEM-LIMITS</parameter></term>
1430 MEM-LIMITS takes the form
1431 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1432 indicating that warnings should be logged if memory
1433 usage reaches WARN_LIMIT%. If usage reaches
1434 UNHEALTHY_LIMIT then the node should be flagged
1435 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1436 left blank, meaning that check will be omitted.
1439 Default is 80, so warnings will be logged when memory
1446 <term>CTDB_MONITOR_SWAP_USAGE=<parameter>SWAP-LIMITS</parameter></term>
1449 SWAP-LIMITS takes the form
1450 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1451 indicating that warnings should be logged if
1452 swap usage reaches WARN_LIMIT%. If usage reaches
1453 UNHEALTHY_LIMIT then the node should be flagged
1454 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1455 left blank, meaning that check will be omitted.
1458 Default is 25, so warnings will be logged when swap
1468 <title>MISCELLANEOUS SERVICE-RELATED CONFIGURATION</title>
1473 <term>CTDB_MANAGED_SERVICES=<parameter>SERVICE-LIST</parameter></term>
1476 SERVICE-LIST is a space-separated list of SERVICEs that
1477 CTDB should manage. This can be used as an alternative
1479 <varname>CTDB_MANAGES_<replaceable>SERVICE</replaceable></varname>
1489 <term>CTDB_SERVICE_AUTOSTARTSTOP=yes|no</term>
1492 When CTDB should start and stop services if they become
1493 managed or unmanaged.
1509 TUNABLES CONFIGURATION
1514 <citerefentry><refentrytitle>ctdbd-tunables</refentrytitle>
1515 <manvolnum>7</manvolnum></citerefentry>) can be set from the
1516 configuration file. They are set as follows:
1519 CTDB_SET_<replaceable>TUNABLE</replaceable>=<replaceable>VALUE</replaceable>
1526 <screen format="linespecific">
1527 CTDB_SET_MonitorInterval=20
1538 Variable in this section are for debugging and testing CTDB.
1539 They should not generally be needed.
1545 <term>CTDB_DEBUG_HUNG_SCRIPT=<parameter>FILENAME</parameter></term>
1548 FILENAME is a script to run to log debug information when
1549 an event script times out.
1552 Default is <filename><varname>CTDB_BASE</varname>/debug-hung-script.sh</filename>.
1558 <term>CTDB_DEBUG_HUNG_SCRIPT_LOGFILE=<parameter>FILENAME</parameter></term>
1561 FILENAME specifies where log messages should go when
1562 debugging hung eventscripts. This is a testing option.
1563 See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1566 No default. Messages go to stdout/stderr and are logged
1567 to the same place as other CTDB log messages.
1573 <term>CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<parameter>REGEXP</parameter></term>
1576 REGEXP specifies interesting processes for which stack
1577 traces should be logged when debugging hung eventscripts
1578 and those processes are matched in pstree output. REGEXP
1579 is an extended regexp so choices are separated by pipes
1580 ('|'). However, REGEXP should not contain parentheses.
1581 See also <citetitle>CTDB_DEBUG_HUNG_SCRIPT</citetitle>.
1584 Default is "exportfs|rpcinfo".
1590 <term>CTDB_DEBUG_LOCKS=<parameter>FILENAME</parameter></term>
1593 FILENAME is a script to run to log debug information when
1594 an CTDB fails to freeze databases during recovery.
1598 <filename><varname>CTDB_BASE</varname>/debug_locks.sh</filename>.
1604 <term>CTDB_SYS_ETCDIR=<parameter>DIRECTORY</parameter></term>
1607 DIRECTORY containing system configuration files. This is
1608 used to provide alternate configuration when testing and
1609 should not need to be changed from the default.
1612 Default is <filename>/etc</filename>.
1618 <term>CTDB_INIT_STYLE=debian|redhat|suse</term>
1621 This is the init style used by the Linux distribution (or
1622 other operating system) being used. This is usually
1623 determined dynamically by checking the system. This
1624 variable is used by the initscript to determine which init
1625 system primitives to use. It is also used by some
1626 eventscripts to choose the name of initscripts for certain
1627 services, since these can vary between distributions.
1633 If this option needs to be changed from the calculated
1634 default for the initscript to function properly, then it
1635 must be set in the distribution-specific initscript
1636 configuration, such as
1637 <filename>/etc/sysconfig/ctdb</filename>
1643 <term>CTDB_MAX_CORRUPT_DB_BACKUPS=<parameter>NUM</parameter></term>
1646 NUM is the maximum number of volatile TDB database backups
1647 to be kept (for each database) when a corrupt database is
1648 found during startup. Volatile TDBs are zeroed during
1649 startup so backups are needed to debug any corruption that
1650 occurs before a restart.
1659 <term>CTDB_MAX_OPEN_FILES=<parameter>NUM</parameter></term>
1662 NUM is the maximum number of open files.
1665 There is no default.
1671 <term>CTDB_RC_LOCAL=<parameter>FILENAME</parameter></term>
1674 FILENAME is a script fragment to be sourced by the
1675 <filename>functions</filename> that is sourced by scripts.
1676 On example use would be to override function definitions
1677 in unit tests. As a sanity check, this file must be
1678 executable for it to be used.
1687 <term>CTDB_RUN_TIMEOUT_MONITOR=yes|no</term>
1690 Whether CTDB should simulate timing out monitor events.
1691 This uses the <filename>99.timeout</filename> eventscript.
1700 <term>CTDB_SCRIPT_DEBUGLEVEL=<parameter>NUM</parameter></term>
1703 NUM is the level debugging messages printed by CTDB
1704 scripts. Setting this to a higher number (e.g. 4) will
1705 cause some scripts to log more messages.
1714 <term>CTDB_SUPPRESS_COREFILE=yes|no</term>
1717 Whether CTDB core files should be suppressed.
1726 <term>CTDB_VALGRIND=yes|no|<parameter>COMMAND</parameter></term>
1729 If "yes", this causes
1730 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1731 <manvolnum>1</manvolnum></citerefentry> to be run under
1732 <citerefentry><refentrytitle>valgrind</refentrytitle>
1733 <manvolnum>1</manvolnum></citerefentry> with logs going to
1734 <filename>/usr/local/var/log/ctdb_valgrind</filename>. If neither
1735 "yes" nor "no" then the value is assumed to be a COMMAND
1736 (e.g. a <command>valgrind</command> variation, a
1737 <citerefentry><refentrytitle>gdb</refentrytitle>
1738 <manvolnum>1</manvolnum></citerefentry> command) that is
1739 used in place of the default <command>valgrind</command>
1740 command. In either case, the <option>--valgrind</option>
1741 option is passed to <command>ctdbd</command>.
1750 <term>CTDB_VARDIR=<parameter>DIRECTORY</parameter></term>
1753 DIRECTORY containing CTDB files that are modified at
1757 Defaults to <filename>/usr/local/var/lib/ctdb</filename>.
1768 <title>FILES</title>
1771 <member><filename>/usr/local/etc/ctdb/ctdbd.conf</filename></member>
1772 <member><filename>/etc/sysconfig/ctdb</filename></member>
1773 <member><filename>/etc/default/ctdb</filename></member>
1774 <member><filename>/usr/local/etc/ctdb/sysconfig/ctdb</filename></member>
1779 <title>SEE ALSO</title>
1781 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1782 <manvolnum>1</manvolnum></citerefentry>,
1784 <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
1785 <manvolnum>1</manvolnum></citerefentry>,
1787 <citerefentry><refentrytitle>onnode</refentrytitle>
1788 <manvolnum>1</manvolnum></citerefentry>,
1790 <citerefentry><refentrytitle>ctdb</refentrytitle>
1791 <manvolnum>7</manvolnum></citerefentry>,
1793 <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
1794 <manvolnum>7</manvolnum></citerefentry>,
1796 <ulink url="http://ctdb.samba.org/"/>
1803 This documentation was written by
1811 <holder>Andrew Tridgell</holder>
1812 <holder>Ronnie Sahlberg</holder>
1816 This program is free software; you can redistribute it and/or
1817 modify it under the terms of the GNU General Public License as
1818 published by the Free Software Foundation; either version 3 of
1819 the License, or (at your option) any later version.
1822 This program is distributed in the hope that it will be
1823 useful, but WITHOUT ANY WARRANTY; without even the implied
1824 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1825 PURPOSE. See the GNU General Public License for more details.
1828 You should have received a copy of the GNU General Public
1829 License along with this program; if not, see
1830 <ulink url="http://www.gnu.org/licenses"/>.