|CTDB-SCRIPT.OPTIO(5)||CTDB - clustered TDB database||CTDB-SCRIPT.OPTIO(5)|
NAME¶ctdb-script.options - CTDB scripts configuration files
DESCRIPTION¶Each CTDB script has 2 possible locations for its configuration options:
Options in this script-specific file override those in the global file.
These files should include simple shell-style variable assignments and shell-style comments.
10.interface¶This event script handles monitoring of interfaces using by public IP addresses.
Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is not generally compatible with NAT gateway or LVS. NAT gateway relies on the interface configured by CTDB_NATGW_PUBLIC_IFACE to be up and LVS replies on CTDB_LVS_PUBLIC_IFACE to be up. CTDB does not check if these options are set in an incompatible way so care is needed to understand the interaction.
Default is "no".
11.natgw¶Provides CTDB's NAT gateway functionality.
NAT gateway is used to configure fallback routing for nodes when they do not host any public IP addresses. For example, it allows unhealthy nodes to reliably communicate with external infrastructure. One node in a NAT gateway group will be designated as the NAT gateway master node and other (slave) nodes will be configured with fallback routes via the NAT gateway master node. For more information, see the NAT GATEWAY section in ctdb(7).
No default. Setting this variable is optional - if not set that no route is created on the NAT gateway master node.
IPADDR is the private IP address of each node in the NAT gateway group.
If "slave-only" is specified then the corresponding node can not be the NAT gateway master node. In this case CTDB_NATGW_PUBLIC_IFACE and CTDB_NATGW_PUBLIC_IP are optional and unused.
No default, usually /etc/ctdb/natgw_nodes when enabled.
If GATEWAY is specified then the corresponding route on the NATGW master node will be via GATEWAY. Such routes are created even if CTDB_NATGW_DEFAULT_GATEWAY is not specified. If GATEWAY is not specified for some networks then routes are only created on the NATGW master node for those networks if CTDB_NATGW_DEFAULT_GATEWAY is specified.
This should be used with care to avoid causing traffic to unnecessarily double-hop through the NAT gateway master, even when a node is hosting public IP addresses. Each specified network or host should probably have a corresponding automatically created link route or static route to avoid this.
CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24 CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24 CTDB_NATGW_PUBLIC_IFACE=eth0
A variation that ensures that infrastructure (ADS, DNS, ...) directly attached to the public network (10.0.0.0/24) is always reachable would look like this:
CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24 CTDB_NATGW_PUBLIC_IP=10.0.0.227/24 CTDB_NATGW_PUBLIC_IFACE=eth0 CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
Note that CTDB_NATGW_DEFAULT_GATEWAY is not specified.
13.per_ip_routing¶Provides CTDB's policy routing functionality.
A node running CTDB may be a component of a complex network topology. In particular, public addresses may be spread across several different networks (or VLANs) and it may not be possible to route packets from these public addresses via the system's default route. Therefore, CTDB has support for policy routing via the 13.per_ip_routing eventscript. This allows routing to be specified for packets sourced from each public address. The routes are added and removed as CTDB moves public addresses between nodes.
For more information, see the POLICY ROUTING section in ctdb(7).
The special FILENAME value __auto_link_local__ indicates that no configuration file is provided and that CTDB should generate reasonable link-local routes for each public IP address.
IPADDR DEST-IPADDR/MASK [GATEWAY-IPADDR]
No default, usually /etc/ctdb/policy_routing when enabled.
This should be (strictly) greater than 0 and (strictly) less than 32766. A priority of 100 is recommended, unless this conflicts with a priority already in use on the system. See ip(8), for more details.
ip(8) uses some reserved routing table numbers below 255. Therefore, CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly) greater than 255.
CTDB uses the standard file /etc/iproute2/rt_tables to maintain a mapping between the routing table numbers and labels. The label for a public address ADDR will look like ctdb.addr. This means that the associated rules and routes are easy to read (and manipulate).
No default, usually 1000 and 9000.
CTDB_PER_IP_ROUTING_CONF=/etc/ctdb/policy_routing CTDB_PER_IP_ROUTING_RULE_PREF=100 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
91.lvs¶Provides CTDB's LVS functionality.
For a general description see the LVS section in ctdb(7).
IPADDR is the private IP address of each node in the LVS group.
If "slave-only" is specified then the corresponding node can not be the LVS master node. In this case CTDB_LVS_PUBLIC_IFACE and CTDB_LVS_PUBLIC_IP are optional and unused.
No default, usually /etc/ctdb/lvs_nodes when enabled.
SERVICE CONFIGURATION¶CTDB can be configured to manage and/or monitor various NAS (and other) services via its eventscripts.
In the simplest case CTDB will manage a service. This means the service will be started and stopped along with CTDB, CTDB will monitor the service and CTDB will do any required reconfiguration of the service when public IP addresses are failed over.
20.multipathd¶Provides CTDB's Linux multipathd service management.
It can monitor multipath devices to ensure that active paths are available.
31.clamd¶This event script provide CTDB's ClamAV anti-virus service management.
This eventscript is not enabled by default. Use ctdb enablescript to enable it.
49.winbind¶Provides CTDB's Samba winbind service management.
Default is "winbind".
50.samba¶Provides the core of CTDB's Samba file service management.
Default is to monitor ports that Samba is configured to listen on.
Default is no.
Default is distribution-dependant.
Default is distribution-dependant.
60.nfs¶This event script (along with 06.nfs) provides CTDB's NFS service management.
This includes parameters for the kernel NFS server. Alternative NFS subsystems (such as NFS-Ganesha) can be integrated using CTDB_NFS_CALLOUT.
Default is the included nfs-linux-kernel-callout.
CTDB_NFS_CHECKS_DIR can be used to point to different sets of checks for different NFS servers.
One way of using this is to have it point to, say, /etc/ctdb/nfs-checks-enabled.d and populate it with symbolic links to the desired check files. This avoids duplication and is upgrade-safe.
Default is /etc/ctdb/nfs-checks.d, which contains NFS RPC checks suitable for Linux kernel NFS.
Default is no.
Default is "127.0.0.1".
Default is "::1".
70.iscsi¶Provides CTDB's Linux iSCSI tgtd service management.
DATABASE SETUP¶CTDB checks the consistency of databases during startup.
Default is 10.
SYSTEM RESOURCE MONITORING¶
05.system¶Provides CTDB's filesystem and memory usage monitoring.
CTDB can experience seemingly random (performance and other) issues if system resources become too constrained. Options in this section can be enabled to allow certain system resources to be checked. They allows warnings to be logged and nodes to be marked unhealthy when system resource usage reaches the configured thresholds.
Some checks are enabled by default. It is recommended that these checks remain enabled or are augmented by extra checks. There is no supported way of completely disabling the checks.
Default is to warn for each filesystem containing a database directory (volatile database directory, persistent database directory, state database directory) with a threshold of 90%.
Default is 80, so warnings will be logged when memory usage reaches 80%.
EVENT SCRIPT DEBUGGING¶
Default is "exportfs|rpcinfo".
SEE ALSO¶ctdbd(1), ctdb(7), http://ctdb.samba.org/
This documentation was written by Amitay Isaacs, Martin Schwenke
COPYRIGHT¶Copyright © 2007 Andrew Tridgell, Ronnie Sahlberg
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.