| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdbd.conf</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ctdbd.conf.5"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdbd.conf — CTDB daemon configuration file</p></div><div class="refsect1"><a name="idp53709056"></a><h2>DESCRIPTION</h2><p>
|
|---|
| 2 | This file contains CTDB configuration variables that are affect
|
|---|
| 3 | the operation of CTDB. The default location of this file is
|
|---|
| 4 | <code class="filename">/usr/local/etc/ctdb/ctdbd.conf</code>.
|
|---|
| 5 | </p><p>
|
|---|
| 6 | This file is a shell script (see
|
|---|
| 7 | <span class="citerefentry"><span class="refentrytitle">sh</span>(1)</span>) but is usually limited
|
|---|
| 8 | to simple variable assignments and shell-style comments.
|
|---|
| 9 | </p><p>
|
|---|
| 10 | CTDB configuration variables are grouped into several categories below.
|
|---|
| 11 | </p><p>
|
|---|
| 12 | Variables defined in this document can also be set in a
|
|---|
| 13 | distribution-specific configuration file such as
|
|---|
| 14 | <code class="filename">/etc/sysconfig/ctdb</code> (Red Hat) or
|
|---|
| 15 | <code class="filename">/etc/default/ctdb</code> (Debian). However, these
|
|---|
| 16 | files should be reserved for variables used by the initscript.
|
|---|
| 17 | A historical alternative is
|
|---|
| 18 | <code class="filename">/usr/local/etc/ctdb/sysconfig/ctdb</code> - this is
|
|---|
| 19 | deprecated.
|
|---|
| 20 | </p></div><div class="refsect1"><a name="idp52187248"></a><h2>
|
|---|
| 21 | INITSCRIPT CONFIGURATION
|
|---|
| 22 | </h2><p>
|
|---|
| 23 | Some options must be available to the initscript so they need to
|
|---|
| 24 | be set in the distribution-specific initscript configuration,
|
|---|
| 25 | such as <code class="filename">/etc/sysconfig/ctdb</code> or
|
|---|
| 26 | <code class="filename">/etc/default/ctdb</code>.
|
|---|
| 27 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_PIDFILE=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 28 | FILENAME is the name of the file used to contain the
|
|---|
| 29 | process ID (PID) of the main CTDB daemon when it is
|
|---|
| 30 | running. This is passed from the initscript to
|
|---|
| 31 | <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span>.
|
|---|
| 32 | </p><p>
|
|---|
| 33 | Default is <code class="filename">/usr/local/var/run/ctdb/ctdbd.pid</code>.
|
|---|
| 34 | Corresponds to <code class="option">--pidfile</code>.
|
|---|
| 35 | </p></dd></dl></div></div><div class="refsect1"><a name="idp52645200"></a><h2>
|
|---|
| 36 | GLOBAL CONFIGURATION
|
|---|
| 37 | </h2><p>
|
|---|
| 38 | These options may be used in the initscripts, daemon and
|
|---|
| 39 | scripts.
|
|---|
| 40 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_BASE=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 41 | DIRECTORY containing CTDB scripts and configuration files.
|
|---|
| 42 | </p></dd></dl></div></div><div class="refsect1"><a name="idp49236080"></a><h2>
|
|---|
| 43 | DAEMON CONFIGURATION
|
|---|
| 44 | </h2><p>
|
|---|
| 45 | Variables in this section are processed by
|
|---|
| 46 | <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span> and are converted into
|
|---|
| 47 | command-line arguments to
|
|---|
| 48 | <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>. Correspondence with
|
|---|
| 49 | <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> options is shown for
|
|---|
| 50 | each variable. The the documentation for the relevant options
|
|---|
| 51 | for more details.
|
|---|
| 52 | </p><p>
|
|---|
| 53 | Many of these variables are also used by event scripts.
|
|---|
| 54 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_CAPABILITY_LMASTER=yes|no</span></dt><dd><p>
|
|---|
| 55 | Defaults to yes. Corresponds to <code class="option">--no-lmaster</code>.
|
|---|
| 56 | </p></dd><dt><span class="term">CTDB_CAPABILITY_RECMASTER=yes|no</span></dt><dd><p>
|
|---|
| 57 | Defaults to yes. Corresponds to
|
|---|
| 58 | <code class="option">--no-recmaster</code>.
|
|---|
| 59 | </p></dd><dt><span class="term">CTDB_DBDIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 60 | Defaults to <code class="filename">/usr/local/var/lib/ctdb</code>.
|
|---|
| 61 | </p><p>
|
|---|
| 62 | Apart from a DIRECTORY, this can take a special value of
|
|---|
| 63 | the form
|
|---|
| 64 | <code class="option">tmpfs</code>[<span class="optional">:<em class="parameter"><code>OPTIONS</code></em></span>].
|
|---|
| 65 | OPTIONS is a comma-separated list of any permissible
|
|---|
| 66 | options to the tmpfs filesystem. The only pre-specified
|
|---|
| 67 | default is <code class="option">mode=700</code>, which can
|
|---|
| 68 | overriden by specifying <code class="option">mode</code> in
|
|---|
| 69 | OPTIONS. It probably makes sense to specify a maximum
|
|---|
| 70 | <code class="option">size</code>.
|
|---|
| 71 | </p><p>
|
|---|
| 72 | Corresponds to <code class="option">--dbdir</code>.
|
|---|
| 73 | </p></dd><dt><span class="term">CTDB_DBDIR_PERSISTENT=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 74 | Defaults to <code class="filename">/usr/local/var/lib/ctdb/persistent</code>.
|
|---|
| 75 | </p><p>
|
|---|
| 76 | Corresponds to <code class="option">--dbdir-persistent</code>.
|
|---|
| 77 | </p></dd><dt><span class="term">CTDB_DBDIR_STATE=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 78 | Defaults to <code class="filename">/usr/local/var/lib/ctdb/state</code>.
|
|---|
| 79 | </p><p>
|
|---|
| 80 | Corresponds to <code class="option">--dbdir-state</code>.
|
|---|
| 81 | </p></dd><dt><span class="term">CTDB_DEBUGLEVEL=<em class="parameter"><code>DEBUGLEVEL</code></em></span></dt><dd><p>
|
|---|
| 82 | Default is NOTICE (2). Corresponds to <code class="option">-d</code> or
|
|---|
| 83 | <code class="option">--debug</code>.
|
|---|
| 84 | </p></dd><dt><span class="term">CTDB_EVENT_SCRIPT_DIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 85 | Default is <code class="varname">CTDB_BASE</code>/events.d, so usually
|
|---|
| 86 | <code class="filename">/usr/local/etc/ctdb/events.d</code>. Corresponds to
|
|---|
| 87 | <code class="option">--event-script-dir</code>.
|
|---|
| 88 | </p></dd><dt><span class="term">CTDB_LOGGING=<em class="parameter"><code>STRING</code></em></span></dt><dd><p>
|
|---|
| 89 | STRING specifies where ctdbd will write its log. The
|
|---|
| 90 | default is
|
|---|
| 91 | file:<code class="filename">/usr/local/var/log/log.ctdb</code>.
|
|---|
| 92 | Corresponds to <code class="option">--logging</code>.
|
|---|
| 93 | </p><p>
|
|---|
| 94 | Valid values are:
|
|---|
| 95 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">file:<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 96 | FILENAME where ctdbd will write its log. This is usually
|
|---|
| 97 | <code class="filename">/usr/local/var/log/log.ctdb</code>.
|
|---|
| 98 | </p></dd><dt><span class="term">syslog[<span class="optional">:<em class="parameter"><code>METHOD</code></em></span>]</span></dt><dd><p>
|
|---|
| 99 | CTDB will log to syslog. By default this will use
|
|---|
| 100 | the syslog(3) API.
|
|---|
| 101 | </p><p>
|
|---|
| 102 | If METHOD is specified then it specifies an
|
|---|
| 103 | extension that causes logging to be done in a
|
|---|
| 104 | non-blocking fashion. This can be useful under
|
|---|
| 105 | heavy loads that might cause the syslog daemon to
|
|---|
| 106 | dequeue messages too slowly, which would otherwise
|
|---|
| 107 | cause CTDB to block when logging. METHOD must be
|
|---|
| 108 | one of:
|
|---|
| 109 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">nonblocking</span></dt><dd><p>
|
|---|
| 110 | CTDB will log to syslog via
|
|---|
| 111 | <code class="filename">/dev/log</code> in non-blocking
|
|---|
| 112 | mode.
|
|---|
| 113 | </p></dd><dt><span class="term">udp</span></dt><dd><p>
|
|---|
| 114 | CTDB will log to syslog via UDP to
|
|---|
| 115 | localhost:514. The syslog daemon must be
|
|---|
| 116 | configured to listen on (at least)
|
|---|
| 117 | localhost:514. Most implementations will log
|
|---|
| 118 | the messages against hostname "localhost" -
|
|---|
| 119 | this is a limit of the implementation for
|
|---|
| 120 | compatibility with more syslog daemon
|
|---|
| 121 | implementations.
|
|---|
| 122 | </p></dd><dt><span class="term">udp-rfc5424</span></dt><dd><p>
|
|---|
| 123 | As with "udp" but messages are sent in RFC5424
|
|---|
| 124 | format. This method will log the correct
|
|---|
| 125 | hostname but is not as widely implemented in
|
|---|
| 126 | syslog daemons.
|
|---|
| 127 | </p></dd></dl></div></dd></dl></div></dd><dt><span class="term">CTDB_LVS_PUBLIC_IP=<em class="parameter"><code>IPADDR</code></em></span></dt><dd><p>
|
|---|
| 128 | No default. Corresponds to "<code class="option">--lvs</code>
|
|---|
| 129 | <code class="option">--single-public-ip IPADDR"</code>.
|
|---|
| 130 | </p></dd><dt><span class="term">CTDB_NODES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 131 | Default is <code class="varname">CTDB_BASE</code>/nodes, so usually
|
|---|
| 132 | <code class="filename">/usr/local/etc/ctdb/nodes</code>. Corresponds to
|
|---|
| 133 | <code class="option">--nlist</code>.
|
|---|
| 134 | </p></dd><dt><span class="term">CTDB_NOTIFY_SCRIPT=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 135 | No default, usually
|
|---|
| 136 | <code class="filename">/usr/local/etc/ctdb/notify.sh</code>. Corresponds to
|
|---|
| 137 | <code class="option">--notification-script</code>.
|
|---|
| 138 | </p></dd><dt><span class="term">CTDB_MAX_PERSISTENT_CHECK_ERRORS=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 139 | Default 0. Corresponds to
|
|---|
| 140 | <code class="option">--max-persistent-check-errors</code>.
|
|---|
| 141 | </p></dd><dt><span class="term">CTDB_NODE_ADDRESS=<em class="parameter"><code>IPADDR</code></em></span></dt><dd><p>
|
|---|
| 142 | IPADDR is the private IP address that ctdbd will bind to.
|
|---|
| 143 | Corresponds to <code class="option">--listen</code>.
|
|---|
| 144 | </p><p>
|
|---|
| 145 | By default ctdbd will select the first address from the
|
|---|
| 146 | nodes list that in can bind to. See also
|
|---|
| 147 | <em class="citetitle">CTDB_NODES</em>.
|
|---|
| 148 | </p><p>
|
|---|
| 149 | This option is only required when automatic address
|
|---|
| 150 | detection can not be used. This can be the case when
|
|---|
| 151 | running multiple ctdbd daemons/nodes on the same physical
|
|---|
| 152 | host (usually for testing), using InfiniBand for the
|
|---|
| 153 | private network or on Linux when sysctl
|
|---|
| 154 | net.ipv4.ip_nonlocal_bind=1.
|
|---|
| 155 | </p></dd><dt><span class="term">CTDB_PUBLIC_ADDRESSES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 156 | No default, usually
|
|---|
| 157 | <code class="filename">/usr/local/etc/ctdb/public_addresses</code>.
|
|---|
| 158 | Corresponds to <code class="option">--public-addresses</code>.
|
|---|
| 159 | </p></dd><dt><span class="term">CTDB_PUBLIC_INTERFACE=<em class="parameter"><code>INTERFACE</code></em></span></dt><dd><p>
|
|---|
| 160 | No default. Corresponds to
|
|---|
| 161 | <code class="option">--public-interface</code>.
|
|---|
| 162 | </p></dd><dt><span class="term">CTDB_RECOVERY_LOCK=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 163 | Defaults to
|
|---|
| 164 | <code class="filename">/some/place/on/shared/storage</code>, which
|
|---|
| 165 | should be change to a useful value. Corresponds to
|
|---|
| 166 | <code class="option">--reclock</code>.
|
|---|
| 167 | </p><p>
|
|---|
| 168 | For information about the recovery lock please see the
|
|---|
| 169 | <em class="citetitle">RECOVERY LOCK</em> section in
|
|---|
| 170 | <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
|
|---|
| 171 | </p></dd><dt><span class="term">CTDB_SCRIPT_LOG_LEVEL=<em class="parameter"><code>DEBUGLEVEL</code></em></span></dt><dd><p>
|
|---|
| 172 | Defaults to ERR (0). Corresponds to
|
|---|
| 173 | <code class="option">--script-log-level</code>.
|
|---|
| 174 | </p></dd><dt><span class="term">CTDB_SOCKET=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 175 | Defaults to <code class="filename">/usr/local/var/run/ctdb/ctdbd.socket</code>.
|
|---|
| 176 | Corresponds to <code class="option">--socket</code>.
|
|---|
| 177 | </p><p>
|
|---|
| 178 | If you change this then you probably want to set this in
|
|---|
| 179 | root's environment (perhaps in a file in
|
|---|
| 180 | <code class="filename">/etc/profile.d</code>) so that you can use
|
|---|
| 181 | the <span class="citerefentry"><span class="refentrytitle">ctdb</span>(1)</span> command in a
|
|---|
| 182 | straightforward manner.
|
|---|
| 183 | </p></dd><dt><span class="term">CTDB_START_AS_DISABLED=yes|no</span></dt><dd><p>
|
|---|
| 184 | Default is no. Corresponds to
|
|---|
| 185 | <code class="option">--start-as-disabled</code>.
|
|---|
| 186 | </p></dd><dt><span class="term">CTDB_START_AS_STOPPED=yes|no</span></dt><dd><p>
|
|---|
| 187 | Default is no. Corresponds to
|
|---|
| 188 | <code class="option">--start-as-stopped</code>.
|
|---|
| 189 | </p></dd><dt><span class="term">CTDB_TRANSPORT=tcp|infiniband</span></dt><dd><p>
|
|---|
| 190 | Defaults to tcp. Corresponds to
|
|---|
| 191 | <code class="option">--transport</code>.
|
|---|
| 192 | </p></dd></dl></div><p>
|
|---|
| 193 | While the following variables do not translate into daemon
|
|---|
| 194 | options they are used by
|
|---|
| 195 | <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span> when starting and
|
|---|
| 196 | stopping <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>.
|
|---|
| 197 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_SHUTDOWN_TIMEOUT=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 198 | NUM is the number of seconds to wait for
|
|---|
| 199 | <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> to shut down
|
|---|
| 200 | gracefully before giving up and killing it.
|
|---|
| 201 | </p><p>
|
|---|
| 202 | Defaults is 30.
|
|---|
| 203 | </p></dd><dt><span class="term">CTDB_STARTUP_TIMEOUT=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 204 | NUM is the number of seconds to wait for
|
|---|
| 205 | <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> complete early
|
|---|
| 206 | initialisation up to a point where it is unlikely to
|
|---|
| 207 | abort. If <span class="command"><strong>ctdbd</strong></span> doesn't complete the
|
|---|
| 208 | "setup" event before this timeout then it is killed.
|
|---|
| 209 | </p><p>
|
|---|
| 210 | Defaults is 10.
|
|---|
| 211 | </p></dd></dl></div></div><div class="refsect1"><a name="idp55114240"></a><h2>NETWORK CONFIGURATION</h2><div class="refsect2"><a name="idp55114880"></a><h3>NAT GATEWAY</h3><p>
|
|---|
| 212 | NAT gateway is used to configure fallback routing for nodes
|
|---|
| 213 | when they do not host any public IP addresses. For example,
|
|---|
| 214 | it allows unhealthy nodes to reliably communicate with
|
|---|
| 215 | external infrastructure. One node in a NAT gateway group will
|
|---|
| 216 | be designated as the NAT gateway master node and other (slave)
|
|---|
| 217 | nodes will be configured with fallback routes via the NAT
|
|---|
| 218 | gateway master node. For more information, see the
|
|---|
| 219 | <em class="citetitle">NAT GATEWAY</em> section in
|
|---|
| 220 | <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
|
|---|
| 221 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_NATGW_DEFAULT_GATEWAY=<em class="parameter"><code>IPADDR</code></em></span></dt><dd><p>
|
|---|
| 222 | IPADDR is an alternate network gateway to use on the NAT
|
|---|
| 223 | gateway master node. If set, a fallback default route
|
|---|
| 224 | is added via this network gateway.
|
|---|
| 225 | </p><p>
|
|---|
| 226 | No default. Setting this variable is optional - if not
|
|---|
| 227 | set that no route is created on the NAT gateway master
|
|---|
| 228 | node.
|
|---|
| 229 | </p></dd><dt><span class="term">CTDB_NATGW_NODES=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 230 | FILENAME contains the list of nodes that belong to the
|
|---|
| 231 | same NAT gateway group.
|
|---|
| 232 | </p><p>
|
|---|
| 233 | File format:
|
|---|
| 234 | </p><pre class="screen">
|
|---|
| 235 | <em class="parameter"><code>IPADDR</code></em> [<span class="optional">slave-only</span>]
|
|---|
| 236 | </pre><p>
|
|---|
| 237 | </p><p>
|
|---|
| 238 | IPADDR is the private IP address of each node in the NAT
|
|---|
| 239 | gateway group.
|
|---|
| 240 | </p><p>
|
|---|
| 241 | If "slave-only" is specified then the corresponding node
|
|---|
| 242 | can not be the NAT gateway master node. In this case
|
|---|
| 243 | <code class="varname">CTDB_NATGW_PUBLIC_IFACE</code> and
|
|---|
| 244 | <code class="varname">CTDB_NATGW_PUBLIC_IP</code> are optional and
|
|---|
| 245 | unused.
|
|---|
| 246 | </p><p>
|
|---|
| 247 | No default, usually
|
|---|
| 248 | <code class="filename">/usr/local/etc/ctdb/natgw_nodes</code> when enabled.
|
|---|
| 249 | </p></dd><dt><span class="term">CTDB_NATGW_PRIVATE_NETWORK=<em class="parameter"><code>IPADDR/MASK</code></em></span></dt><dd><p>
|
|---|
| 250 | IPADDR/MASK is the private sub-network that is
|
|---|
| 251 | internally routed via the NAT gateway master node. This
|
|---|
| 252 | is usually the private network that is used for node
|
|---|
| 253 | addresses.
|
|---|
| 254 | </p><p>
|
|---|
| 255 | No default.
|
|---|
| 256 | </p></dd><dt><span class="term">CTDB_NATGW_PUBLIC_IFACE=<em class="parameter"><code>IFACE</code></em></span></dt><dd><p>
|
|---|
| 257 | IFACE is the network interface on which the
|
|---|
| 258 | CTDB_NATGW_PUBLIC_IP will be configured.
|
|---|
| 259 | </p><p>
|
|---|
| 260 | No default.
|
|---|
| 261 | </p></dd><dt><span class="term">CTDB_NATGW_PUBLIC_IP=<em class="parameter"><code>IPADDR/MASK</code></em></span></dt><dd><p>
|
|---|
| 262 | IPADDR/MASK indicates the IP address that is used for
|
|---|
| 263 | outgoing traffic (originating from
|
|---|
| 264 | CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master
|
|---|
| 265 | node. This <span class="emphasis"><em>must not</em></span> be a
|
|---|
| 266 | configured public IP address.
|
|---|
| 267 | </p><p>
|
|---|
| 268 | No default.
|
|---|
| 269 | </p></dd><dt><span class="term">CTDB_NATGW_STATIC_ROUTES=<em class="parameter"><code>IPADDR/MASK[@GATEWAY]</code></em> ...</span></dt><dd><p>
|
|---|
| 270 | Each IPADDR/MASK identifies a network or host to which
|
|---|
| 271 | NATGW should create a fallback route, instead of
|
|---|
| 272 | creating a single default route. This can be used when
|
|---|
| 273 | there is already a default route, via an interface that
|
|---|
| 274 | can not reach required infrastructure, that overrides
|
|---|
| 275 | the NAT gateway default route.
|
|---|
| 276 | </p><p>
|
|---|
| 277 | If GATEWAY is specified then the corresponding route on
|
|---|
| 278 | the NATGW master node will be via GATEWAY. Such routes
|
|---|
| 279 | are created even if
|
|---|
| 280 | <code class="varname">CTDB_NATGW_DEFAULT_GATEWAY</code> is not
|
|---|
| 281 | specified. If GATEWAY is not specified for some
|
|---|
| 282 | networks then routes are only created on the NATGW
|
|---|
| 283 | master node for those networks if
|
|---|
| 284 | <code class="varname">CTDB_NATGW_DEFAULT_GATEWAY</code> is
|
|---|
| 285 | specified.
|
|---|
| 286 | </p><p>
|
|---|
| 287 | This should be used with care to avoid causing traffic
|
|---|
| 288 | to unnecessarily double-hop through the NAT gateway
|
|---|
| 289 | master, even when a node is hosting public IP addresses.
|
|---|
| 290 | Each specified network or host should probably have a
|
|---|
| 291 | corresponding automatically created link route or static
|
|---|
| 292 | route to avoid this.
|
|---|
| 293 | </p><p>
|
|---|
| 294 | No default.
|
|---|
| 295 | </p></dd></dl></div><div class="refsect3"><a name="idp55141104"></a><h4>Example</h4><pre class="screen">
|
|---|
| 296 | CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
|
|---|
| 297 | CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
|
|---|
| 298 | CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
|
|---|
| 299 | CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
|
|---|
| 300 | CTDB_NATGW_PUBLIC_IFACE=eth0
|
|---|
| 301 | </pre><p>
|
|---|
| 302 | A variation that ensures that infrastructure (ADS, DNS, ...)
|
|---|
| 303 | directly attached to the public network (10.0.0.0/24) is
|
|---|
| 304 | always reachable would look like this:
|
|---|
| 305 | </p><pre class="screen">
|
|---|
| 306 | CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
|
|---|
| 307 | CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
|
|---|
| 308 | CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
|
|---|
| 309 | CTDB_NATGW_PUBLIC_IFACE=eth0
|
|---|
| 310 | CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
|
|---|
| 311 | </pre><p>
|
|---|
| 312 | Note that <code class="varname">CTDB_NATGW_DEFAULT_GATEWAY</code> is
|
|---|
| 313 | not specified.
|
|---|
| 314 | </p></div></div><div class="refsect2"><a name="idp55145008"></a><h3>POLICY ROUTING</h3><p>
|
|---|
| 315 | A node running CTDB may be a component of a complex network
|
|---|
| 316 | topology. In particular, public addresses may be spread
|
|---|
| 317 | across several different networks (or VLANs) and it may not be
|
|---|
| 318 | possible to route packets from these public addresses via the
|
|---|
| 319 | system's default route. Therefore, CTDB has support for
|
|---|
| 320 | policy routing via the <code class="filename">13.per_ip_routing</code>
|
|---|
| 321 | eventscript. This allows routing to be specified for packets
|
|---|
| 322 | sourced from each public address. The routes are added and
|
|---|
| 323 | removed as CTDB moves public addresses between nodes.
|
|---|
| 324 | </p><p>
|
|---|
| 325 | For more information, see the <em class="citetitle">POLICY
|
|---|
| 326 | ROUTING</em> section in
|
|---|
| 327 | <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>.
|
|---|
| 328 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_PER_IP_ROUTING_CONF=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 329 | FILENAME contains elements for constructing the desired
|
|---|
| 330 | routes for each source address.
|
|---|
| 331 | </p><p>
|
|---|
| 332 | The special FILENAME value
|
|---|
| 333 | <code class="constant">__auto_link_local__</code> indicates that no
|
|---|
| 334 | configuration file is provided and that CTDB should
|
|---|
| 335 | generate reasonable link-local routes for each public IP
|
|---|
| 336 | address.
|
|---|
| 337 | </p><p>
|
|---|
| 338 | File format:
|
|---|
| 339 | </p><pre class="screen">
|
|---|
| 340 | <em class="parameter"><code>IPADDR</code></em> <em class="parameter"><code>DEST-IPADDR/MASK</code></em> [<span class="optional"><em class="parameter"><code>GATEWAY-IPADDR</code></em></span>]
|
|---|
| 341 | </pre><p>
|
|---|
| 342 | </p><p>
|
|---|
| 343 | No default, usually
|
|---|
| 344 | <code class="filename">/usr/local/etc/ctdb/policy_routing</code> when enabled.
|
|---|
| 345 | </p></dd><dt><span class="term">CTDB_PER_IP_ROUTING_RULE_PREF=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 346 | NUM sets the priority (or preference) for the routing
|
|---|
| 347 | rules that are added by CTDB.
|
|---|
| 348 | </p><p>
|
|---|
| 349 | This should be (strictly) greater than 0 and (strictly)
|
|---|
| 350 | less than 32766. A priority of 100 is recommended, unless
|
|---|
| 351 | this conflicts with a priority already in use on the
|
|---|
| 352 | system. See
|
|---|
| 353 | <span class="citerefentry"><span class="refentrytitle">ip</span>(8)</span>, for more details.
|
|---|
| 354 | </p></dd><dt><span class="term">
|
|---|
| 355 | CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<em class="parameter"><code>LOW-NUM</code></em>,
|
|---|
| 356 | CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<em class="parameter"><code>HIGH-NUM</code></em>
|
|---|
| 357 | </span></dt><dd><p>
|
|---|
| 358 | CTDB determines a unique routing table number to use for
|
|---|
| 359 | the routing related to each public address. LOW-NUM and
|
|---|
| 360 | HIGH-NUM indicate the minimum and maximum routing table
|
|---|
| 361 | numbers that are used.
|
|---|
| 362 | </p><p>
|
|---|
| 363 | <span class="citerefentry"><span class="refentrytitle">ip</span>(8)</span> uses some
|
|---|
| 364 | reserved routing table numbers below 255. Therefore,
|
|---|
| 365 | CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
|
|---|
| 366 | greater than 255.
|
|---|
| 367 | </p><p>
|
|---|
| 368 | CTDB uses the standard file
|
|---|
| 369 | <code class="filename">/etc/iproute2/rt_tables</code> to maintain
|
|---|
| 370 | a mapping between the routing table numbers and labels.
|
|---|
| 371 | The label for a public address
|
|---|
| 372 | <em class="replaceable"><code>ADDR</code></em> will look like
|
|---|
| 373 | ctdb.<em class="replaceable"><code>addr</code></em>. This means that
|
|---|
| 374 | the associated rules and routes are easy to read (and
|
|---|
| 375 | manipulate).
|
|---|
| 376 | </p><p>
|
|---|
| 377 | No default, usually 1000 and 9000.
|
|---|
| 378 | </p></dd></dl></div><div class="refsect3"><a name="idp55166944"></a><h4>Example</h4><pre class="screen">
|
|---|
| 379 | CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
|
|---|
| 380 | CTDB_PER_IP_ROUTING_RULE_PREF=100
|
|---|
| 381 | CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
|
|---|
| 382 | CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
|
|---|
| 383 | </pre></div></div><div class="refsect2"><a name="idp55168656"></a><h3>MISCELLANEOUS NETWORK CONFIGURATION</h3><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no</span></dt><dd><p>
|
|---|
| 384 | Whether one or more offline interfaces should cause a
|
|---|
| 385 | monitor event to fail if there are other interfaces that
|
|---|
| 386 | are up. If this is "yes" and a node has some interfaces
|
|---|
| 387 | that are down then <span class="command"><strong>ctdb status</strong></span> will
|
|---|
| 388 | display the node as "PARTIALLYONLINE".
|
|---|
| 389 | </p><p>
|
|---|
| 390 | Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is
|
|---|
| 391 | incompatible with NAT gateway, since NAT gateway relies
|
|---|
| 392 | on the interface configured by CTDB_NATGW_PUBLIC_IFACE
|
|---|
| 393 | to be up.
|
|---|
| 394 | </p><p>
|
|---|
| 395 | Default is "no".
|
|---|
| 396 | </p></dd></dl></div></div></div><div class="refsect1"><a name="idp55173328"></a><h2>SERVICE CONFIGURATION</h2><p>
|
|---|
| 397 | CTDB can be configured to manage and/or monitor various NAS (and
|
|---|
| 398 | other) services via its eventscripts.
|
|---|
| 399 | </p><p>
|
|---|
| 400 | In the simplest case CTDB will manage a service. This means the
|
|---|
| 401 | service will be started and stopped along with CTDB, CTDB will
|
|---|
| 402 | monitor the service and CTDB will do any required
|
|---|
| 403 | reconfiguration of the service when public IP addresses are
|
|---|
| 404 | failed over.
|
|---|
| 405 | </p><div class="refsect2"><a name="idp55175184"></a><h3>SAMBA</h3><div class="refsect3"><a name="idp55175824"></a><h4>Eventscripts</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">49.winbind</code></td></tr><tr><td><code class="filename">50.samba</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_SAMBA=yes|no</span></dt><dd><p>
|
|---|
| 406 | Should CTDB manage Samba?
|
|---|
| 407 | </p><p>
|
|---|
| 408 | Default is no.
|
|---|
| 409 | </p></dd><dt><span class="term">CTDB_MANAGES_WINBIND=yes|no</span></dt><dd><p>
|
|---|
| 410 | Should CTDB manage Winbind?
|
|---|
| 411 | </p><p>
|
|---|
| 412 | Default is no.
|
|---|
| 413 | </p></dd><dt><span class="term">CTDB_SAMBA_CHECK_PORTS=<em class="parameter"><code>PORT-LIST</code></em></span></dt><dd><p>
|
|---|
| 414 | When monitoring Samba, check TCP ports in
|
|---|
| 415 | space-separated PORT-LIST.
|
|---|
| 416 | </p><p>
|
|---|
| 417 | Default is to monitor ports that Samba is configured to listen on.
|
|---|
| 418 | </p></dd><dt><span class="term">CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no</span></dt><dd><p>
|
|---|
| 419 | As part of monitoring, should CTDB skip the check for
|
|---|
| 420 | the existence of each directory configured as share in
|
|---|
| 421 | Samba. This may be desirable if there is a large number
|
|---|
| 422 | of shares.
|
|---|
| 423 | </p><p>
|
|---|
| 424 | Default is no.
|
|---|
| 425 | </p></dd><dt><span class="term">CTDB_SERVICE_NMB=<em class="parameter"><code>SERVICE</code></em></span></dt><dd><p>
|
|---|
| 426 | Distribution specific SERVICE for managing nmbd.
|
|---|
| 427 | </p><p>
|
|---|
| 428 | Default is distribution-dependant.
|
|---|
| 429 | </p></dd><dt><span class="term">CTDB_SERVICE_SMB=<em class="parameter"><code>SERVICE</code></em></span></dt><dd><p>
|
|---|
| 430 | Distribution specific SERVICE for managing smbd.
|
|---|
| 431 | </p><p>
|
|---|
| 432 | Default is distribution-dependant.
|
|---|
| 433 | </p></dd><dt><span class="term">CTDB_SERVICE_WINBIND=<em class="parameter"><code>SERVICE</code></em></span></dt><dd><p>
|
|---|
| 434 | Distribution specific SERVICE for managing winbindd.
|
|---|
| 435 | </p><p>
|
|---|
| 436 | Default is "winbind".
|
|---|
| 437 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55195152"></a><h3>NFS</h3><p>
|
|---|
| 438 | This includes parameters for the kernel NFS server.
|
|---|
| 439 | Alternative NFS subsystems (such as <a class="ulink" href="https://github.com/nfs-ganesha/nfs-ganesha/wiki" target="_top">NFS-Ganesha</a>)
|
|---|
| 440 | can be integrated using <code class="varname">CTDB_NFS_CALLOUT</code>.
|
|---|
| 441 | </p><div class="refsect3"><a name="idp55197296"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">60.nfs</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_CLUSTER_FILESYSTEM_TYPE=gpfs</span></dt><dd><p>
|
|---|
| 442 | The type of cluster filesystem to use with NFS-ganesha.
|
|---|
| 443 | Currently only "gpfs" is supported.
|
|---|
| 444 | </p><p>
|
|---|
| 445 | Default is "gpfs".
|
|---|
| 446 | </p></dd><dt><span class="term">CTDB_MANAGES_NFS=yes|no</span></dt><dd><p>
|
|---|
| 447 | Should CTDB manage NFS?
|
|---|
| 448 | </p><p>
|
|---|
| 449 | Default is no.
|
|---|
| 450 | </p></dd><dt><span class="term">CTDB_NFS_CALLOUT=<em class="parameter"><code>COMMAND</code></em></span></dt><dd><p>
|
|---|
| 451 | COMMAND specifies the path to a callout to handle
|
|---|
| 452 | interactions with the configured NFS system, including
|
|---|
| 453 | startup, shutdown, monitoring.
|
|---|
| 454 | </p><p>
|
|---|
| 455 | Default is the included
|
|---|
| 456 | <span class="command"><strong>nfs-linux-kernel-callout</strong></span>.
|
|---|
| 457 | </p></dd><dt><span class="term">CTDB_NFS_SKIP_SHARE_CHECK=yes|no</span></dt><dd><p>
|
|---|
| 458 | As part of monitoring, should CTDB skip the check for
|
|---|
| 459 | the existence of each directory exported via NFS. This
|
|---|
| 460 | may be desirable if there is a large number of exports.
|
|---|
| 461 | </p><p>
|
|---|
| 462 | Default is no.
|
|---|
| 463 | </p></dd><dt><span class="term">CTDB_RPCINFO_LOCALHOST=<em class="parameter"><code>IPADDR</code></em>|<em class="parameter"><code>HOSTNAME</code></em></span></dt><dd><p>
|
|---|
| 464 | IPADDR or HOSTNAME indicates the address that
|
|---|
| 465 | <span class="command"><strong>rpcinfo</strong></span> should connect to when doing
|
|---|
| 466 | <span class="command"><strong>rpcinfo</strong></span> check on IPv4 RPC service during
|
|---|
| 467 | monitoring. Optimally this would be "localhost".
|
|---|
| 468 | However, this can add some performance overheads.
|
|---|
| 469 | </p><p>
|
|---|
| 470 | Default is "127.0.0.1".
|
|---|
| 471 | </p></dd><dt><span class="term">CTDB_RPCINFO_LOCALHOST6=<em class="parameter"><code>IPADDR</code></em>|<em class="parameter"><code>HOSTNAME</code></em></span></dt><dd><p>
|
|---|
| 472 | IPADDR or HOSTNAME indicates the address that
|
|---|
| 473 | <span class="command"><strong>rpcinfo</strong></span> should connect to when doing
|
|---|
| 474 | <span class="command"><strong>rpcinfo</strong></span> check on IPv6 RPC service
|
|---|
| 475 | during monitoring. Optimally this would be "localhost6"
|
|---|
| 476 | (or similar). However, this can add some performance
|
|---|
| 477 | overheads.
|
|---|
| 478 | </p><p>
|
|---|
| 479 | Default is "::1".
|
|---|
| 480 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55218368"></a><h3>APACHE HTTPD</h3><p>
|
|---|
| 481 | CTDB can manage the Apache web server.
|
|---|
| 482 | </p><div class="refsect3"><a name="idp55219392"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">41.httpd</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_HTTPD=yes|no</span></dt><dd><p>
|
|---|
| 483 | Should CTDB manage the Apache web server?
|
|---|
| 484 | </p><p>
|
|---|
| 485 | Default is no.
|
|---|
| 486 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55223968"></a><h3>CLAMAV</h3><p>
|
|---|
| 487 | CTDB has support to manage the popular anti-virus daemon
|
|---|
| 488 | ClamAV.
|
|---|
| 489 | </p><div class="refsect3"><a name="idp55225088"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">31.clamd</code></td></tr></table><p>
|
|---|
| 490 | This eventscript is not enabled by default. Use
|
|---|
| 491 | <span class="command"><strong>ctdb enablescript</strong></span> to enable it.
|
|---|
| 492 | </p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_CLAMD=yes|no</span></dt><dd><p>
|
|---|
| 493 | Should CTDB manage ClamAV?
|
|---|
| 494 | </p><p>
|
|---|
| 495 | Default is no.
|
|---|
| 496 | </p></dd><dt><span class="term">CTDB_CLAMD_SOCKET=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 497 | FILENAME is the socket to monitor ClamAV.
|
|---|
| 498 | </p><p>
|
|---|
| 499 | No default.
|
|---|
| 500 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55233168"></a><h3>ISCSI</h3><p>
|
|---|
| 501 | CTDB has support for managing the Linux iSCSI tgtd service.
|
|---|
| 502 | </p><div class="refsect3"><a name="idp55234272"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">70.iscsi</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_ISCSI=yes|no</span></dt><dd><p>
|
|---|
| 503 | Should CTDB manage iSCSI tgtd?
|
|---|
| 504 | </p><p>
|
|---|
| 505 | Default is no.
|
|---|
| 506 | </p></dd><dt><span class="term">CTDB_START_ISCSI_SCRIPTS=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 507 | DIRECTORY on shared storage containing scripts to start
|
|---|
| 508 | tgtd for each public IP address.
|
|---|
| 509 | </p><p>
|
|---|
| 510 | No default.
|
|---|
| 511 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55241392"></a><h3>MULTIPATHD</h3><p>
|
|---|
| 512 | CTDB can monitor multipath devices to ensure that active paths
|
|---|
| 513 | are available.
|
|---|
| 514 | </p><div class="refsect3"><a name="idp55242512"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">20.multipathd</code></td></tr></table><p>
|
|---|
| 515 | This eventscript is not enabled by default. Use
|
|---|
| 516 | <span class="command"><strong>ctdb enablescript</strong></span> to enable it.
|
|---|
| 517 | </p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MONITOR_MPDEVICES=<em class="parameter"><code>MP-DEVICE-LIST</code></em></span></dt><dd><p>
|
|---|
| 518 | MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
|
|---|
| 519 | </p><p>
|
|---|
| 520 | No default.
|
|---|
| 521 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55248768"></a><h3>VSFTPD</h3><p>
|
|---|
| 522 | CTDB can manage the vsftpd FTP server.
|
|---|
| 523 | </p><div class="refsect3"><a name="idp55249792"></a><h4>Eventscript</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">40.vsftpd</code></td></tr></table></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGES_VSFTPD=yes|no</span></dt><dd><p>
|
|---|
| 524 | Should CTDB manage the vsftpd FTP server?
|
|---|
| 525 | </p><p>
|
|---|
| 526 | Default is no.
|
|---|
| 527 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55254368"></a><h3>
|
|---|
| 528 | SYSTEM RESOURCE MONITORING CONFIGURATION
|
|---|
| 529 | </h3><p>
|
|---|
| 530 | CTDB can experience seemingly random (performance and other)
|
|---|
| 531 | issues if system resources become too constrained. Options in
|
|---|
| 532 | this section can be enabled to allow certain system resources
|
|---|
| 533 | to be checked. They allows warnings to be logged and nodes to
|
|---|
| 534 | be marked unhealthy when system resource usage reaches the
|
|---|
| 535 | configured thresholds.
|
|---|
| 536 | </p><p>
|
|---|
| 537 | Some checks are enabled by default. It is recommended that
|
|---|
| 538 | these checks remain enabled or are augmented by extra checks.
|
|---|
| 539 | There is no supported way of completely disabling the checks.
|
|---|
| 540 | </p><div class="refsect3"><a name="idp55256352"></a><h4>Eventscripts</h4><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">05.system</code></td></tr></table><p>
|
|---|
| 541 | Filesystem and memory usage monitoring is in
|
|---|
| 542 | <code class="filename">05.system</code>.
|
|---|
| 543 | </p></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MONITOR_FILESYSTEM_USAGE=<em class="parameter"><code>FS-LIMIT-LIST</code></em></span></dt><dd><p>
|
|---|
| 544 | FS-LIMIT-LIST is a space-separated list of
|
|---|
| 545 | <em class="parameter"><code>FILESYSTEM</code></em>:<em class="parameter"><code>WARN_LIMIT</code></em>[<span class="optional">:<em class="parameter"><code>UNHEALTHY_LIMIT</code></em></span>]
|
|---|
| 546 | triples indicating that warnings should be logged if the
|
|---|
| 547 | space used on FILESYSTEM reaches WARN_LIMIT%. If usage
|
|---|
| 548 | reaches UNHEALTHY_LIMIT then the node should be flagged
|
|---|
| 549 | unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
|
|---|
| 550 | left blank, meaning that check will be omitted.
|
|---|
| 551 | </p><p>
|
|---|
| 552 | Default is to warn for each filesystem containing a
|
|---|
| 553 | database directory (<code class="envar">CTDB_DBDIR</code>,
|
|---|
| 554 | <code class="envar">CTDB_DBDIR_PERSISTENT</code>,
|
|---|
| 555 | <code class="envar">CTDB_DBDIR_STATE</code>) with a threshold of
|
|---|
| 556 | 90%.
|
|---|
| 557 | </p></dd><dt><span class="term">CTDB_MONITOR_MEMORY_USAGE=<em class="parameter"><code>MEM-LIMITS</code></em></span></dt><dd><p>
|
|---|
| 558 | MEM-LIMITS takes the form
|
|---|
| 559 | <em class="parameter"><code>WARN_LIMIT</code></em>[<span class="optional">:<em class="parameter"><code>UNHEALTHY_LIMIT</code></em></span>]
|
|---|
| 560 | indicating that warnings should be logged if memory
|
|---|
| 561 | usage reaches WARN_LIMIT%. If usage reaches
|
|---|
| 562 | UNHEALTHY_LIMIT then the node should be flagged
|
|---|
| 563 | unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
|
|---|
| 564 | left blank, meaning that check will be omitted.
|
|---|
| 565 | </p><p>
|
|---|
| 566 | Default is 80, so warnings will be logged when memory
|
|---|
| 567 | usage reaches 80%.
|
|---|
| 568 | </p></dd><dt><span class="term">CTDB_MONITOR_SWAP_USAGE=<em class="parameter"><code>SWAP-LIMITS</code></em></span></dt><dd><p>
|
|---|
| 569 | SWAP-LIMITS takes the form
|
|---|
| 570 | <em class="parameter"><code>WARN_LIMIT</code></em>[<span class="optional">:<em class="parameter"><code>UNHEALTHY_LIMIT</code></em></span>]
|
|---|
| 571 | indicating that warnings should be logged if
|
|---|
| 572 | swap usage reaches WARN_LIMIT%. If usage reaches
|
|---|
| 573 | UNHEALTHY_LIMIT then the node should be flagged
|
|---|
| 574 | unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
|
|---|
| 575 | left blank, meaning that check will be omitted.
|
|---|
| 576 | </p><p>
|
|---|
| 577 | Default is 25, so warnings will be logged when swap
|
|---|
| 578 | usage reaches 25%.
|
|---|
| 579 | </p></dd></dl></div></div><div class="refsect2"><a name="idp55274512"></a><h3>MISCELLANEOUS SERVICE-RELATED CONFIGURATION</h3><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_MANAGED_SERVICES=<em class="parameter"><code>SERVICE-LIST</code></em></span></dt><dd><p>
|
|---|
| 580 | SERVICE-LIST is a space-separated list of SERVICEs that
|
|---|
| 581 | CTDB should manage. This can be used as an alternative
|
|---|
| 582 | to the
|
|---|
| 583 | <code class="varname">CTDB_MANAGES_<em class="replaceable"><code>SERVICE</code></em></code>
|
|---|
| 584 | variables.
|
|---|
| 585 | </p><p>
|
|---|
| 586 | No default.
|
|---|
| 587 | </p></dd><dt><span class="term">CTDB_SERVICE_AUTOSTARTSTOP=yes|no</span></dt><dd><p>
|
|---|
| 588 | When CTDB should start and stop services if they become
|
|---|
| 589 | managed or unmanaged.
|
|---|
| 590 | </p><p>
|
|---|
| 591 | Default is no.
|
|---|
| 592 | </p></dd></dl></div></div></div><div class="refsect1"><a name="idp55281040"></a><h2>
|
|---|
| 593 | TUNABLES CONFIGURATION
|
|---|
| 594 | </h2><p>
|
|---|
| 595 | CTDB tunables (see
|
|---|
| 596 | <span class="citerefentry"><span class="refentrytitle">ctdbd-tunables</span>(7)</span>) can be set from the
|
|---|
| 597 | configuration file. They are set as follows:
|
|---|
| 598 |
|
|---|
| 599 | </p><div class="literallayout"><p><br>
|
|---|
| 600 | CTDB_SET_<em class="replaceable"><code>TUNABLE</code></em>=<em class="replaceable"><code>VALUE</code></em><br>
|
|---|
| 601 | </p></div><p>
|
|---|
| 602 | </p><p>
|
|---|
| 603 | For example:
|
|---|
| 604 |
|
|---|
| 605 | </p><pre class="screen">
|
|---|
| 606 | CTDB_SET_MonitorInterval=20
|
|---|
| 607 | </pre><p>
|
|---|
| 608 | </p></div><div class="refsect1"><a name="idp55285824"></a><h2>
|
|---|
| 609 | DEBUG AND TEST
|
|---|
| 610 | </h2><p>
|
|---|
| 611 | Variable in this section are for debugging and testing CTDB.
|
|---|
| 612 | They should not generally be needed.
|
|---|
| 613 | </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">CTDB_DEBUG_HUNG_SCRIPT=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 614 | FILENAME is a script to run to log debug information when
|
|---|
| 615 | an event script times out.
|
|---|
| 616 | </p><p>
|
|---|
| 617 | Default is <code class="filename"><code class="varname">CTDB_BASE</code>/debug-hung-script.sh</code>.
|
|---|
| 618 | </p></dd><dt><span class="term">CTDB_DEBUG_HUNG_SCRIPT_LOGFILE=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 619 | FILENAME specifies where log messages should go when
|
|---|
| 620 | debugging hung eventscripts. This is a testing option.
|
|---|
| 621 | See also <em class="citetitle">CTDB_DEBUG_HUNG_SCRIPT</em>.
|
|---|
| 622 | </p><p>
|
|---|
| 623 | No default. Messages go to stdout/stderr and are logged
|
|---|
| 624 | to the same place as other CTDB log messages.
|
|---|
| 625 | </p></dd><dt><span class="term">CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<em class="parameter"><code>REGEXP</code></em></span></dt><dd><p>
|
|---|
| 626 | REGEXP specifies interesting processes for which stack
|
|---|
| 627 | traces should be logged when debugging hung eventscripts
|
|---|
| 628 | and those processes are matched in pstree output. REGEXP
|
|---|
| 629 | is an extended regexp so choices are separated by pipes
|
|---|
| 630 | ('|'). However, REGEXP should not contain parentheses.
|
|---|
| 631 | See also <em class="citetitle">CTDB_DEBUG_HUNG_SCRIPT</em>.
|
|---|
| 632 | </p><p>
|
|---|
| 633 | Default is "exportfs|rpcinfo".
|
|---|
| 634 | </p></dd><dt><span class="term">CTDB_DEBUG_LOCKS=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 635 | FILENAME is a script to run to log debug information when
|
|---|
| 636 | an CTDB fails to freeze databases during recovery.
|
|---|
| 637 | </p><p>
|
|---|
| 638 | No default, usually
|
|---|
| 639 | <code class="filename"><code class="varname">CTDB_BASE</code>/debug_locks.sh</code>.
|
|---|
| 640 | </p></dd><dt><span class="term">CTDB_SYS_ETCDIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 641 | DIRECTORY containing system configuration files. This is
|
|---|
| 642 | used to provide alternate configuration when testing and
|
|---|
| 643 | should not need to be changed from the default.
|
|---|
| 644 | </p><p>
|
|---|
| 645 | Default is <code class="filename">/etc</code>.
|
|---|
| 646 | </p></dd><dt><span class="term">CTDB_INIT_STYLE=debian|redhat|suse</span></dt><dd><p>
|
|---|
| 647 | This is the init style used by the Linux distribution (or
|
|---|
| 648 | other operating system) being used. This is usually
|
|---|
| 649 | determined dynamically by checking the system. This
|
|---|
| 650 | variable is used by the initscript to determine which init
|
|---|
| 651 | system primitives to use. It is also used by some
|
|---|
| 652 | eventscripts to choose the name of initscripts for certain
|
|---|
| 653 | services, since these can vary between distributions.
|
|---|
| 654 | </p><p>
|
|---|
| 655 | No fixed default.
|
|---|
| 656 | </p><p>
|
|---|
| 657 | If this option needs to be changed from the calculated
|
|---|
| 658 | default for the initscript to function properly, then it
|
|---|
| 659 | must be set in the distribution-specific initscript
|
|---|
| 660 | configuration, such as
|
|---|
| 661 | <code class="filename">/etc/sysconfig/ctdb</code>
|
|---|
| 662 | </p></dd><dt><span class="term">CTDB_MAX_CORRUPT_DB_BACKUPS=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 663 | NUM is the maximum number of volatile TDB database backups
|
|---|
| 664 | to be kept (for each database) when a corrupt database is
|
|---|
| 665 | found during startup. Volatile TDBs are zeroed during
|
|---|
| 666 | startup so backups are needed to debug any corruption that
|
|---|
| 667 | occurs before a restart.
|
|---|
| 668 | </p><p>
|
|---|
| 669 | Default is 10.
|
|---|
| 670 | </p></dd><dt><span class="term">CTDB_MAX_OPEN_FILES=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 671 | NUM is the maximum number of open files.
|
|---|
| 672 | </p><p>
|
|---|
| 673 | There is no default.
|
|---|
| 674 | </p></dd><dt><span class="term">CTDB_RC_LOCAL=<em class="parameter"><code>FILENAME</code></em></span></dt><dd><p>
|
|---|
| 675 | FILENAME is a script fragment to be sourced by the
|
|---|
| 676 | <code class="filename">functions</code> that is sourced by scripts.
|
|---|
| 677 | On example use would be to override function definitions
|
|---|
| 678 | in unit tests. As a sanity check, this file must be
|
|---|
| 679 | executable for it to be used.
|
|---|
| 680 | </p><p>
|
|---|
| 681 | No default.
|
|---|
| 682 | </p></dd><dt><span class="term">CTDB_RUN_TIMEOUT_MONITOR=yes|no</span></dt><dd><p>
|
|---|
| 683 | Whether CTDB should simulate timing out monitor events.
|
|---|
| 684 | This uses the <code class="filename">99.timeout</code> eventscript.
|
|---|
| 685 | </p><p>
|
|---|
| 686 | Default is no.
|
|---|
| 687 | </p></dd><dt><span class="term">CTDB_SCRIPT_DEBUGLEVEL=<em class="parameter"><code>NUM</code></em></span></dt><dd><p>
|
|---|
| 688 | NUM is the level debugging messages printed by CTDB
|
|---|
| 689 | scripts. Setting this to a higher number (e.g. 4) will
|
|---|
| 690 | cause some scripts to log more messages.
|
|---|
| 691 | </p><p>
|
|---|
| 692 | Default is 2.
|
|---|
| 693 | </p></dd><dt><span class="term">CTDB_SUPPRESS_COREFILE=yes|no</span></dt><dd><p>
|
|---|
| 694 | Whether CTDB core files should be suppressed.
|
|---|
| 695 | </p><p>
|
|---|
| 696 | Default is no.
|
|---|
| 697 | </p></dd><dt><span class="term">CTDB_VALGRIND=yes|no|<em class="parameter"><code>COMMAND</code></em></span></dt><dd><p>
|
|---|
| 698 | If "yes", this causes
|
|---|
| 699 | <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span> to be run under
|
|---|
| 700 | <span class="citerefentry"><span class="refentrytitle">valgrind</span>(1)</span> with logs going to
|
|---|
| 701 | <code class="filename">/usr/local/var/log/ctdb_valgrind</code>. If neither
|
|---|
| 702 | "yes" nor "no" then the value is assumed to be a COMMAND
|
|---|
| 703 | (e.g. a <span class="command"><strong>valgrind</strong></span> variation, a
|
|---|
| 704 | <span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span> command) that is
|
|---|
| 705 | used in place of the default <span class="command"><strong>valgrind</strong></span>
|
|---|
| 706 | command. In either case, the <code class="option">--valgrind</code>
|
|---|
| 707 | option is passed to <span class="command"><strong>ctdbd</strong></span>.
|
|---|
| 708 | </p><p>
|
|---|
| 709 | Default is no.
|
|---|
| 710 | </p></dd><dt><span class="term">CTDB_VARDIR=<em class="parameter"><code>DIRECTORY</code></em></span></dt><dd><p>
|
|---|
| 711 | DIRECTORY containing CTDB files that are modified at
|
|---|
| 712 | runtime.
|
|---|
| 713 | </p><p>
|
|---|
| 714 | Defaults to <code class="filename">/usr/local/var/lib/ctdb</code>.
|
|---|
| 715 | </p></dd></dl></div></div><div class="refsect1"><a name="idp55334560"></a><h2>FILES</h2><table border="0" summary="Simple list" class="simplelist"><tr><td><code class="filename">/usr/local/etc/ctdb/ctdbd.conf</code></td></tr><tr><td><code class="filename">/etc/sysconfig/ctdb</code></td></tr><tr><td><code class="filename">/etc/default/ctdb</code></td></tr><tr><td><code class="filename">/usr/local/etc/ctdb/sysconfig/ctdb</code></td></tr></table></div><div class="refsect1"><a name="idp55338960"></a><h2>SEE ALSO</h2><p>
|
|---|
| 716 | <span class="citerefentry"><span class="refentrytitle">ctdbd</span>(1)</span>,
|
|---|
| 717 |
|
|---|
| 718 | <span class="citerefentry"><span class="refentrytitle">ctdbd_wrapper</span>(1)</span>,
|
|---|
| 719 |
|
|---|
| 720 | <span class="citerefentry"><span class="refentrytitle">onnode</span>(1)</span>,
|
|---|
| 721 |
|
|---|
| 722 | <span class="citerefentry"><span class="refentrytitle">ctdb</span>(7)</span>,
|
|---|
| 723 |
|
|---|
| 724 | <span class="citerefentry"><span class="refentrytitle">ctdb-tunables</span>(7)</span>,
|
|---|
| 725 |
|
|---|
| 726 | <a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
|
|---|
| 727 | </p></div></div></body></html>
|
|---|