mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
doc: regenerate ctdb and ctdb manpages after xml changes
Michael (This used to be ctdb commit 51fce280d3a7e2cce8e6e268a19d3594b38b9bb6)
This commit is contained in:
parent
eb10f70fa1
commit
9fc080d529
@ -2,12 +2,12 @@
|
||||
.\" Title: ctdb
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
|
||||
.\" Date: 02/23/2010
|
||||
.\" Manual:
|
||||
.\" Source:
|
||||
.\" Date: 02/24/2010
|
||||
.\" Manual: CTDB - clustered TDB database
|
||||
.\" Source: ctdb
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "CTDB" "1" "02/23/2010" "" ""
|
||||
.TH "CTDB" "1" "02/24/2010" "ctdb" "CTDB \- clustered TDB database"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@ -32,7 +32,7 @@ ctdb is a utility to view and manage a ctdb cluster\&.
|
||||
.PP
|
||||
\-n <pnn>
|
||||
.RS 4
|
||||
This specifies the physical node number on which to execute the command\&. Default is to run the command on the deamon running on the local host\&.
|
||||
This specifies the physical node number on which to execute the command\&. Default is to run the command on the daemon running on the local host\&.
|
||||
.sp
|
||||
The physical node number is an integer that describes the node in the cluster\&. The first node has physical node number 0\&.
|
||||
.RE
|
||||
@ -253,7 +253,7 @@ response from 0 time=0\&.000054 sec (3 clients)
|
||||
response from 1 time=0\&.000144 sec (2 clients)
|
||||
response from 2 time=0\&.000105 sec (2 clients)
|
||||
response from 3 time=0\&.000114 sec (2 clients)
|
||||
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -275,7 +275,7 @@ name:eth5 link:up references:2
|
||||
name:eth4 link:down references:0
|
||||
name:eth3 link:up references:1
|
||||
name:eth2 link:up references:1
|
||||
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -325,7 +325,7 @@ Public IPs on node 0
|
||||
172\&.31\&.92\&.83 node[0] active[eth5] available[eth5] configured[eth4,eth5]
|
||||
172\&.31\&.92\&.84 node[1] active[] available[eth5] configured[eth4,eth5]
|
||||
172\&.31\&.92\&.85 node[0] active[eth5] available[eth5] configured[eth4,eth5]
|
||||
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -348,7 +348,7 @@ Example output:
|
||||
:172\&.31\&.92\&.83:0:eth5:eth5:eth4,eth5:
|
||||
:172\&.31\&.92\&.84:1::eth5:eth4,eth5:
|
||||
:172\&.31\&.92\&.85:0:eth5:eth5:eth4,eth5:
|
||||
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
@ -808,11 +808,11 @@ Example output:
|
||||
.\}
|
||||
.nf
|
||||
Number of databases:10
|
||||
dbid:0x435d3410 name:notify\&.tdb path:/var/ctdb/notify\&.tdb\&.0
|
||||
dbid:0x42fe72c5 name:locking\&.tdb path:/var/ctdb/locking\&.tdb\&.0 dbid:0x1421fb78 name:brlock\&.tdb path:/var/ctdb/brlock\&.tdb\&.0
|
||||
dbid:0x17055d90 name:connections\&.tdb path:/var/ctdb/connections\&.tdb\&.0
|
||||
dbid:0xc0bdde6a name:sessionid\&.tdb path:/var/ctdb/sessionid\&.tdb\&.0
|
||||
dbid:0x122224da name:test\&.tdb path:/var/ctdb/test\&.tdb\&.0
|
||||
dbid:0x435d3410 name:notify\&.tdb path:/var/ctdb/notify\&.tdb\&.0
|
||||
dbid:0x42fe72c5 name:locking\&.tdb path:/var/ctdb/locking\&.tdb\&.0 dbid:0x1421fb78 name:brlock\&.tdb path:/var/ctdb/brlock\&.tdb\&.0
|
||||
dbid:0x17055d90 name:connections\&.tdb path:/var/ctdb/connections\&.tdb\&.0
|
||||
dbid:0xc0bdde6a name:sessionid\&.tdb path:/var/ctdb/sessionid\&.tdb\&.0
|
||||
dbid:0x122224da name:test\&.tdb path:/var/ctdb/test\&.tdb\&.0
|
||||
dbid:0x2672a57f name:idmap2\&.tdb path:/var/ctdb/persistent/idmap2\&.tdb\&.0 PERSISTENT
|
||||
dbid:0xb775fff6 name:secrets\&.tdb path:/var/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT
|
||||
dbid:0xe98e08b6 name:group_mapping\&.tdb path:/var/ctdb/persistent/group_mapping\&.tdb\&.0 PERSISTENT
|
||||
@ -906,7 +906,7 @@ ACTIVE \- This is the normal mode\&. The node is actively monitoring all other n
|
||||
DISABLED \- This node is not monitoring that other nodes are available\&. In this mode a node failure will not be detected and no recovery will be performed\&. This mode is useful when for debugging purposes one wants to attach GDB to a ctdb process but wants to prevent the rest of the cluster from marking this node as DISCONNECTED and do a recovery\&.
|
||||
.SS "setmonmode <0|1>"
|
||||
.PP
|
||||
This command can be used to explicitely disable/enable monitoring mode on a node\&. The main purpose is if one wants to attach GDB to a running ctdb daemon but wants to prevent the other nodes from marking it as DISCONNECTED and issuing a recovery\&. To do this, set monitoring mode to 0 on all nodes before attaching with GDB\&. Remember to set monitoring mode back to 1 afterwards\&.
|
||||
This command can be used to explicitly disable/enable monitoring mode on a node\&. The main purpose is if one wants to attach GDB to a running ctdb daemon but wants to prevent the other nodes from marking it as DISCONNECTED and issuing a recovery\&. To do this, set monitoring mode to 0 on all nodes before attaching with GDB\&. Remember to set monitoring mode back to 1 afterwards\&.
|
||||
.SS "attach <dbname>"
|
||||
.PP
|
||||
This is a debugging command\&. This command will make the CTDB daemon create a new CTDB database and attach to it\&.
|
||||
@ -931,7 +931,7 @@ This is a debugging command\&. This command can be used to manually invoke and r
|
||||
.PP
|
||||
Administratively ban a node for bantime seconds\&. A bantime of 0 means that the node should be permanently banned\&.
|
||||
.PP
|
||||
A banned node does not participate in the cluster and does not host any records for the clustered TDB\&. Its ip address has been taken over by an other node and no services are hosted\&.
|
||||
A banned node does not participate in the cluster and does not host any records for the clustered TDB\&. Its ip address has been taken over by another node and no services are hosted\&.
|
||||
.PP
|
||||
Nodes are automatically banned if they are the cause of too many cluster recoveries\&.
|
||||
.SS "unban"
|
||||
|
@ -1,8 +1,8 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="ctdb"><a name="ctdb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb — clustered tdb database management utility</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdb [ OPTIONS ] COMMAND ...</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdb</code> [-n <node>] [-Y] [-t <timeout>] [-T <timelimit>] [-? --help] [--usage] [-d --debug=<INTEGER>] [--socket=<filename>]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id353400"></a><h2>DESCRIPTION</h2><p>
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="ctdb"><a name="ctdb.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdb — clustered tdb database management utility</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdb [ OPTIONS ] COMMAND ...</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdb</code> [-n <node>] [-Y] [-t <timeout>] [-T <timelimit>] [-? --help] [--usage] [-d --debug=<INTEGER>] [--socket=<filename>]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id568069"></a><h2>DESCRIPTION</h2><p>
|
||||
ctdb is a utility to view and manage a ctdb cluster.
|
||||
</p></div><div class="refsect1" title="OPTIONS"><a name="id353410"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n <pnn></span></dt><dd><p>
|
||||
</p></div><div class="refsect1" title="OPTIONS"><a name="id568079"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n <pnn></span></dt><dd><p>
|
||||
This specifies the physical node number on which to execute the
|
||||
command. Default is to run the command on the deamon running on
|
||||
command. Default is to run the command on the daemon running on
|
||||
the local host.
|
||||
</p><p>
|
||||
The physical node number is an integer that describes the node in the
|
||||
@ -28,13 +28,13 @@
|
||||
You only need to specify this parameter if you run multiple ctdb
|
||||
daemons on the same physical host and thus can not use the default
|
||||
name for the domain socket.
|
||||
</p></dd></dl></div></div><div class="refsect1" title="Administrative Commands"><a name="id353534"></a><h2>Administrative Commands</h2><p>
|
||||
</p></dd></dl></div></div><div class="refsect1" title="Administrative Commands"><a name="id568203"></a><h2>Administrative Commands</h2><p>
|
||||
These are commands used to monitor and administrate a CTDB cluster.
|
||||
</p><div class="refsect2" title="pnn"><a name="id353542"></a><h3>pnn</h3><p>
|
||||
</p><div class="refsect2" title="pnn"><a name="id568211"></a><h3>pnn</h3><p>
|
||||
This command displays the pnn of the current node.
|
||||
</p></div><div class="refsect2" title="status"><a name="id353551"></a><h3>status</h3><p>
|
||||
</p></div><div class="refsect2" title="status"><a name="id568220"></a><h3>status</h3><p>
|
||||
This command shows the current status of the ctdb node.
|
||||
</p><div class="refsect3" title="node status"><a name="id353559"></a><h4>node status</h4><p>
|
||||
</p><div class="refsect3" title="node status"><a name="id568228"></a><h4>node status</h4><p>
|
||||
Node status reflects the current status of the node. There are five possible states:
|
||||
</p><p>
|
||||
OK - This node is fully functional.
|
||||
@ -57,7 +57,7 @@
|
||||
in a cluster like a node that is ok. Some interfaces to serve
|
||||
public ip addresses are down, but at least one interface is up.
|
||||
See also "ctdb ifaces".
|
||||
</p></div><div class="refsect3" title="generation"><a name="id353608"></a><h4>generation</h4><p>
|
||||
</p></div><div class="refsect3" title="generation"><a name="id568277"></a><h4>generation</h4><p>
|
||||
The generation id is a number that indicates the current generation
|
||||
of a cluster instance. Each time a cluster goes through a
|
||||
reconfiguration or a recovery its generation id will be changed.
|
||||
@ -78,10 +78,10 @@
|
||||
All nodes start with generation "INVALID" and are not assigned a real
|
||||
generation id until they have successfully been merged with a cluster
|
||||
through a recovery.
|
||||
</p></div><div class="refsect3" title="VNNMAP"><a name="id353634"></a><h4>VNNMAP</h4><p>
|
||||
</p></div><div class="refsect3" title="VNNMAP"><a name="id568302"></a><h4>VNNMAP</h4><p>
|
||||
The list of Virtual Node Numbers. This is a list of all nodes that actively participates in the cluster and that share the workload of hosting the Clustered TDB database records.
|
||||
Only nodes that are participating in the vnnmap can become lmaster or dmaster for a database record.
|
||||
</p></div><div class="refsect3" title="Recovery mode"><a name="id353645"></a><h4>Recovery mode</h4><p>
|
||||
</p></div><div class="refsect3" title="Recovery mode"><a name="id568314"></a><h4>Recovery mode</h4><p>
|
||||
This is the current recovery mode of the cluster. There are two possible modes:
|
||||
</p><p>
|
||||
NORMAL - The cluster is fully operational.
|
||||
@ -101,7 +101,7 @@
|
||||
have been recovered, the node mode will change into NORMAL mode
|
||||
and the databases will be "thawed", allowing samba to access the
|
||||
databases again.
|
||||
</p></div><div class="refsect3" title="Recovery master"><a name="id353676"></a><h4>Recovery master</h4><p>
|
||||
</p></div><div class="refsect3" title="Recovery master"><a name="id568345"></a><h4>Recovery master</h4><p>
|
||||
This is the cluster node that is currently designated as the recovery master. This node is responsible of monitoring the consistency of the cluster and to perform the actual recovery process when reqired.
|
||||
</p><p>
|
||||
Only one node at a time can be the designated recovery master. Which
|
||||
@ -123,9 +123,9 @@ hash:2 lmaster:2
|
||||
hash:3 lmaster:3
|
||||
Recovery mode:NORMAL (0)
|
||||
Recovery master:0
|
||||
</pre></div><div class="refsect2" title="recmaster"><a name="id353708"></a><h3>recmaster</h3><p>
|
||||
</pre></div><div class="refsect2" title="recmaster"><a name="id568377"></a><h3>recmaster</h3><p>
|
||||
This command shows the pnn of the node which is currently the recmaster.
|
||||
</p></div><div class="refsect2" title="uptime"><a name="id353718"></a><h3>uptime</h3><p>
|
||||
</p></div><div class="refsect2" title="uptime"><a name="id568387"></a><h3>uptime</h3><p>
|
||||
This command shows the uptime for the ctdb daemon. When the last recovery or ip-failover completed and how long it took. If the "duration" is shown as a negative number, this indicates that there is a recovery/failover in progress and it started that many seconds ago.
|
||||
</p><p>
|
||||
Example: ctdb uptime
|
||||
@ -134,7 +134,7 @@ Current time of node : Thu Oct 29 10:38:54 2009
|
||||
Ctdbd start time : (000 16:54:28) Wed Oct 28 17:44:26 2009
|
||||
Time of last recovery/failover: (000 16:53:31) Wed Oct 28 17:45:23 2009
|
||||
Duration of last recovery/failover: 2.248552 seconds
|
||||
</pre></div><div class="refsect2" title="listnodes"><a name="id353744"></a><h3>listnodes</h3><p>
|
||||
</pre></div><div class="refsect2" title="listnodes"><a name="id568413"></a><h3>listnodes</h3><p>
|
||||
This command shows lists the ip addresses of all the nodes in the cluster.
|
||||
</p><p>
|
||||
Example: ctdb listnodes
|
||||
@ -143,7 +143,7 @@ Duration of last recovery/failover: 2.248552 seconds
|
||||
10.0.0.72
|
||||
10.0.0.73
|
||||
10.0.0.74
|
||||
</pre></div><div class="refsect2" title="ping"><a name="id353767"></a><h3>ping</h3><p>
|
||||
</pre></div><div class="refsect2" title="ping"><a name="id568436"></a><h3>ping</h3><p>
|
||||
This command will "ping" all CTDB daemons in the cluster to verify that they are processing commands correctly.
|
||||
</p><p>
|
||||
Example: ctdb ping
|
||||
@ -154,7 +154,7 @@ response from 0 time=0.000054 sec (3 clients)
|
||||
response from 1 time=0.000144 sec (2 clients)
|
||||
response from 2 time=0.000105 sec (2 clients)
|
||||
response from 3 time=0.000114 sec (2 clients)
|
||||
</pre></div><div class="refsect2" title="ifaces"><a name="id353791"></a><h3>ifaces</h3><p>
|
||||
</pre></div><div class="refsect2" title="ifaces"><a name="id568460"></a><h3>ifaces</h3><p>
|
||||
This command will display the list of network interfaces, which could
|
||||
host public addresses, along with their status.
|
||||
</p><p>
|
||||
@ -177,13 +177,13 @@ name:eth2 link:up references:1
|
||||
:eth4:0:0
|
||||
:eth3:1:1
|
||||
:eth2:1:1
|
||||
</pre></div><div class="refsect2" title="setifacelink <iface> <status>"><a name="id353828"></a><h3>setifacelink <iface> <status></h3><p>
|
||||
</pre></div><div class="refsect2" title="setifacelink <iface> <status>"><a name="id568497"></a><h3>setifacelink <iface> <status></h3><p>
|
||||
This command will set the status of a network interface.
|
||||
The status needs to be "up" or "down". This is typically
|
||||
used in the 10.interfaces script in the "monitor" event.
|
||||
</p><p>
|
||||
Example: ctdb setifacelink eth0 up
|
||||
</p></div><div class="refsect2" title="ip"><a name="id353842"></a><h3>ip</h3><p>
|
||||
</p></div><div class="refsect2" title="ip"><a name="id568511"></a><h3>ip</h3><p>
|
||||
This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip. By default this command will ONLY show those public addresses that are known to the node itself. To see the full list of all public ips across the cluster you must use "ctdb ip -n all".
|
||||
</p><p>
|
||||
Example: ctdb ip
|
||||
@ -213,7 +213,7 @@ Public IPs on node 0
|
||||
:172.31.92.83:0:eth5:eth5:eth4,eth5:
|
||||
:172.31.92.84:1::eth5:eth4,eth5:
|
||||
:172.31.92.85:0:eth5:eth5:eth4,eth5:
|
||||
</pre></div><div class="refsect2" title="ipinfo <ip>"><a name="id353887"></a><h3>ipinfo <ip></h3><p>
|
||||
</pre></div><div class="refsect2" title="ipinfo <ip>"><a name="id568556"></a><h3>ipinfo <ip></h3><p>
|
||||
This command will display details about the specified public addresses.
|
||||
</p><p>
|
||||
Example: ctdb ipinfo 172.31.92.85
|
||||
@ -226,7 +226,7 @@ CurrentNode:0
|
||||
NumInterfaces:2
|
||||
Interface[1]: Name:eth4 Link:down References:0
|
||||
Interface[2]: Name:eth5 Link:up References:2 (active)
|
||||
</pre></div><div class="refsect2" title="scriptstatus"><a name="id310517"></a><h3>scriptstatus</h3><p>
|
||||
</pre></div><div class="refsect2" title="scriptstatus"><a name="id525225"></a><h3>scriptstatus</h3><p>
|
||||
This command displays which scripts where run in the previous monitoring cycle and the result of each script. If a script failed with an error, causing the node to become unhealthy, the output from that script is also shown.
|
||||
</p><p>
|
||||
Example: ctdb scriptstatus
|
||||
@ -243,15 +243,15 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
|
||||
41.httpd Status:OK Duration:0.039 Tue Mar 24 18:56:57 2009
|
||||
50.samba Status:ERROR Duration:0.082 Tue Mar 24 18:56:57 2009
|
||||
OUTPUT:ERROR: Samba tcp port 445 is not responding
|
||||
</pre></div><div class="refsect2" title="disablescript <script>"><a name="id310546"></a><h3>disablescript <script></h3><p>
|
||||
</pre></div><div class="refsect2" title="disablescript <script>"><a name="id525254"></a><h3>disablescript <script></h3><p>
|
||||
This command is used to disable an eventscript.
|
||||
</p><p>
|
||||
This will take effect the next time the eventscripts are being executed so it can take a short while until this is reflected in 'scriptstatus'.
|
||||
</p></div><div class="refsect2" title="enablescript <script>"><a name="id310559"></a><h3>enablescript <script></h3><p>
|
||||
</p></div><div class="refsect2" title="enablescript <script>"><a name="id525268"></a><h3>enablescript <script></h3><p>
|
||||
This command is used to enable an eventscript.
|
||||
</p><p>
|
||||
This will take effect the next time the eventscripts are being executed so it can take a short while until this is reflected in 'scriptstatus'.
|
||||
</p></div><div class="refsect2" title="getvar <name>"><a name="id310573"></a><h3>getvar <name></h3><p>
|
||||
</p></div><div class="refsect2" title="getvar <name>"><a name="id525282"></a><h3>getvar <name></h3><p>
|
||||
Get the runtime value of a tuneable variable.
|
||||
</p><p>
|
||||
Example: ctdb getvar MaxRedirectCount
|
||||
@ -259,11 +259,11 @@ Interface[2]: Name:eth5 Link:up References:2 (active)
|
||||
Example output:
|
||||
</p><pre class="screen">
|
||||
MaxRedirectCount = 3
|
||||
</pre></div><div class="refsect2" title="setvar <name> <value>"><a name="id310594"></a><h3>setvar <name> <value></h3><p>
|
||||
</pre></div><div class="refsect2" title="setvar <name> <value>"><a name="id525303"></a><h3>setvar <name> <value></h3><p>
|
||||
Set the runtime value of a tuneable variable.
|
||||
</p><p>
|
||||
Example: ctdb setvar MaxRedirectCount 5
|
||||
</p></div><div class="refsect2" title="listvars"><a name="id310607"></a><h3>listvars</h3><p>
|
||||
</p></div><div class="refsect2" title="listvars"><a name="id525315"></a><h3>listvars</h3><p>
|
||||
List all tuneable variables.
|
||||
</p><p>
|
||||
Example: ctdb listvars
|
||||
@ -312,7 +312,7 @@ VacuumMaxInterval = 600
|
||||
MaxQueueDropMsg = 1000
|
||||
UseStatusEvents = 0
|
||||
AllowUnhealthyDBRead = 0
|
||||
</pre></div><div class="refsect2" title="lvsmaster"><a name="id310637"></a><h3>lvsmaster</h3><p>
|
||||
</pre></div><div class="refsect2" title="lvsmaster"><a name="id525346"></a><h3>lvsmaster</h3><p>
|
||||
This command shows which node is currently the LVSMASTER. The
|
||||
LVSMASTER is the node in the cluster which drives the LVS system and
|
||||
which receives all incoming traffic from clients.
|
||||
@ -323,7 +323,7 @@ AllowUnhealthyDBRead = 0
|
||||
evenly onto the other nodes in the cluster. This is an alternative to using
|
||||
public ip addresses. See the manpage for ctdbd for more information
|
||||
about LVS.
|
||||
</p></div><div class="refsect2" title="lvs"><a name="id310655"></a><h3>lvs</h3><p>
|
||||
</p></div><div class="refsect2" title="lvs"><a name="id525363"></a><h3>lvs</h3><p>
|
||||
This command shows which nodes in the cluster are currently active in the
|
||||
LVS configuration. I.e. which nodes we are currently loadbalancing
|
||||
the single ip address across.
|
||||
@ -338,7 +338,7 @@ AllowUnhealthyDBRead = 0
|
||||
</p><pre class="screen">
|
||||
2:10.0.0.13
|
||||
3:10.0.0.14
|
||||
</pre></div><div class="refsect2" title="getcapabilities"><a name="id310681"></a><h3>getcapabilities</h3><p>
|
||||
</pre></div><div class="refsect2" title="getcapabilities"><a name="id525389"></a><h3>getcapabilities</h3><p>
|
||||
This command shows the capabilities of the current node.
|
||||
Please see manpage for ctdbd for a full list of all capabilities and
|
||||
more detailed description.
|
||||
@ -357,7 +357,7 @@ AllowUnhealthyDBRead = 0
|
||||
RECMASTER: YES
|
||||
LMASTER: YES
|
||||
LVS: NO
|
||||
</pre></div><div class="refsect2" title="statistics"><a name="id310711"></a><h3>statistics</h3><p>
|
||||
</pre></div><div class="refsect2" title="statistics"><a name="id525419"></a><h3>statistics</h3><p>
|
||||
Collect statistics from the CTDB daemon about how many calls it has served.
|
||||
</p><p>
|
||||
Example: ctdb statistics
|
||||
@ -399,23 +399,23 @@ CTDB version 1
|
||||
max_hop_count 0
|
||||
max_call_latency 4.948321 sec
|
||||
max_lockwait_latency 0.000000 sec
|
||||
</pre></div><div class="refsect2" title="statisticsreset"><a name="id310744"></a><h3>statisticsreset</h3><p>
|
||||
</pre></div><div class="refsect2" title="statisticsreset"><a name="id525452"></a><h3>statisticsreset</h3><p>
|
||||
This command is used to clear all statistics counters in a node.
|
||||
</p><p>
|
||||
Example: ctdb statisticsreset
|
||||
</p></div><div class="refsect2" title="getreclock"><a name="id310756"></a><h3>getreclock</h3><p>
|
||||
</p></div><div class="refsect2" title="getreclock"><a name="id525465"></a><h3>getreclock</h3><p>
|
||||
This command is used to show the filename of the reclock file that is used.
|
||||
</p><p>
|
||||
Example output:
|
||||
</p><pre class="screen">
|
||||
Reclock file:/gpfs/.ctdb/shared
|
||||
</pre></div><div class="refsect2" title="setreclock [filename]"><a name="id310774"></a><h3>setreclock [filename]</h3><p>
|
||||
</pre></div><div class="refsect2" title="setreclock [filename]"><a name="id525483"></a><h3>setreclock [filename]</h3><p>
|
||||
This command is used to modify, or clear, the file that is used as the reclock file at runtime. When this command is used, the reclock file checks are disabled. To re-enable the checks the administrator needs to activate the "VerifyRecoveryLock" tunable using "ctdb setvar".
|
||||
</p><p>
|
||||
If run with no parameter this will remove the reclock file completely. If run with a parameter the parameter specifies the new filename to use for the recovery lock.
|
||||
</p><p>
|
||||
This command only affects the runtime settings of a ctdb node and will be lost when ctdb is restarted. For persistent changes to the reclock file setting you must edit /etc/sysconfig/ctdb.
|
||||
</p></div><div class="refsect2" title="getdebug"><a name="id310796"></a><h3>getdebug</h3><p>
|
||||
</p></div><div class="refsect2" title="getdebug"><a name="id525504"></a><h3>getdebug</h3><p>
|
||||
Get the current debug level for the node. the debug level controls what information is written to the log file.
|
||||
</p><p>
|
||||
The debug levels are mapped to the corresponding syslog levels.
|
||||
@ -425,42 +425,42 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
The list of debug levels from highest to lowest are :
|
||||
</p><p>
|
||||
EMERG ALERT CRIT ERR WARNING NOTICE INFO DEBUG
|
||||
</p></div><div class="refsect2" title="setdebug <debuglevel>"><a name="id310817"></a><h3>setdebug <debuglevel></h3><p>
|
||||
</p></div><div class="refsect2" title="setdebug <debuglevel>"><a name="id525525"></a><h3>setdebug <debuglevel></h3><p>
|
||||
Set the debug level of a node. This controls what information will be logged.
|
||||
</p><p>
|
||||
The debuglevel is one of EMERG ALERT CRIT ERR WARNING NOTICE INFO DEBUG
|
||||
</p></div><div class="refsect2" title="getpid"><a name="id310830"></a><h3>getpid</h3><p>
|
||||
</p></div><div class="refsect2" title="getpid"><a name="id525538"></a><h3>getpid</h3><p>
|
||||
This command will return the process id of the ctdb daemon.
|
||||
</p></div><div class="refsect2" title="disable"><a name="id310838"></a><h3>disable</h3><p>
|
||||
</p></div><div class="refsect2" title="disable"><a name="id525547"></a><h3>disable</h3><p>
|
||||
This command is used to administratively disable a node in the cluster.
|
||||
A disabled node will still participate in the cluster and host
|
||||
clustered TDB records but its public ip address has been taken over by
|
||||
a different node and it no longer hosts any services.
|
||||
</p></div><div class="refsect2" title="enable"><a name="id310850"></a><h3>enable</h3><p>
|
||||
</p></div><div class="refsect2" title="enable"><a name="id525558"></a><h3>enable</h3><p>
|
||||
Re-enable a node that has been administratively disabled.
|
||||
</p></div><div class="refsect2" title="stop"><a name="id310859"></a><h3>stop</h3><p>
|
||||
</p></div><div class="refsect2" title="stop"><a name="id525567"></a><h3>stop</h3><p>
|
||||
This command is used to administratively STOP a node in the cluster.
|
||||
A STOPPED node is connected to the cluster but will not host any
|
||||
public ip addresse, nor does it participate in the VNNMAP.
|
||||
The difference between a DISABLED node and a STOPPED node is that
|
||||
a STOPPED node does not host any parts of the database which means
|
||||
that a recovery is required to stop/continue nodes.
|
||||
</p></div><div class="refsect2" title="continue"><a name="id310871"></a><h3>continue</h3><p>
|
||||
</p></div><div class="refsect2" title="continue"><a name="id525580"></a><h3>continue</h3><p>
|
||||
Re-start a node that has been administratively stopped.
|
||||
</p></div><div class="refsect2" title="addip <public_ip/mask> <iface>"><a name="id310880"></a><h3>addip <public_ip/mask> <iface></h3><p>
|
||||
</p></div><div class="refsect2" title="addip <public_ip/mask> <iface>"><a name="id525588"></a><h3>addip <public_ip/mask> <iface></h3><p>
|
||||
This command is used to add a new public ip to a node during runtime.
|
||||
This allows public addresses to be added to a cluster without having
|
||||
to restart the ctdb daemons.
|
||||
</p><p>
|
||||
Note that this only updates the runtime instance of ctdb. Any changes will be lost next time ctdb is restarted and the public addresses file is re-read.
|
||||
If you want this change to be permanent you must also update the public addresses file manually.
|
||||
</p></div><div class="refsect2" title="delip <public_ip>"><a name="id310896"></a><h3>delip <public_ip></h3><p>
|
||||
</p></div><div class="refsect2" title="delip <public_ip>"><a name="id525605"></a><h3>delip <public_ip></h3><p>
|
||||
This command is used to remove a public ip from a node during runtime.
|
||||
If this public ip is currently hosted by the node it being removed from, the ip will first be failed over to another node, if possible, before it is removed.
|
||||
</p><p>
|
||||
Note that this only updates the runtime instance of ctdb. Any changes will be lost next time ctdb is restarted and the public addresses file is re-read.
|
||||
If you want this change to be permanent you must also update the public addresses file manually.
|
||||
</p></div><div class="refsect2" title="moveip <public_ip> <node>"><a name="id310913"></a><h3>moveip <public_ip> <node></h3><p>
|
||||
</p></div><div class="refsect2" title="moveip <public_ip> <node>"><a name="id525621"></a><h3>moveip <public_ip> <node></h3><p>
|
||||
This command can be used to manually fail a public ip address to a
|
||||
specific node.
|
||||
</p><p>
|
||||
@ -471,14 +471,14 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
DeterministicIPs = 0
|
||||
</p><p>
|
||||
NoIPFailback = 1
|
||||
</p></div><div class="refsect2" title="shutdown"><a name="id310935"></a><h3>shutdown</h3><p>
|
||||
</p></div><div class="refsect2" title="shutdown"><a name="id525643"></a><h3>shutdown</h3><p>
|
||||
This command will shutdown a specific CTDB daemon.
|
||||
</p></div><div class="refsect2" title="recover"><a name="id310944"></a><h3>recover</h3><p>
|
||||
</p></div><div class="refsect2" title="recover"><a name="id525652"></a><h3>recover</h3><p>
|
||||
This command will trigger the recovery daemon to do a cluster
|
||||
recovery.
|
||||
</p></div><div class="refsect2" title="ipreallocate"><a name="id310953"></a><h3>ipreallocate</h3><p>
|
||||
</p></div><div class="refsect2" title="ipreallocate"><a name="id525662"></a><h3>ipreallocate</h3><p>
|
||||
This command will force the recovery master to perform a full ip reallocation process and redistribute all ip addresses. This is useful to "reset" the allocations back to its default state if they have been changed using the "moveip" command. While a "recover" will also perform this reallocation, a recovery is much more hevyweight since it will also rebuild all the databases.
|
||||
</p></div><div class="refsect2" title="setlmasterrole <on|off>"><a name="id310966"></a><h3>setlmasterrole <on|off></h3><p>
|
||||
</p></div><div class="refsect2" title="setlmasterrole <on|off>"><a name="id525674"></a><h3>setlmasterrole <on|off></h3><p>
|
||||
This command is used ot enable/disable the LMASTER capability for a node at runtime. This capability determines whether or not a node can be used as an LMASTER for records in the database. A node that does not have the LMASTER capability will not show up in the vnnmap.
|
||||
</p><p>
|
||||
Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command.
|
||||
@ -486,21 +486,21 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
Once this setting has been enabled/disabled, you need to perform a recovery for it to take effect.
|
||||
</p><p>
|
||||
See also "ctdb getcapabilities"
|
||||
</p></div><div class="refsect2" title="setrecmasterrole <on|off>"><a name="id310989"></a><h3>setrecmasterrole <on|off></h3><p>
|
||||
</p></div><div class="refsect2" title="setrecmasterrole <on|off>"><a name="id525698"></a><h3>setrecmasterrole <on|off></h3><p>
|
||||
This command is used ot enable/disable the RECMASTER capability for a node at runtime. This capability determines whether or not a node can be used as an RECMASTER for the cluster. A node that does not have the RECMASTER capability can not win a recmaster election. A node that already is the recmaster for the cluster when the capability is stripped off the node will remain the recmaster until the next cluster election.
|
||||
</p><p>
|
||||
Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command.
|
||||
</p><p>
|
||||
See also "ctdb getcapabilities"
|
||||
</p></div><div class="refsect2" title="killtcp <srcip:port> <dstip:port>"><a name="id311009"></a><h3>killtcp <srcip:port> <dstip:port></h3><p>
|
||||
</p></div><div class="refsect2" title="killtcp <srcip:port> <dstip:port>"><a name="id525718"></a><h3>killtcp <srcip:port> <dstip:port></h3><p>
|
||||
This command will kill the specified TCP connection by issuing a
|
||||
TCP RST to the srcip:port endpoint. This is a command used by the
|
||||
ctdb eventscripts.
|
||||
</p></div><div class="refsect2" title="gratiousarp <ip> <interface>"><a name="id311020"></a><h3>gratiousarp <ip> <interface></h3><p>
|
||||
</p></div><div class="refsect2" title="gratiousarp <ip> <interface>"><a name="id525729"></a><h3>gratiousarp <ip> <interface></h3><p>
|
||||
This command will send out a gratious arp for the specified interface
|
||||
through the specified interface. This command is mainly used by the
|
||||
ctdb eventscripts.
|
||||
</p></div><div class="refsect2" title="reloadnodes"><a name="id311031"></a><h3>reloadnodes</h3><p>
|
||||
</p></div><div class="refsect2" title="reloadnodes"><a name="id525739"></a><h3>reloadnodes</h3><p>
|
||||
This command is used when adding new nodes, or removing existing nodes from an existing cluster.
|
||||
</p><p>
|
||||
Procedure to add a node:
|
||||
@ -534,7 +534,7 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
</p><p>
|
||||
5, Use 'ctdb status' on all nodes and verify that the deleted node no longer shows up in the list..
|
||||
</p><p>
|
||||
</p></div><div class="refsect2" title="tickle <srcip:port> <dstip:port>"><a name="id311097"></a><h3>tickle <srcip:port> <dstip:port></h3><p>
|
||||
</p></div><div class="refsect2" title="tickle <srcip:port> <dstip:port>"><a name="id525805"></a><h3>tickle <srcip:port> <dstip:port></h3><p>
|
||||
This command will will send a TCP tickle to the source host for the
|
||||
specified TCP connection.
|
||||
A TCP tickle is a TCP ACK packet with an invalid sequence and
|
||||
@ -546,10 +546,10 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
TCP connection has been disrupted and that the client will need
|
||||
to reestablish. This greatly speeds up the time it takes for a client
|
||||
to detect and reestablish after an IP failover in the ctdb cluster.
|
||||
</p></div><div class="refsect2" title="gettickles <ip>"><a name="id311115"></a><h3>gettickles <ip></h3><p>
|
||||
</p></div><div class="refsect2" title="gettickles <ip>"><a name="id525824"></a><h3>gettickles <ip></h3><p>
|
||||
This command is used to show which TCP connections are registered with
|
||||
CTDB to be "tickled" if there is a failover.
|
||||
</p></div><div class="refsect2" title="repack [max_freelist]"><a name="id354728"></a><h3>repack [max_freelist]</h3><p>
|
||||
</p></div><div class="refsect2" title="repack [max_freelist]"><a name="id569398"></a><h3>repack [max_freelist]</h3><p>
|
||||
Over time, when records are created and deleted in a TDB, the TDB list of free space will become fragmented. This can lead to a slowdown in accessing TDB records.
|
||||
This command is used to defragment a TDB database and pruning the freelist.
|
||||
</p><p>
|
||||
@ -564,7 +564,7 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
Example: ctdb repack 1000
|
||||
</p><p>
|
||||
By default, this operation is issued from the 00.ctdb event script every 5 minutes.
|
||||
</p></div><div class="refsect2" title="vacuum [max_records]"><a name="id354765"></a><h3>vacuum [max_records]</h3><p>
|
||||
</p></div><div class="refsect2" title="vacuum [max_records]"><a name="id569435"></a><h3>vacuum [max_records]</h3><p>
|
||||
Over time CTDB databases will fill up with empty deleted records which will lead to a progressive slow down of CTDB database access.
|
||||
This command is used to prune all databases and delete all empty records from the cluster.
|
||||
</p><p>
|
||||
@ -580,14 +580,14 @@ Reclock file:/gpfs/.ctdb/shared
|
||||
Example: ctdb vacuum
|
||||
</p><p>
|
||||
By default, this operation is issued from the 00.ctdb event script every 5 minutes.
|
||||
</p></div><div class="refsect2" title="backupdb <dbname> <file>"><a name="id354794"></a><h3>backupdb <dbname> <file></h3><p>
|
||||
</p></div><div class="refsect2" title="backupdb <dbname> <file>"><a name="id569464"></a><h3>backupdb <dbname> <file></h3><p>
|
||||
This command can be used to copy the entire content of a database out to a file. This file can later be read back into ctdb using the restoredb command.
|
||||
This is mainly useful for backing up persistent databases such as secrets.tdb and similar.
|
||||
</p></div><div class="refsect2" title="restoredb <file>"><a name="id354805"></a><h3>restoredb <file></h3><p>
|
||||
</p></div><div class="refsect2" title="restoredb <file>"><a name="id569475"></a><h3>restoredb <file></h3><p>
|
||||
This command restores a persistent database that was previously backed up using backupdb.
|
||||
</p></div><div class="refsect2" title="wipedb <dbname>"><a name="id354815"></a><h3>wipedb <dbname></h3><p>
|
||||
</p></div><div class="refsect2" title="wipedb <dbname>"><a name="id569484"></a><h3>wipedb <dbname></h3><p>
|
||||
This command can be used to remove all content of a database.
|
||||
</p></div></div><div class="refsect2" title="getlog <level>"><a name="id354825"></a><h3>getlog <level></h3><p>
|
||||
</p></div></div><div class="refsect2" title="getlog <level>"><a name="id569494"></a><h3>getlog <level></h3><p>
|
||||
In addition to the normal loggign to a log file,
|
||||
CTDBD also keeps a in-memory ringbuffer containing the most recent
|
||||
log entries for all log levels (except DEBUG).
|
||||
@ -600,14 +600,14 @@ This is mainly useful for backing up persistent databases such as secrets.tdb an
|
||||
</p><p>
|
||||
This command extracts all messages of level or lower log level from
|
||||
memory and prints it to the screen.
|
||||
</p></div><div class="refsect2" title="clearlog"><a name="id354843"></a><h3>clearlog</h3><p>
|
||||
</p></div><div class="refsect2" title="clearlog"><a name="id569512"></a><h3>clearlog</h3><p>
|
||||
This command clears the in-memory logging ringbuffer.
|
||||
</p></div><div class="refsect1" title="Debugging Commands"><a name="id354852"></a><h2>Debugging Commands</h2><p>
|
||||
</p></div><div class="refsect1" title="Debugging Commands"><a name="id569521"></a><h2>Debugging Commands</h2><p>
|
||||
These commands are primarily used for CTDB development and testing and
|
||||
should not be used for normal administration.
|
||||
</p><div class="refsect2" title="process-exists <pid>"><a name="id354860"></a><h3>process-exists <pid></h3><p>
|
||||
</p><div class="refsect2" title="process-exists <pid>"><a name="id569529"></a><h3>process-exists <pid></h3><p>
|
||||
This command checks if a specific process exists on the CTDB host. This is mainly used by Samba to check if remote instances of samba are still running or not.
|
||||
</p></div><div class="refsect2" title="getdbmap"><a name="id354871"></a><h3>getdbmap</h3><p>
|
||||
</p></div><div class="refsect2" title="getdbmap"><a name="id569539"></a><h3>getdbmap</h3><p>
|
||||
This command lists all clustered TDB databases that the CTDB daemon has attached to. Some databases are flagged as PERSISTENT, this means that the database stores data persistently and the data will remain across reboots. One example of such a database is secrets.tdb where information about how the cluster was joined to the domain is stored.
|
||||
</p><p>
|
||||
If a PERSISTENT database is not in a healthy state the database is
|
||||
@ -646,7 +646,7 @@ dbid:0xb775fff6 name:secrets.tdb path:/var/ctdb/persistent/secrets.tdb.0 PERSIST
|
||||
</p><pre class="screen">
|
||||
:ID:Name:Path:Persistent:Unhealthy:
|
||||
:0x7bbbd26c:passdb.tdb:/var/ctdb/persistent/passdb.tdb.0:1:0:
|
||||
</pre></div><div class="refsect2" title="getdbstatus <dbname>"><a name="id354936"></a><h3>getdbstatus <dbname></h3><p>
|
||||
</pre></div><div class="refsect2" title="getdbstatus <dbname>"><a name="id569604"></a><h3>getdbstatus <dbname></h3><p>
|
||||
This command displays more details about a database.
|
||||
</p><p>
|
||||
Example: ctdb getdbstatus test.tdb.0
|
||||
@ -668,28 +668,28 @@ name: registry.tdb
|
||||
path: /var/ctdb/persistent/registry.tdb.0
|
||||
PERSISTENT: yes
|
||||
HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/var/ctdb/persistent/registry.tdb.0.corrupted.20091208091949.0Z'
|
||||
</pre></div><div class="refsect2" title="catdb <dbname>"><a name="id354971"></a><h3>catdb <dbname></h3><p>
|
||||
</pre></div><div class="refsect2" title="catdb <dbname>"><a name="id569639"></a><h3>catdb <dbname></h3><p>
|
||||
This command will dump a clustered TDB database to the screen. This is a debugging command.
|
||||
</p></div><div class="refsect2" title="dumpdbbackup <backup-file>"><a name="id354980"></a><h3>dumpdbbackup <backup-file></h3><p>
|
||||
</p></div><div class="refsect2" title="dumpdbbackup <backup-file>"><a name="id569648"></a><h3>dumpdbbackup <backup-file></h3><p>
|
||||
This command will dump the content of database backup to the screen
|
||||
(similar to ctdb catdb). This is a debugging command.
|
||||
</p></div><div class="refsect2" title="getmonmode"><a name="id354990"></a><h3>getmonmode</h3><p>
|
||||
</p></div><div class="refsect2" title="getmonmode"><a name="id569658"></a><h3>getmonmode</h3><p>
|
||||
This command returns the monutoring mode of a node. The monitoring mode is either ACTIVE or DISABLED. Normally a node will continously monitor that all other nodes that are expected are in fact connected and that they respond to commands.
|
||||
</p><p>
|
||||
ACTIVE - This is the normal mode. The node is actively monitoring all other nodes, both that the transport is connected and also that the node responds to commands. If a node becomes unavailable, it will be marked as DISCONNECTED and a recovery is initiated to restore the cluster.
|
||||
</p><p>
|
||||
DISABLED - This node is not monitoring that other nodes are available. In this mode a node failure will not be detected and no recovery will be performed. This mode is useful when for debugging purposes one wants to attach GDB to a ctdb process but wants to prevent the rest of the cluster from marking this node as DISCONNECTED and do a recovery.
|
||||
</p></div><div class="refsect2" title="setmonmode <0|1>"><a name="id355013"></a><h3>setmonmode <0|1></h3><p>
|
||||
This command can be used to explicitely disable/enable monitoring mode on a node. The main purpose is if one wants to attach GDB to a running ctdb daemon but wants to prevent the other nodes from marking it as DISCONNECTED and issuing a recovery. To do this, set monitoring mode to 0 on all nodes before attaching with GDB. Remember to set monitoring mode back to 1 afterwards.
|
||||
</p></div><div class="refsect2" title="attach <dbname>"><a name="id355025"></a><h3>attach <dbname></h3><p>
|
||||
</p></div><div class="refsect2" title="setmonmode <0|1>"><a name="id569681"></a><h3>setmonmode <0|1></h3><p>
|
||||
This command can be used to explicitly disable/enable monitoring mode on a node. The main purpose is if one wants to attach GDB to a running ctdb daemon but wants to prevent the other nodes from marking it as DISCONNECTED and issuing a recovery. To do this, set monitoring mode to 0 on all nodes before attaching with GDB. Remember to set monitoring mode back to 1 afterwards.
|
||||
</p></div><div class="refsect2" title="attach <dbname>"><a name="id569693"></a><h3>attach <dbname></h3><p>
|
||||
This is a debugging command. This command will make the CTDB daemon create a new CTDB database and attach to it.
|
||||
</p></div><div class="refsect2" title="dumpmemory"><a name="id355035"></a><h3>dumpmemory</h3><p>
|
||||
</p></div><div class="refsect2" title="dumpmemory"><a name="id569703"></a><h3>dumpmemory</h3><p>
|
||||
This is a debugging command. This command will make the ctdb
|
||||
daemon to write a fill memory allocation map to standard output.
|
||||
</p></div><div class="refsect2" title="rddumpmemory"><a name="id355045"></a><h3>rddumpmemory</h3><p>
|
||||
</p></div><div class="refsect2" title="rddumpmemory"><a name="id569713"></a><h3>rddumpmemory</h3><p>
|
||||
This is a debugging command. This command will dump the talloc memory
|
||||
allocation tree for the recovery daemon to standard output.
|
||||
</p></div><div class="refsect2" title="freeze"><a name="id355054"></a><h3>freeze</h3><p>
|
||||
</p></div><div class="refsect2" title="freeze"><a name="id569722"></a><h3>freeze</h3><p>
|
||||
This command will lock all the local TDB databases causing clients
|
||||
that are accessing these TDBs such as samba3 to block until the
|
||||
databases are thawed.
|
||||
@ -697,26 +697,26 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/var/ctdb/persist
|
||||
This is primarily used by the recovery daemon to stop all samba
|
||||
daemons from accessing any databases while the database is recovered
|
||||
and rebuilt.
|
||||
</p></div><div class="refsect2" title="thaw"><a name="id355070"></a><h3>thaw</h3><p>
|
||||
</p></div><div class="refsect2" title="thaw"><a name="id569738"></a><h3>thaw</h3><p>
|
||||
Thaw a previously frozen node.
|
||||
</p></div><div class="refsect2" title="eventscript <arguments>"><a name="id355078"></a><h3>eventscript <arguments></h3><p>
|
||||
</p></div><div class="refsect2" title="eventscript <arguments>"><a name="id569746"></a><h3>eventscript <arguments></h3><p>
|
||||
This is a debugging command. This command can be used to manually
|
||||
invoke and run the eventscritps with arbitrary arguments.
|
||||
</p></div><div class="refsect2" title="ban <bantime|0>"><a name="id355088"></a><h3>ban <bantime|0></h3><p>
|
||||
</p></div><div class="refsect2" title="ban <bantime|0>"><a name="id569756"></a><h3>ban <bantime|0></h3><p>
|
||||
Administratively ban a node for bantime seconds. A bantime of 0 means that the node should be permanently banned.
|
||||
</p><p>
|
||||
A banned node does not participate in the cluster and does not host any records for the clustered TDB. Its ip address has been taken over by an other node and no services are hosted.
|
||||
A banned node does not participate in the cluster and does not host any records for the clustered TDB. Its ip address has been taken over by another node and no services are hosted.
|
||||
</p><p>
|
||||
Nodes are automatically banned if they are the cause of too many
|
||||
cluster recoveries.
|
||||
</p></div><div class="refsect2" title="unban"><a name="id355107"></a><h3>unban</h3><p>
|
||||
</p></div><div class="refsect2" title="unban"><a name="id569775"></a><h3>unban</h3><p>
|
||||
This command is used to unban a node that has either been
|
||||
administratively banned using the ban command or has been automatically
|
||||
banned by the recovery daemon.
|
||||
</p></div></div><div class="refsect1" title="SEE ALSO"><a name="id355118"></a><h2>SEE ALSO</h2><p>
|
||||
</p></div></div><div class="refsect1" title="SEE ALSO"><a name="id569786"></a><h2>SEE ALSO</h2><p>
|
||||
ctdbd(1), onnode(1)
|
||||
<a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
|
||||
</p></div><div class="refsect1" title="COPYRIGHT/LICENSE"><a name="id355131"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
|
||||
</p></div><div class="refsect1" title="COPYRIGHT/LICENSE"><a name="id569799"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
|
||||
Copyright (C) Andrew Tridgell 2007<br>
|
||||
Copyright (C) Ronnie sahlberg 2007<br>
|
||||
<br>
|
||||
|
438
ctdb/doc/ctdbd.1
438
ctdb/doc/ctdbd.1
@ -1,623 +1,685 @@
|
||||
'\" t
|
||||
.\" Title: ctdbd
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
|
||||
.\" Date: 01/15/2010
|
||||
.\" Manual:
|
||||
.\" Source:
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
|
||||
.\" Date: 02/24/2010
|
||||
.\" Manual: CTDB - clustered TDB database
|
||||
.\" Source: ctdb
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "CTDBD" "1" "01/15/2010" "" ""
|
||||
.TH "CTDBD" "1" "02/24/2010" "ctdb" "CTDB \- clustered TDB database"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
ctdbd - The CTDB cluster daemon
|
||||
ctdbd \- The CTDB cluster daemon
|
||||
.SH "SYNOPSIS"
|
||||
.HP 6
|
||||
.HP \w'\fBctdbd\fR\ 'u
|
||||
\fBctdbd\fR
|
||||
.HP 6
|
||||
.HP \w'\fBctdbd\fR\ 'u
|
||||
\fBctdbd\fR [\-?\ \-\-help] [\-d\ \-\-debug=<INTEGER>] {\-\-dbdir=<directory>} {\-\-dbdir\-persistent=<directory>} [\-\-event\-script\-dir=<directory>] [\-i\ \-\-interactive] [\-\-listen=<address>] [\-\-logfile=<filename>] [\-\-lvs] {\-\-nlist=<filename>} [\-\-no\-lmaster] [\-\-no\-recmaster] [\-\-nosetsched] {\-\-notification\-script=<filename>} [\-\-public\-addresses=<filename>] [\-\-public\-interface=<interface>] {\-\-reclock=<filename>} [\-\-single\-public\-ip=<address>] [\-\-socket=<filename>] [\-\-start\-as\-disabled] [\-\-start\-as\-stopped] [\-\-syslog] [\-\-log\-ringbuf\-size=<num\-entries>] [\-\-torture] [\-\-transport=<STRING>] [\-\-usage]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
ctdbd is the main ctdb daemon\.
|
||||
ctdbd is the main ctdb daemon\&.
|
||||
.PP
|
||||
ctdbd provides a clustered version of the TDB database with automatic rebuild/recovery of the databases upon nodefailures\.
|
||||
ctdbd provides a clustered version of the TDB database with automatic rebuild/recovery of the databases upon nodefailures\&.
|
||||
.PP
|
||||
Combined with a cluster filesystem ctdbd provides a full HA environment for services such as clustered Samba and NFS as well as other services\.
|
||||
Combined with a cluster filesystem ctdbd provides a full HA environment for services such as clustered Samba and NFS as well as other services\&.
|
||||
.PP
|
||||
ctdbd provides monitoring of all nodes in the cluster and automatically reconfigures the cluster and recovers upon node failures\.
|
||||
ctdbd provides monitoring of all nodes in the cluster and automatically reconfigures the cluster and recovers upon node failures\&.
|
||||
.PP
|
||||
ctdbd is the main component in clustered Samba that provides a high\-availability load\-sharing CIFS server cluster\.
|
||||
ctdbd is the main component in clustered Samba that provides a high\-availability load\-sharing CIFS server cluster\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-? \-\-help
|
||||
.RS 4
|
||||
Print some help text to the screen\.
|
||||
Print some help text to the screen\&.
|
||||
.RE
|
||||
.PP
|
||||
\-d \-\-debug=<DEBUGLEVEL>
|
||||
.RS 4
|
||||
This option sets the debuglevel on the ctdbd daemon which controls what will be written to the logfile\. The default is 0 which will only log important events and errors\. A larger number will provide additional logging\.
|
||||
This option sets the debuglevel on the ctdbd daemon which controls what will be written to the logfile\&. The default is 0 which will only log important events and errors\&. A larger number will provide additional logging\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-dbdir=<directory>
|
||||
.RS 4
|
||||
This is the directory on local storage where ctdbd keeps the local copy of the TDB databases\. This directory is local for each node and should not be stored on the shared cluster filesystem\.
|
||||
This is the directory on local storage where ctdbd keeps the local copy of the TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&.
|
||||
.sp
|
||||
This directory would usually be /var/ctdb \.
|
||||
This directory would usually be /var/ctdb \&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-dbdir\-persistent=<directory>
|
||||
.RS 4
|
||||
This is the directory on local storage where ctdbd keeps the local copy of the persistent TDB databases\. This directory is local for each node and should not be stored on the shared cluster filesystem\.
|
||||
This is the directory on local storage where ctdbd keeps the local copy of the persistent TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&.
|
||||
.sp
|
||||
This directory would usually be /etc/ctdb/persistent \.
|
||||
This directory would usually be /etc/ctdb/persistent \&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-event\-script\-dir=<directory>
|
||||
.RS 4
|
||||
This option is used to specify the directory where the CTDB event scripts are stored\.
|
||||
This option is used to specify the directory where the CTDB event scripts are stored\&.
|
||||
.sp
|
||||
This will normally be /etc/ctdb/events\.d which is part of the ctdb distribution\.
|
||||
This will normally be /etc/ctdb/events\&.d which is part of the ctdb distribution\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i \-\-interactive
|
||||
.RS 4
|
||||
By default ctdbd will detach itself from the shell and run in the background as a daemon\. This option makes ctdbd to start in interactive mode\.
|
||||
By default ctdbd will detach itself from the shell and run in the background as a daemon\&. This option makes ctdbd to start in interactive mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-listen=<address>
|
||||
.RS 4
|
||||
This specifies which ip address ctdb will bind to\. By default ctdbd will bind to the first address it finds in the /etc/ctdb/nodes file and which is also present on the local system in which case you do not need to provide this option\.
|
||||
This specifies which ip address ctdb will bind to\&. By default ctdbd will bind to the first address it finds in the /etc/ctdb/nodes file and which is also present on the local system in which case you do not need to provide this option\&.
|
||||
.sp
|
||||
This option is only required when you want to run multiple ctdbd daemons/nodes on the same physical host in which case there would be multiple entries in /etc/ctdb/nodes what would match a local interface\.
|
||||
This option is only required when you want to run multiple ctdbd daemons/nodes on the same physical host in which case there would be multiple entries in /etc/ctdb/nodes what would match a local interface\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-logfile=<filename>
|
||||
.RS 4
|
||||
This is the file where ctdbd will write its log\. This is usually /var/log/log\.ctdb \.
|
||||
This is the file where ctdbd will write its log\&. This is usually /var/log/log\&.ctdb \&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-lvs
|
||||
.RS 4
|
||||
This option is used to activate the LVS capability on a CTDB node\. Please see the LVS section\.
|
||||
This option is used to activate the LVS capability on a CTDB node\&. Please see the LVS section\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-nlist=<filename>
|
||||
.RS 4
|
||||
This file contains a list of the private ip addresses of every node in the cluster\. There is one line/ip address for each node\. This file must be the same for all nodes in the cluster\.
|
||||
This file contains a list of the private ip addresses of every node in the cluster\&. There is one line/ip address for each node\&. This file must be the same for all nodes in the cluster\&.
|
||||
.sp
|
||||
This file is usually /etc/ctdb/nodes \.
|
||||
This file is usually /etc/ctdb/nodes \&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-no\-lmaster
|
||||
.RS 4
|
||||
This argument specifies that this node can NOT become an lmaster for records in the database\. This means that it will never show up in the vnnmap\. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\.
|
||||
This argument specifies that this node can NOT become an lmaster for records in the database\&. This means that it will never show up in the vnnmap\&. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\&.
|
||||
.sp
|
||||
Please see the "remote cluster nodes" section for more information\.
|
||||
Please see the "remote cluster nodes" section for more information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-no\-recmaster
|
||||
.RS 4
|
||||
This argument specifies that this node can NOT become a recmaster for the database\. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\.
|
||||
This argument specifies that this node can NOT become a recmaster for the database\&. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\&.
|
||||
.sp
|
||||
Please see the "remote cluster nodes" section for more information\.
|
||||
Please see the "remote cluster nodes" section for more information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-nosetsched
|
||||
.RS 4
|
||||
This is a ctdbd debugging option\. this option is only used when debugging ctdbd\.
|
||||
This is a ctdbd debugging option\&. this option is only used when debugging ctdbd\&.
|
||||
.sp
|
||||
Normally ctdb will change its scheduler to run as a real\-time process\. This is the default mode for a normal ctdbd operation to gurarantee that ctdbd always gets the cpu cycles that it needs\.
|
||||
Normally ctdb will change its scheduler to run as a real\-time process\&. This is the default mode for a normal ctdbd operation to gurarantee that ctdbd always gets the cpu cycles that it needs\&.
|
||||
.sp
|
||||
This option is used to tell ctdbd to NOT run as a real\-time process and instead run ctdbd as a normal userspace process\. This is useful for debugging and when you want to run ctdbd under valgrind or gdb\. (You dont want to attach valgrind or gdb to a real\-time process\.)
|
||||
This option is used to tell ctdbd to NOT run as a real\-time process and instead run ctdbd as a normal userspace process\&. This is useful for debugging and when you want to run ctdbd under valgrind or gdb\&. (You don\'t want to attach valgrind or gdb to a real\-time process\&.)
|
||||
.RE
|
||||
.PP
|
||||
\-\-notification\-script=<filename>
|
||||
.RS 4
|
||||
This specifies a script which will be invoked by ctdb when certain state changes occur in ctdbd and when you may want to trigger this to run certain scripts\.
|
||||
This specifies a script which will be invoked by ctdb when certain state changes occur in ctdbd and when you may want to trigger this to run certain scripts\&.
|
||||
.sp
|
||||
This file is usually /etc/ctdb/notify\.sh \.
|
||||
This file is usually /etc/ctdb/notify\&.sh \&.
|
||||
.sp
|
||||
See the NOTIFICATION SCRIPT section below for more information\.
|
||||
See the NOTIFICATION SCRIPT section below for more information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-public_addresses=<filename>
|
||||
.RS 4
|
||||
When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster\. This file contains a list of ip addresses netmasks and interfaces\. When ctdb is operational it will distribute these public ip addresses evenly across the available nodes\.
|
||||
When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster\&. This file contains a list of ip addresses netmasks and interfaces\&. When ctdb is operational it will distribute these public ip addresses evenly across the available nodes\&.
|
||||
.sp
|
||||
This is usually the file /etc/ctdb/public_addresses
|
||||
.RE
|
||||
.PP
|
||||
\-\-public\-interface=<interface>
|
||||
.RS 4
|
||||
This option tells ctdb which interface to attach public\-addresses to and also where to attach the single\-public\-ip when used\.
|
||||
This option tells ctdb which interface to attach public\-addresses to and also where to attach the single\-public\-ip when used\&.
|
||||
.sp
|
||||
This is only required when using public ip addresses and only when you dont specify the interface explicitly in /etc/ctdb/public_addresses or when you are using \-\-single\-public\-ip\.
|
||||
This is only required when using public ip addresses and only when you don\'t specify the interface explicitly in /etc/ctdb/public_addresses or when you are using \-\-single\-public\-ip\&.
|
||||
.sp
|
||||
If you omit this argument when using public addresses or single public ip, ctdb will not be able to send out Gratious ARPs correctly or be able to kill tcp connections correctly which will lead to application failures\.
|
||||
If you omit this argument when using public addresses or single public ip, ctdb will not be able to send out Gratious ARPs correctly or be able to kill tcp connections correctly which will lead to application failures\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-reclock=<filename>
|
||||
.RS 4
|
||||
This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to prevent split brains from occuring\. This file must be stored on shared storage\.
|
||||
This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to prevent split brains from occuring\&. This file must be stored on shared storage\&.
|
||||
.sp
|
||||
It is possible to run CTDB without a reclock file, but then there will be no protection against split brain if the network becomes partitioned\. Using CTDB without a reclock file is strongly discouraged\.
|
||||
It is possible to run CTDB without a reclock file, but then there will be no protection against split brain if the network becomes partitioned\&. Using CTDB without a reclock file is strongly discouraged\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-socket=<filename>
|
||||
.RS 4
|
||||
This specifies the name of the domain socket that ctdbd will create\. This socket is used for local clients to attach to and communicate with the ctdbd daemon\.
|
||||
This specifies the name of the domain socket that ctdbd will create\&. This socket is used for local clients to attach to and communicate with the ctdbd daemon\&.
|
||||
.sp
|
||||
The default is /tmp/ctdb\.socket \. You only need to use this option if you plan to run multiple ctdbd daemons on the same physical host\.
|
||||
The default is /tmp/ctdb\&.socket \&. You only need to use this option if you plan to run multiple ctdbd daemons on the same physical host\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-start\-as\-disabled
|
||||
.RS 4
|
||||
This makes the ctdb daemon to be DISABLED when it starts up\.
|
||||
This makes the ctdb daemon to be DISABLED when it starts up\&.
|
||||
.sp
|
||||
As it is DISABLED it will not get any of the public ip addresses allocated to it, and thus this allow you to start ctdb on a node without causing any ip address to failover from other nodes onto the new node\.
|
||||
As it is DISABLED it will not get any of the public ip addresses allocated to it, and thus this allow you to start ctdb on a node without causing any ip address to failover from other nodes onto the new node\&.
|
||||
.sp
|
||||
When used, the administrator must keep track of when nodes start and manually enable them again using the "ctdb enable" command, or else the node will not host any services\.
|
||||
When used, the administrator must keep track of when nodes start and manually enable them again using the "ctdb enable" command, or else the node will not host any services\&.
|
||||
.sp
|
||||
A node that is DISABLED will not host any services and will not be reachable/used by any clients\.
|
||||
A node that is DISABLED will not host any services and will not be reachable/used by any clients\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-start\-as\-stopped
|
||||
.RS 4
|
||||
This makes the ctdb daemon to be STOPPED when it starts up\.
|
||||
This makes the ctdb daemon to be STOPPED when it starts up\&.
|
||||
.sp
|
||||
A node that is STOPPED does not host any public addresses\. It is not part of the VNNMAP so it does act as an LMASTER\. It also has all databases locked in recovery mode until restarted\.
|
||||
A node that is STOPPED does not host any public addresses\&. It is not part of the VNNMAP so it does act as an LMASTER\&. It also has all databases locked in recovery mode until restarted\&.
|
||||
.sp
|
||||
To restart and activate a STOPPED node, the command "ctdb continue" is used\.
|
||||
To restart and activate a STOPPED node, the command "ctdb continue" is used\&.
|
||||
.sp
|
||||
A node that is STOPPED will not host any services and will not be reachable/used by any clients\.
|
||||
A node that is STOPPED will not host any services and will not be reachable/used by any clients\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-syslog
|
||||
.RS 4
|
||||
Send all log messages to syslog instead of to the ctdb logfile\.
|
||||
Send all log messages to syslog instead of to the ctdb logfile\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-log\-ringbuf\-size=<num\-entries>
|
||||
.RS 4
|
||||
In addition to the normal loggign to a log file, CTDBD also keeps a in\-memory ringbuffer containing the most recent log entries for all log levels (except DEBUG)\.
|
||||
In addition to the normal loggign to a log file, CTDBD also keeps a in\-memory ringbuffer containing the most recent log entries for all log levels (except DEBUG)\&.
|
||||
.sp
|
||||
This is useful since it allows for keeping continous logs to a file at a reasonable non\-verbose level, but shortly after an incident has occured, a much more detailed log can be pulled from memory\. This can allow you to avoid having to reproduce an issue due to the on\-disk logs being of insufficient detail\.
|
||||
This is useful since it allows for keeping continous logs to a file at a reasonable non\-verbose level, but shortly after an incident has occured, a much more detailed log can be pulled from memory\&. This can allow you to avoid having to reproduce an issue due to the on\-disk logs being of insufficient detail\&.
|
||||
.sp
|
||||
This in\-memory ringbuffer contains a fixed number of the most recent entries\. This is settable at startup either through the \-\-log\-ringbuf\-size argument, or preferably by using CTDB_LOG_RINGBUF_SIZE in the sysconfig file\.
|
||||
This in\-memory ringbuffer contains a fixed number of the most recent entries\&. This is settable at startup either through the \-\-log\-ringbuf\-size argument, or preferably by using CTDB_LOG_RINGBUF_SIZE in the sysconfig file\&.
|
||||
.sp
|
||||
Use the "ctdb getlog" command to access this log\.
|
||||
Use the "ctdb getlog" command to access this log\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-torture
|
||||
.RS 4
|
||||
This option is only used for development and testing of ctdbd\. It adds artificial errors and failures to the common codepaths in ctdbd to verify that ctdbd can recover correctly for failures\.
|
||||
This option is only used for development and testing of ctdbd\&. It adds artificial errors and failures to the common codepaths in ctdbd to verify that ctdbd can recover correctly for failures\&.
|
||||
.sp
|
||||
You do NOT want to use this option unless you are developing and testing new functionality in ctdbd\.
|
||||
You do NOT want to use this option unless you are developing and testing new functionality in ctdbd\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-transport=<STRING>
|
||||
.RS 4
|
||||
This option specifies which transport to use for ctdbd internode communications\. The default is "tcp"\.
|
||||
This option specifies which transport to use for ctdbd internode communications\&. The default is "tcp"\&.
|
||||
.sp
|
||||
Currently only "tcp" is supported but "infiniband" might be implemented in the future\.
|
||||
Currently only "tcp" is supported but "infiniband" might be implemented in the future\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-usage
|
||||
.RS 4
|
||||
Print useage information to the screen\.
|
||||
Print useage information to the screen\&.
|
||||
.RE
|
||||
.SH "PRIVATE VS PUBLIC ADDRESSES"
|
||||
.PP
|
||||
When used for ip takeover in a HA environment, each node in a ctdb cluster has multiple ip addresses assigned to it\. One private and one or more public\.
|
||||
When used for ip takeover in a HA environment, each node in a ctdb cluster has multiple ip addresses assigned to it\&. One private and one or more public\&.
|
||||
.SS "Private address"
|
||||
.PP
|
||||
This is the physical ip address of the node which is configured in linux and attached to a physical interface\. This address uniquely identifies a physical node in the cluster and is the ip addresses that ctdbd will use to communicate with the ctdbd daemons on the other nodes in the cluster\.
|
||||
This is the physical ip address of the node which is configured in linux and attached to a physical interface\&. This address uniquely identifies a physical node in the cluster and is the ip addresses that ctdbd will use to communicate with the ctdbd daemons on the other nodes in the cluster\&.
|
||||
.PP
|
||||
The private addresses are configured in /etc/ctdb/nodes (unless the \-\-nlist option is used) and contain one line for each node in the cluster\. Each line contains the private ip address for one node in the cluster\. This file must be the same on all nodes in the cluster\.
|
||||
The private addresses are configured in /etc/ctdb/nodes (unless the \-\-nlist option is used) and contain one line for each node in the cluster\&. Each line contains the private ip address for one node in the cluster\&. This file must be the same on all nodes in the cluster\&.
|
||||
.PP
|
||||
Since the private addresses are only available to the network when the corresponding node is up and running you should not use these addresses for clients to connect to services provided by the cluster\. Instead client applications should only attach to the public addresses since these are guaranteed to always be available\.
|
||||
Since the private addresses are only available to the network when the corresponding node is up and running you should not use these addresses for clients to connect to services provided by the cluster\&. Instead client applications should only attach to the public addresses since these are guaranteed to always be available\&.
|
||||
.PP
|
||||
When using ip takeover, it is strongly recommended that the private addresses are configured on a private network physically separated from the rest of the network and that this private network is dedicated to CTDB traffic\.
|
||||
When using ip takeover, it is strongly recommended that the private addresses are configured on a private network physically separated from the rest of the network and that this private network is dedicated to CTDB traffic\&.
|
||||
|
||||
Example /etc/ctdb/nodes for a four node cluster:
|
||||
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
10\.1\.1\.1
|
||||
10\.1\.1\.2
|
||||
10\.1\.1\.3
|
||||
10\.1\.1\.4
|
||||
10\&.1\&.1\&.1
|
||||
10\&.1\&.1\&.2
|
||||
10\&.1\&.1\&.3
|
||||
10\&.1\&.1\&.4
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SS "Public address"
|
||||
.PP
|
||||
A public address on the other hand is not attached to an interface\. This address is managed by ctdbd itself and is attached/detached to a physical node at runtime\.
|
||||
A public address on the other hand is not attached to an interface\&. This address is managed by ctdbd itself and is attached/detached to a physical node at runtime\&.
|
||||
.PP
|
||||
The ctdb cluster will assign/reassign these public addresses across the available healthy nodes in the cluster\. When one node fails, its public address will be migrated to and taken over by a different node in the cluster to ensure that all public addresses are always available to clients as long as there are still nodes available capable of hosting this address\.
|
||||
The ctdb cluster will assign/reassign these public addresses across the available healthy nodes in the cluster\&. When one node fails, its public address will be migrated to and taken over by a different node in the cluster to ensure that all public addresses are always available to clients as long as there are still nodes available capable of hosting this address\&.
|
||||
.PP
|
||||
These addresses are not physically attached to a specific node\. The \'ctdb ip\' command can be used to view the current assignment of public addresses and which physical node is currently serving it\.
|
||||
These addresses are not physically attached to a specific node\&. The \'ctdb ip\' command can be used to view the current assignment of public addresses and which physical node is currently serving it\&.
|
||||
.PP
|
||||
On each node this file contains a list of the public addresses that this node is capable of hosting\. The list also contain the netmask and the interface where this address should be attached for the case where you may want to serve data out through multiple different interfaces\.
|
||||
On each node this file contains a list of the public addresses that this node is capable of hosting\&. The list also contain the netmask and the interface where this address should be attached for the case where you may want to serve data out through multiple different interfaces\&.
|
||||
|
||||
Example /etc/ctdb/public_addresses for a node that can host 4 public addresses:
|
||||
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
11\.1\.1\.1/24 eth0
|
||||
11\.1\.1\.2/24 eth0
|
||||
11\.1\.2\.1/24 eth1
|
||||
11\.1\.2\.2/24 eth1
|
||||
11\&.1\&.1\&.1/24 eth0
|
||||
11\&.1\&.1\&.2/24 eth0
|
||||
11\&.1\&.2\&.1/24 eth1
|
||||
11\&.1\&.2\&.2/24 eth1
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
In most cases this file would be the same on all nodes in a cluster but there are exceptions when one may want to use different files on different nodes\.
|
||||
In most cases this file would be the same on all nodes in a cluster but there are exceptions when one may want to use different files on different nodes\&.
|
||||
|
||||
Example: 4 nodes partitioned into two subgroups :
|
||||
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
Node 0:/etc/ctdb/public_addresses
|
||||
10\.1\.1\.1/24 eth0
|
||||
10\.1\.1\.2/24 eth0
|
||||
10\&.1\&.1\&.1/24 eth0
|
||||
10\&.1\&.1\&.2/24 eth0
|
||||
|
||||
Node 1:/etc/ctdb/public_addresses
|
||||
10\.1\.1\.1/24 eth0
|
||||
10\.1\.1\.2/24 eth0
|
||||
10\&.1\&.1\&.1/24 eth0
|
||||
10\&.1\&.1\&.2/24 eth0
|
||||
|
||||
Node 2:/etc/ctdb/public_addresses
|
||||
10\.2\.1\.1/24 eth0
|
||||
10\.2\.1\.2/24 eth0
|
||||
10\&.2\&.1\&.1/24 eth0
|
||||
10\&.2\&.1\&.2/24 eth0
|
||||
|
||||
Node 3:/etc/ctdb/public_addresses
|
||||
10\.2\.1\.1/24 eth0
|
||||
10\.2\.1\.2/24 eth0
|
||||
10\&.2\&.1\&.1/24 eth0
|
||||
10\&.2\&.1\&.2/24 eth0
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
In this example nodes 0 and 1 host two public addresses on the 10\.1\.1\.x network while nodes 2 and 3 host two public addresses for the 10\.2\.1\.x network\.
|
||||
In this example nodes 0 and 1 host two public addresses on the 10\&.1\&.1\&.x network while nodes 2 and 3 host two public addresses for the 10\&.2\&.1\&.x network\&.
|
||||
.PP
|
||||
Ip address 10\.1\.1\.1 can be hosted by either of nodes 0 or 1 and will be available to clients as long as at least one of these two nodes are available\. If both nodes 0 and node 1 become unavailable 10\.1\.1\.1 also becomes unavailable\. 10\.1\.1\.1 can not be failed over to node 2 or node 3 since these nodes do not have this ip address listed in their public addresses file\.
|
||||
Ip address 10\&.1\&.1\&.1 can be hosted by either of nodes 0 or 1 and will be available to clients as long as at least one of these two nodes are available\&. If both nodes 0 and node 1 become unavailable 10\&.1\&.1\&.1 also becomes unavailable\&. 10\&.1\&.1\&.1 can not be failed over to node 2 or node 3 since these nodes do not have this ip address listed in their public addresses file\&.
|
||||
.SH "NODE STATUS"
|
||||
.PP
|
||||
The current status of each node in the cluster can be viewed by the \'ctdb status\' command\.
|
||||
The current status of each node in the cluster can be viewed by the \'ctdb status\' command\&.
|
||||
.PP
|
||||
There are five possible states for a node\.
|
||||
There are five possible states for a node\&.
|
||||
.PP
|
||||
OK \- This node is fully functional\.
|
||||
OK \- This node is fully functional\&.
|
||||
.PP
|
||||
DISCONNECTED \- This node could not be connected through the network and is currently not particpating in the cluster\. If there is a public IP address associated with this node it should have been taken over by a different node\. No services are running on this node\.
|
||||
DISCONNECTED \- This node could not be connected through the network and is currently not particpating in the cluster\&. If there is a public IP address associated with this node it should have been taken over by a different node\&. No services are running on this node\&.
|
||||
.PP
|
||||
DISABLED \- This node has been administratively disabled\. This node is still functional and participates in the CTDB cluster but its IP addresses have been taken over by a different node and no services are currently being hosted\.
|
||||
DISABLED \- This node has been administratively disabled\&. This node is still functional and participates in the CTDB cluster but its IP addresses have been taken over by a different node and no services are currently being hosted\&.
|
||||
.PP
|
||||
UNHEALTHY \- A service provided by this node is malfunctioning and should be investigated\. The CTDB daemon itself is operational and participates in the cluster\. Its public IP address has been taken over by a different node and no services are currently being hosted\. All unhealthy nodes should be investigated and require an administrative action to rectify\.
|
||||
UNHEALTHY \- A service provided by this node is malfunctioning and should be investigated\&. The CTDB daemon itself is operational and participates in the cluster\&. Its public IP address has been taken over by a different node and no services are currently being hosted\&. All unhealthy nodes should be investigated and require an administrative action to rectify\&.
|
||||
.PP
|
||||
BANNED \- This node failed too many recovery attempts and has been banned from participating in the cluster for a period of RecoveryBanPeriod seconds\. Any public IP address has been taken over by other nodes\. This node does not provide any services\. All banned nodes should be investigated and require an administrative action to rectify\. This node does not perticipate in the CTDB cluster but can still be communicated with\. I\.e\. ctdb commands can be sent to it\.
|
||||
BANNED \- This node failed too many recovery attempts and has been banned from participating in the cluster for a period of RecoveryBanPeriod seconds\&. Any public IP address has been taken over by other nodes\&. This node does not provide any services\&. All banned nodes should be investigated and require an administrative action to rectify\&. This node does not perticipate in the CTDB cluster but can still be communicated with\&. I\&.e\&. ctdb commands can be sent to it\&.
|
||||
.PP
|
||||
STOPPED \- A node that is stopped does not host any public ip addresses, nor is it part of the VNNMAP\. A stopped node can not become LVSMASTER, RECMASTER or NATGW\. This node does not perticipate in the CTDB cluster but can still be communicated with\. I\.e\. ctdb commands can be sent to it\.
|
||||
STOPPED \- A node that is stopped does not host any public ip addresses, nor is it part of the VNNMAP\&. A stopped node can not become LVSMASTER, RECMASTER or NATGW\&. This node does not perticipate in the CTDB cluster but can still be communicated with\&. I\&.e\&. ctdb commands can be sent to it\&.
|
||||
.SH "PUBLIC TUNABLES"
|
||||
.PP
|
||||
These are the public tuneables that can be used to control how ctdb behaves\.
|
||||
These are the public tuneables that can be used to control how ctdb behaves\&.
|
||||
.SS "KeepaliveInterval"
|
||||
.PP
|
||||
Default: 1
|
||||
.PP
|
||||
How often should the nodes send keepalives to eachother\.
|
||||
How often should the nodes send keepalives to eachother\&.
|
||||
.SS "KeepaliveLimit"
|
||||
.PP
|
||||
Default: 5
|
||||
.PP
|
||||
After how many keepalive intervals without any traffic should a node wait until marking the peer as DISCONNECTED\.
|
||||
After how many keepalive intervals without any traffic should a node wait until marking the peer as DISCONNECTED\&.
|
||||
.SS "MonitorInterval"
|
||||
.PP
|
||||
Default: 15
|
||||
.PP
|
||||
How often should ctdb run the event scripts to check for a nodes health\.
|
||||
How often should ctdb run the event scripts to check for a nodes health\&.
|
||||
.SS "TickleUpdateInterval"
|
||||
.PP
|
||||
Default: 20
|
||||
.PP
|
||||
How often will ctdb record and store the "tickle" information used to kickstart stalled tcp connections after a recovery\.
|
||||
How often will ctdb record and store the "tickle" information used to kickstart stalled tcp connections after a recovery\&.
|
||||
.SS "EventScriptTimeout"
|
||||
.PP
|
||||
Default: 20
|
||||
.PP
|
||||
How long should ctdb let an event script run before aborting it and marking the node unhealthy\.
|
||||
How long should ctdb let an event script run before aborting it and marking the node unhealthy\&.
|
||||
.SS "RecoveryBanPeriod"
|
||||
.PP
|
||||
Default: 300
|
||||
.PP
|
||||
If a node becomes banned causing repetitive recovery failures\. The node will eventually become banned from the cluster\. This controls how long the culprit node will be banned from the cluster before it is allowed to try to join the cluster again\. Dont set to small\. A node gets banned for a reason and it is usually due to real problems with the node\.
|
||||
If a node becomes banned causing repetitive recovery failures\&. The node will eventually become banned from the cluster\&. This controls how long the culprit node will be banned from the cluster before it is allowed to try to join the cluster again\&. Don\'t set to small\&. A node gets banned for a reason and it is usually due to real problems with the node\&.
|
||||
.SS "DatabaseHashSize"
|
||||
.PP
|
||||
Default: 100000
|
||||
.PP
|
||||
Size of the hash chains for the local store of the tdbs that ctdb manages\.
|
||||
Size of the hash chains for the local store of the tdbs that ctdb manages\&.
|
||||
.SS "RerecoveryTimeout"
|
||||
.PP
|
||||
Default: 10
|
||||
.PP
|
||||
Once a recovery has completed, no additional recoveries are permitted until this timeout has expired\.
|
||||
Once a recovery has completed, no additional recoveries are permitted until this timeout has expired\&.
|
||||
.SS "EnableBans"
|
||||
.PP
|
||||
Default: 1
|
||||
.PP
|
||||
When set to 0, this disables BANNING completely in the cluster and thus nodes can not get banned, even it they break\. Dont set to 0\.
|
||||
When set to 0, this disables BANNING completely in the cluster and thus nodes can not get banned, even it they break\&. Don\'t set to 0\&.
|
||||
.SS "DeterministicIPs"
|
||||
.PP
|
||||
Default: 1
|
||||
.PP
|
||||
When enabled, this tunable makes ctdb try to keep public IP addresses locked to specific nodes as far as possible\. This makes it easier for debugging since you can know that as long as all nodes are healthy public IP X will always be hosted by node Y\.
|
||||
When enabled, this tunable makes ctdb try to keep public IP addresses locked to specific nodes as far as possible\&. This makes it easier for debugging since you can know that as long as all nodes are healthy public IP X will always be hosted by node Y\&.
|
||||
.PP
|
||||
The cost of using deterministic IP address assignment is that it disables part of the logic where ctdb tries to reduce the number of public IP assignment changes in the cluster\. This tunable may increase the number of IP failover/failbacks that are performed on the cluster by a small margin\.
|
||||
The cost of using deterministic IP address assignment is that it disables part of the logic where ctdb tries to reduce the number of public IP assignment changes in the cluster\&. This tunable may increase the number of IP failover/failbacks that are performed on the cluster by a small margin\&.
|
||||
.SS "DisableWhenUnhealthy"
|
||||
.PP
|
||||
Default: 0
|
||||
.PP
|
||||
When set, As soon as a node becomes unhealthy, that node will also automatically become permanently DISABLED\. Once a node is DISABLED, the only way to make it participate in the cluster again and host services is by manually enabling the node again using \'ctdb enable\'\.
|
||||
When set, As soon as a node becomes unhealthy, that node will also automatically become permanently DISABLED\&. Once a node is DISABLED, the only way to make it participate in the cluster again and host services is by manually enabling the node again using \'ctdb enable\'\&.
|
||||
.PP
|
||||
This disables parts of the resilience and robustness of the cluster and should ONLY be used when the system administrator is actively monitoring the cluster, so that nodes can be enabled again\.
|
||||
This disables parts of the resilience and robustness of the cluster and should ONLY be used when the system administrator is actively monitoring the cluster, so that nodes can be enabled again\&.
|
||||
.SS "NoIPFailback"
|
||||
.PP
|
||||
Default: 0
|
||||
.PP
|
||||
When set to 1, ctdb will not perform failback of IP addresses when a node becomes healthy\. Ctdb WILL perform failover of public IP addresses when a node becomes UNHEALTHY, but when the node becomes HEALTHY again, ctdb will not fail the addresses back\.
|
||||
When set to 1, ctdb will not perform failback of IP addresses when a node becomes healthy\&. Ctdb WILL perform failover of public IP addresses when a node becomes UNHEALTHY, but when the node becomes HEALTHY again, ctdb will not fail the addresses back\&.
|
||||
.PP
|
||||
Use with caution! Normally when a node becomes available to the cluster ctdb will try to reassign public IP addresses onto the new node as a way to distribute the workload evenly across the clusternode\. Ctdb tries to make sure that all running nodes have approximately the same number of public addresses it hosts\.
|
||||
Use with caution! Normally when a node becomes available to the cluster ctdb will try to reassign public IP addresses onto the new node as a way to distribute the workload evenly across the clusternode\&. Ctdb tries to make sure that all running nodes have approximately the same number of public addresses it hosts\&.
|
||||
.PP
|
||||
When you enable this tunable, CTDB will no longer attempt to rebalance the cluster by failing IP addresses back to the new nodes\. An unbalanced cluster will therefore remain unbalanced until there is manual intervention from the administrator\. When this parameter is set, you can manually fail public IP addresses over to the new node(s) using the \'ctdb moveip\' command\.
|
||||
When you enable this tunable, CTDB will no longer attempt to rebalance the cluster by failing IP addresses back to the new nodes\&. An unbalanced cluster will therefore remain unbalanced until there is manual intervention from the administrator\&. When this parameter is set, you can manually fail public IP addresses over to the new node(s) using the \'ctdb moveip\' command\&.
|
||||
.SH "LVS"
|
||||
.PP
|
||||
LVS is a mode where CTDB presents one single IP address for the entire cluster\. This is an alternative to using public IP addresses and round\-robin DNS to loadbalance clients across the cluster\.
|
||||
LVS is a mode where CTDB presents one single IP address for the entire cluster\&. This is an alternative to using public IP addresses and round\-robin DNS to loadbalance clients across the cluster\&.
|
||||
.PP
|
||||
This is similar to using a layer\-4 loadbalancing switch but with some restrictions\.
|
||||
This is similar to using a layer\-4 loadbalancing switch but with some restrictions\&.
|
||||
.PP
|
||||
In this mode the cluster select a set of nodes in the cluster and loadbalance all client access to the LVS address across this set of nodes\. This set of nodes are all LVS capable nodes that are HEALTHY, or if no HEALTHY nodes exists all LVS capable nodes regardless of health status\. LVS will however never loadbalance traffic to nodes that are BANNED, STOPPED, DISABLED or DISCONNECTED\. The "ctdb lvs" command is used to show which nodes are currently load\-balanced across\.
|
||||
In this mode the cluster select a set of nodes in the cluster and loadbalance all client access to the LVS address across this set of nodes\&. This set of nodes are all LVS capable nodes that are HEALTHY, or if no HEALTHY nodes exists all LVS capable nodes regardless of health status\&. LVS will however never loadbalance traffic to nodes that are BANNED, STOPPED, DISABLED or DISCONNECTED\&. The "ctdb lvs" command is used to show which nodes are currently load\-balanced across\&.
|
||||
.PP
|
||||
One of the these nodes are elected as the LVSMASTER\. This node receives all traffic from clients coming in to the LVS address and multiplexes it across the internal network to one of the nodes that LVS is using\. When responding to the client, that node will send the data back directly to the client, bypassing the LVSMASTER node\. The command "ctdb lvsmaster" will show which node is the current LVSMASTER\.
|
||||
One of the these nodes are elected as the LVSMASTER\&. This node receives all traffic from clients coming in to the LVS address and multiplexes it across the internal network to one of the nodes that LVS is using\&. When responding to the client, that node will send the data back directly to the client, bypassing the LVSMASTER node\&. The command "ctdb lvsmaster" will show which node is the current LVSMASTER\&.
|
||||
.PP
|
||||
The path used for a client i/o is thus :
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
(1) Client sends request packet to LVSMASTER
|
||||
(2) LVSMASTER passes the request on to one node across the internal network\.
|
||||
(3) Selected node processes the request\.
|
||||
(4) Node responds back to client\.
|
||||
(2) LVSMASTER passes the request on to one node across the internal network\&.
|
||||
(3) Selected node processes the request\&.
|
||||
(4) Node responds back to client\&.
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
This means that all incoming traffic to the cluster will pass through one physical node, which limits scalability\. You can send more data to the LVS address that one physical node can multiplex\. This means that you should not use LVS if your I/O pattern is write\-intensive since you will be limited in the available network bandwidth that node can handle\. LVS does work wery well for read\-intensive workloads where only smallish READ requests are going through the LVSMASTER bottleneck and the majority of the traffic volume (the data in the read replies) goes straight from the processing node back to the clients\. For read\-intensive i/o patterns you can acheive very high throughput rates in this mode\.
|
||||
This means that all incoming traffic to the cluster will pass through one physical node, which limits scalability\&. You can send more data to the LVS address that one physical node can multiplex\&. This means that you should not use LVS if your I/O pattern is write\-intensive since you will be limited in the available network bandwidth that node can handle\&. LVS does work wery well for read\-intensive workloads where only smallish READ requests are going through the LVSMASTER bottleneck and the majority of the traffic volume (the data in the read replies) goes straight from the processing node back to the clients\&. For read\-intensive i/o patterns you can acheive very high throughput rates in this mode\&.
|
||||
.PP
|
||||
Note: you can use LVS and public addresses at the same time\.
|
||||
Note: you can use LVS and public addresses at the same time\&.
|
||||
.SS "Configuration"
|
||||
.PP
|
||||
To activate LVS on a CTDB node you must specify CTDB_PUBLIC_INTERFACE and CTDB_LVS_PUBLIC_ADDRESS in /etc/sysconfig/ctdb\.
|
||||
To activate LVS on a CTDB node you must specify CTDB_PUBLIC_INTERFACE and CTDB_LVS_PUBLIC_ADDRESS in /etc/sysconfig/ctdb\&.
|
||||
.PP
|
||||
You must also specify the "\-\-lvs" command line argument to ctdbd to activete LVS as a capability of the node\. This should be done automatically for you by the /etc/init\.d/ctdb script\.
|
||||
You must also specify the "\-\-lvs" command line argument to ctdbd to activete LVS as a capability of the node\&. This should be done automatically for you by the /etc/init\&.d/ctdb script\&.
|
||||
.PP
|
||||
Example:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
CTDB_PUBLIC_INTERFACE=eth0
|
||||
CTDB_LVS_PUBLIC_IP=10\.0\.0\.237
|
||||
CTDB_LVS_PUBLIC_IP=10\&.0\&.0\&.237
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
If you use LVS, you must still have a real/permanent address configured for the public interface on each node\. This address must be routable and the cluster nodes must be configured so that all traffic back to client hosts are routed through this interface\. This is also required in order to allow samba/winbind on the node to talk to the domain controller\. (we can not use the lvs IP address to initiate outgoing traffic)
|
||||
If you use LVS, you must still have a real/permanent address configured for the public interface on each node\&. This address must be routable and the cluster nodes must be configured so that all traffic back to client hosts are routed through this interface\&. This is also required in order to allow samba/winbind on the node to talk to the domain controller\&. (we can not use the lvs IP address to initiate outgoing traffic)
|
||||
.PP
|
||||
I\.e\. make sure that you can "ping" both the domain controller and also all of the clients from the node BEFORE you enable LVS\. Also make sure that when you ping these hosts that the traffic is routed out through the eth0 interface\.
|
||||
I\&.e\&. make sure that you can "ping" both the domain controller and also all of the clients from the node BEFORE you enable LVS\&. Also make sure that when you ping these hosts that the traffic is routed out through the eth0 interface\&.
|
||||
.SH "REMOTE CLUSTER NODES"
|
||||
.PP
|
||||
It is possible to have a CTDB cluster that spans across a WAN link\. For example where you have a CTDB cluster in your datacentre but you also want to have one additional CTDB node located at a remote branch site\. This is similar to how a WAN accelerator works but with the difference that while a WAN\-accelerator often acts as a Proxy or a MitM, in the ctdb remote cluster node configuration the Samba instance at the remote site IS the genuine server, not a proxy and not a MitM, and thus provides 100% correct CIFS semantics to clients\.
|
||||
It is possible to have a CTDB cluster that spans across a WAN link\&. For example where you have a CTDB cluster in your datacentre but you also want to have one additional CTDB node located at a remote branch site\&. This is similar to how a WAN accelerator works but with the difference that while a WAN\-accelerator often acts as a Proxy or a MitM, in the ctdb remote cluster node configuration the Samba instance at the remote site IS the genuine server, not a proxy and not a MitM, and thus provides 100% correct CIFS semantics to clients\&.
|
||||
.PP
|
||||
See the cluster as one single multihomed samba server where one of the NICs (the remote node) is very far away\.
|
||||
See the cluster as one single multihomed samba server where one of the NICs (the remote node) is very far away\&.
|
||||
.PP
|
||||
NOTE: This does require that the cluster filesystem you use can cope with WAN\-link latencies\. Not all cluster filesystems can handle WAN\-link latencies! Whether this will provide very good WAN\-accelerator performance or it will perform very poorly depends entirely on how optimized your cluster filesystem is in handling high latency for data and metadata operations\.
|
||||
NOTE: This does require that the cluster filesystem you use can cope with WAN\-link latencies\&. Not all cluster filesystems can handle WAN\-link latencies! Whether this will provide very good WAN\-accelerator performance or it will perform very poorly depends entirely on how optimized your cluster filesystem is in handling high latency for data and metadata operations\&.
|
||||
.PP
|
||||
To activate a node as being a remote cluster node you need to set the following two parameters in /etc/sysconfig/ctdb for the remote node:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
CTDB_CAPABILITY_LMASTER=no
|
||||
CTDB_CAPABILITY_RECMASTER=no
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
Verify with the command "ctdb getcapabilities" that that node no longer has the recmaster or the lmaster capabilities\.
|
||||
Verify with the command "ctdb getcapabilities" that that node no longer has the recmaster or the lmaster capabilities\&.
|
||||
.SH "NAT-GW"
|
||||
.PP
|
||||
Sometimes it is desireable to run services on the CTDB node which will need to originate outgoing traffic to external servers\. This might be contacting NIS servers, LDAP servers etc\. etc\.
|
||||
Sometimes it is desireable to run services on the CTDB node which will need to originate outgoing traffic to external servers\&. This might be contacting NIS servers, LDAP servers etc\&. etc\&.
|
||||
.PP
|
||||
This can sometimes be problematic since there are situations when a node does not have any public ip addresses assigned\. This could be due to the nobe just being started up and no addresses have been assigned yet or it could be that the node is UNHEALTHY in which case all public addresses have been migrated off\.
|
||||
This can sometimes be problematic since there are situations when a node does not have any public ip addresses assigned\&. This could be due to the nobe just being started up and no addresses have been assigned yet or it could be that the node is UNHEALTHY in which case all public addresses have been migrated off\&.
|
||||
.PP
|
||||
If then the service status of CTDB depends on such services being able to always being able to originate traffic to external resources this becomes extra troublesome\. The node might be UNHEALTHY because the service can not be reached, and the service can not be reached because the node is UNHEALTHY\.
|
||||
If then the service status of CTDB depends on such services being able to always being able to originate traffic to external resources this becomes extra troublesome\&. The node might be UNHEALTHY because the service can not be reached, and the service can not be reached because the node is UNHEALTHY\&.
|
||||
.PP
|
||||
There are two ways to solve this problem\. The first is by assigning a static ip address for one public interface on every node which will allow every node to be able to route traffic to the public network even if there are no public addresses assigned to the node\. This is the simplest way but it uses up a lot of ip addresses since you have to assign both static and also public addresses to each node\.
|
||||
There are two ways to solve this problem\&. The first is by assigning a static ip address for one public interface on every node which will allow every node to be able to route traffic to the public network even if there are no public addresses assigned to the node\&. This is the simplest way but it uses up a lot of ip addresses since you have to assign both static and also public addresses to each node\&.
|
||||
.SS "NAT\-GW"
|
||||
.PP
|
||||
A second way is to use the built in NAT\-GW feature in CTDB\. With NAT\-GW you assign one public NATGW address for each natgw group\. Each NATGW group is a set of nodes in the cluster that shares the same NATGW address to talk to the outside world\. Normally there would only be one NATGW group spanning the entire cluster, but in situations where one ctdb cluster spans multiple physical sites it is useful to have one NATGW group for each of the two sites\.
|
||||
A second way is to use the built in NAT\-GW feature in CTDB\&. With NAT\-GW you assign one public NATGW address for each natgw group\&. Each NATGW group is a set of nodes in the cluster that shares the same NATGW address to talk to the outside world\&. Normally there would only be one NATGW group spanning the entire cluster, but in situations where one ctdb cluster spans multiple physical sites it is useful to have one NATGW group for each of the two sites\&.
|
||||
.PP
|
||||
There can be multiple NATGW groups in one cluster but each node can only be member of one NATGW group\.
|
||||
There can be multiple NATGW groups in one cluster but each node can only be member of one NATGW group\&.
|
||||
.PP
|
||||
In each NATGW group, one of the nodes is designated the NAT Gateway through which all traffic that is originated by nodes in this group will be routed through if a public addresses are not available\.
|
||||
In each NATGW group, one of the nodes is designated the NAT Gateway through which all traffic that is originated by nodes in this group will be routed through if a public addresses are not available\&.
|
||||
.SS "Configuration"
|
||||
.PP
|
||||
NAT\-GW is configured in /etc/sysconfigctdb by setting the following variables:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
# NAT\-GW configuration
|
||||
# Some services running on nthe CTDB node may need to originate traffic to
|
||||
# remote servers before the node is assigned any IP addresses,
|
||||
# This is problematic since before the node has public addresses the node might
|
||||
# not be able to route traffic to the public networks\.
|
||||
# not be able to route traffic to the public networks\&.
|
||||
# One solution is to have static public addresses assigned with routing
|
||||
# in addition to the public address interfaces, thus guaranteeing that
|
||||
# a node always can route traffic to the external network\.
|
||||
# a node always can route traffic to the external network\&.
|
||||
# This is the most simple solution but it uses up a large number of
|
||||
# additional ip addresses\.
|
||||
# additional ip addresses\&.
|
||||
#
|
||||
# A more complex solution is NAT\-GW\.
|
||||
# A more complex solution is NAT\-GW\&.
|
||||
# In this mode we only need one additional ip address for the cluster from
|
||||
# the exsternal public network\.
|
||||
# the exsternal public network\&.
|
||||
# One of the nodes in the cluster is elected to be hosting this ip address
|
||||
# so it can reach the external services\. This node is also configured
|
||||
# so it can reach the external services\&. This node is also configured
|
||||
# to use NAT MASQUERADING for all traffic from the internal private network
|
||||
# to the external network\. This node is the NAT\-GW node\.
|
||||
# to the external network\&. This node is the NAT\-GW node\&.
|
||||
#
|
||||
# All other nodes are set up with a default rote with a metric of 10 to point
|
||||
# to the nat\-gw node\.
|
||||
# to the nat\-gw node\&.
|
||||
#
|
||||
# The effect of this is that only when a node does not have a public address
|
||||
# and thus no proper routes to the external world it will instead
|
||||
# route all packets through the nat\-gw node\.
|
||||
# route all packets through the nat\-gw node\&.
|
||||
#
|
||||
# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group\.
|
||||
# CTDB_NATGW_NODES is the list of nodes that belong to this natgw group\&.
|
||||
# You can have multiple natgw groups in one cluster but each node
|
||||
# can only belong to one single natgw group\.
|
||||
# can only belong to one single natgw group\&.
|
||||
#
|
||||
# CTDB_NATGW_PUBLIC_IP=10\.0\.0\.227/24
|
||||
# CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24
|
||||
# CTDB_NATGW_PUBLIC_IFACE=eth0
|
||||
# CTDB_NATGW_DEFAULT_GATEWAY=10\.0\.0\.1
|
||||
# CTDB_NATGW_PRIVATE_NETWORK=10\.1\.1\.0/24
|
||||
# CTDB_NATGW_DEFAULT_GATEWAY=10\&.0\&.0\&.1
|
||||
# CTDB_NATGW_PRIVATE_NETWORK=10\&.1\&.1\&.0/24
|
||||
# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SS "CTDB_NATGW_PUBLIC_IP"
|
||||
.PP
|
||||
This is an ip address in the public network that is used for all outgoing traffic when the public addresses are not assigned\. This address will be assigned to one of the nodes in the cluster which will masquerade all traffic for the other nodes\.
|
||||
This is an ip address in the public network that is used for all outgoing traffic when the public addresses are not assigned\&. This address will be assigned to one of the nodes in the cluster which will masquerade all traffic for the other nodes\&.
|
||||
.PP
|
||||
Format of this parameter is IPADDRESS/NETMASK
|
||||
.SS "CTDB_NATGW_PUBLIC_IFACE"
|
||||
.PP
|
||||
This is the physical interface where the CTDB_NATGW_PUBLIC_IP will be assigned to\. This should be an interface connected to the public network\.
|
||||
This is the physical interface where the CTDB_NATGW_PUBLIC_IP will be assigned to\&. This should be an interface connected to the public network\&.
|
||||
.PP
|
||||
Format of this parameter is INTERFACE
|
||||
.SS "CTDB_NATGW_DEFAULT_GATEWAY"
|
||||
.PP
|
||||
This is the default gateway to use on the node that is elected to host the CTDB_NATGW_PUBLIC_IP\. This is the default gateway on the public network\.
|
||||
This is the default gateway to use on the node that is elected to host the CTDB_NATGW_PUBLIC_IP\&. This is the default gateway on the public network\&.
|
||||
.PP
|
||||
Format of this parameter is IPADDRESS
|
||||
.SS "CTDB_NATGW_PRIVATE_NETWORK"
|
||||
.PP
|
||||
This is the network/netmask used for the interal private network\.
|
||||
This is the network/netmask used for the interal private network\&.
|
||||
.PP
|
||||
Format of this parameter is IPADDRESS/NETMASK
|
||||
.SS "CTDB_NATGW_NODES"
|
||||
.PP
|
||||
This is the list of all nodes that belong to the same NATGW group as this node\. The default is /etc/ctdb/natgw_nodes\.
|
||||
This is the list of all nodes that belong to the same NATGW group as this node\&. The default is /etc/ctdb/natgw_nodes\&.
|
||||
.SS "Operation"
|
||||
.PP
|
||||
When the NAT\-GW functionality is used, one of the nodes is elected to act as a NAT router for all the other nodes in the group when they need to originate traffic to the external public network\.
|
||||
When the NAT\-GW functionality is used, one of the nodes is elected to act as a NAT router for all the other nodes in the group when they need to originate traffic to the external public network\&.
|
||||
.PP
|
||||
The NAT\-GW node is assigned the CTDB_NATGW_PUBLIC_IP to the designated interface and the provided default route\. The NAT\-GW is configured to act as a router and to masquerade all traffic it receives from the internal private network and which is destined to the external network(s)\.
|
||||
The NAT\-GW node is assigned the CTDB_NATGW_PUBLIC_IP to the designated interface and the provided default route\&. The NAT\-GW is configured to act as a router and to masquerade all traffic it receives from the internal private network and which is destined to the external network(s)\&.
|
||||
.PP
|
||||
All other nodes in the group are configured with a default route of metric 10 pointing to the designated NAT GW node\.
|
||||
All other nodes in the group are configured with a default route of metric 10 pointing to the designated NAT GW node\&.
|
||||
.PP
|
||||
This is implemented in the 11\.natgw eventscript\. Please see the eventscript for further information\.
|
||||
This is implemented in the 11\&.natgw eventscript\&. Please see the eventscript for further information\&.
|
||||
.SS "Removing/Changing NATGW at runtime"
|
||||
.PP
|
||||
The following are the procedures to change/remove a NATGW configuration at runtime, without having to restart ctdbd\.
|
||||
The following are the procedures to change/remove a NATGW configuration at runtime, without having to restart ctdbd\&.
|
||||
.PP
|
||||
If you want to remove NATGW completely from a node, use these steps:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
1, Run \'CTDB_BASE=/etc/ctdb /etc/ctdb/events\.d/11\.natgw removenatgw\'
|
||||
1, Run \'CTDB_BASE=/etc/ctdb /etc/ctdb/events\&.d/11\&.natgw removenatgw\'
|
||||
2, Then remove the configuration from /etc/sysconfig/ctdb
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
If you want to change the NATGW configuration on a node :
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
1, Run \'CTDB_BASE=/etc/ctdb /etc/ctdb/events\.d/11\.natgw removenatgw\'
|
||||
1, Run \'CTDB_BASE=/etc/ctdb /etc/ctdb/events\&.d/11\&.natgw removenatgw\'
|
||||
2, Then change the configuration in /etc/sysconfig/ctdb
|
||||
3, Run \'CTDB_BASE=/etc/ctdb /etc/ctdb/events\.d/11\.natgw updatenatgw\'
|
||||
3, Run \'CTDB_BASE=/etc/ctdb /etc/ctdb/events\&.d/11\&.natgw updatenatgw\'
|
||||
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.SH "NOTIFICATION SCRIPT"
|
||||
.PP
|
||||
Notification scripts are used with ctdb to have a call\-out from ctdb to a user\-specified script when certain state changes occur in ctdb\. This is commonly to set up either sending SNMP traps or emails when a node becomes unhealthy and similar\.
|
||||
Notification scripts are used with ctdb to have a call\-out from ctdb to a user\-specified script when certain state changes occur in ctdb\&. This is commonly to set up either sending SNMP traps or emails when a node becomes unhealthy and similar\&.
|
||||
.PP
|
||||
This is activated by setting CTDB_NOTIFY_SCRIPT=<your script> in the sysconfig file, or by adding \-\-notification\-script=<your script>\.
|
||||
This is activated by setting CTDB_NOTIFY_SCRIPT=<your script> in the sysconfig file, or by adding \-\-notification\-script=<your script>\&.
|
||||
.PP
|
||||
See /etc/ctdb/notify\.sh for an example script\.
|
||||
See /etc/ctdb/notify\&.sh for an example script\&.
|
||||
.PP
|
||||
CTDB currently generates notifications on these state changes:
|
||||
.SS "unhealthy"
|
||||
.PP
|
||||
This call\-out is triggered when the node changes to UNHEALTHY state\.
|
||||
This call\-out is triggered when the node changes to UNHEALTHY state\&.
|
||||
.SS "healthy"
|
||||
.PP
|
||||
This call\-out is triggered when the node changes to HEALTHY state\.
|
||||
This call\-out is triggered when the node changes to HEALTHY state\&.
|
||||
.SS "startup"
|
||||
.PP
|
||||
This call\-out is triggered when ctdb has started up and all managed services are up and running\.
|
||||
This call\-out is triggered when ctdb has started up and all managed services are up and running\&.
|
||||
.SH "CLAMAV DAEMON"
|
||||
.PP
|
||||
CTDB has support to manage the popular anti\-virus daemon ClamAV\. This support is implemented through the eventscript : /etc/ctdb/events\.d/31\.clamd\.
|
||||
CTDB has support to manage the popular anti\-virus daemon ClamAV\&. This support is implemented through the eventscript : /etc/ctdb/events\&.d/31\&.clamd\&.
|
||||
.SS "Configuration"
|
||||
.PP
|
||||
Start by configuring CLAMAV normally and test that it works\. Once this is done, copy the configuration files over to all the nodes so that all nodes share identical CLAMAV configurations\. Once this is done you can proceed with the intructions below to activate CTDB support for CLAMAV\.
|
||||
Start by configuring CLAMAV normally and test that it works\&. Once this is done, copy the configuration files over to all the nodes so that all nodes share identical CLAMAV configurations\&. Once this is done you can proceed with the intructions below to activate CTDB support for CLAMAV\&.
|
||||
.PP
|
||||
First, to activate CLAMAV support in CTDB, edit /etc/sysconfig/ctdb and add the two lines :
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
CTDB_MANAGES_CLAMD=yes
|
||||
CTDB_CLAMD_SOCKET="/path/to/clamd\.socket"
|
||||
CTDB_CLAMD_SOCKET="/path/to/clamd\&.socket"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
Second, activate the eventscript
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
ctdb enablescript 31\.clamd
|
||||
ctdb enablescript 31\&.clamd
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
Third, CTDB will now be starting and stopping this service accordingly, so make sure that the system is not configured to start/stop this service automatically\. On RedHat systems you can disable the system starting/stopping CLAMAV automatically by running :
|
||||
Third, CTDB will now be starting and stopping this service accordingly, so make sure that the system is not configured to start/stop this service automatically\&. On RedHat systems you can disable the system starting/stopping CLAMAV automatically by running :
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
chkconfig clamd off
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
Once you have restarted CTDBD, use
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
ctdb scriptstatus
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
and verify that the 31\.clamd eventscript is listed and that it was executed successfully\.
|
||||
and verify that the 31\&.clamd eventscript is listed and that it was executed successfully\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
ctdb(1), onnode(1)
|
||||
\fI\%http://ctdb.samba.org/\fR
|
||||
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
|
||||
.SH "COPYRIGHT/LICENSE"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
Copyright (C) Andrew Tridgell 2007
|
||||
Copyright (C) Ronnie sahlberg 2007
|
||||
@ -625,14 +687,16 @@ Copyright (C) Ronnie sahlberg 2007
|
||||
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\.
|
||||
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\.
|
||||
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/\.
|
||||
along with this program; if not, see http://www\&.gnu\&.org/licenses/\&.
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdbd</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="ctdbd.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdbd — The CTDB cluster daemon</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdbd</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdbd</code> [-? --help] [-d --debug=<INTEGER>] {--dbdir=<directory>} {--dbdir-persistent=<directory>} [--event-script-dir=<directory>] [-i --interactive] [--listen=<address>] [--logfile=<filename>] [--lvs] {--nlist=<filename>} [--no-lmaster] [--no-recmaster] [--nosetsched] {--notification-script=<filename>} [--public-addresses=<filename>] [--public-interface=<interface>] {--reclock=<filename>} [--single-public-ip=<address>] [--socket=<filename>] [--start-as-disabled] [--start-as-stopped] [--syslog] [--log-ringbuf-size=<num-entries>] [--torture] [--transport=<STRING>] [--usage]</p></div></div><div class="refsect1" lang="en"><a name="id2479684"></a><h2>DESCRIPTION</h2><p>
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ctdbd</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="ctdbd"><a name="ctdbd.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ctdbd — The CTDB cluster daemon</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ctdbd</code> </p></div><div class="cmdsynopsis"><p><code class="command">ctdbd</code> [-? --help] [-d --debug=<INTEGER>] {--dbdir=<directory>} {--dbdir-persistent=<directory>} [--event-script-dir=<directory>] [-i --interactive] [--listen=<address>] [--logfile=<filename>] [--lvs] {--nlist=<filename>} [--no-lmaster] [--no-recmaster] [--nosetsched] {--notification-script=<filename>} [--public-addresses=<filename>] [--public-interface=<interface>] {--reclock=<filename>} [--single-public-ip=<address>] [--socket=<filename>] [--start-as-disabled] [--start-as-stopped] [--syslog] [--log-ringbuf-size=<num-entries>] [--torture] [--transport=<STRING>] [--usage]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id550120"></a><h2>DESCRIPTION</h2><p>
|
||||
ctdbd is the main ctdb daemon.
|
||||
</p><p>
|
||||
ctdbd provides a clustered version of the TDB database with automatic rebuild/recovery of the databases upon nodefailures.
|
||||
@ -8,7 +8,7 @@
|
||||
ctdbd provides monitoring of all nodes in the cluster and automatically reconfigures the cluster and recovers upon node failures.
|
||||
</p><p>
|
||||
ctdbd is the main component in clustered Samba that provides a high-availability load-sharing CIFS server cluster.
|
||||
</p></div><div class="refsect1" lang="en"><a name="id2479715"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-? --help</span></dt><dd><p>
|
||||
</p></div><div class="refsect1" title="OPTIONS"><a name="id550147"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-? --help</span></dt><dd><p>
|
||||
Print some help text to the screen.
|
||||
</p></dd><dt><span class="term">-d --debug=<DEBUGLEVEL></span></dt><dd><p>
|
||||
This option sets the debuglevel on the ctdbd daemon which controls what will be written to the logfile. The default is 0 which will only log important events and errors. A larger number will provide additional logging.
|
||||
@ -67,7 +67,7 @@
|
||||
This option is used to tell ctdbd to NOT run as a real-time process
|
||||
and instead run ctdbd as a normal userspace process.
|
||||
This is useful for debugging and when you want to run ctdbd under
|
||||
valgrind or gdb. (You dont want to attach valgrind or gdb to a
|
||||
valgrind or gdb. (You don't want to attach valgrind or gdb to a
|
||||
real-time process.)
|
||||
</p></dd><dt><span class="term">--notification-script=<filename></span></dt><dd><p>
|
||||
This specifies a script which will be invoked by ctdb when certain
|
||||
@ -86,7 +86,7 @@
|
||||
to and also where to attach the single-public-ip when used.
|
||||
</p><p>
|
||||
This is only required when using public ip addresses and only when
|
||||
you dont specify the interface explicitly in /etc/ctdb/public_addresses or when you are using --single-public-ip.
|
||||
you don't specify the interface explicitly in /etc/ctdb/public_addresses or when you are using --single-public-ip.
|
||||
</p><p>
|
||||
If you omit this argument when using public addresses or single public ip, ctdb will not be able to send out Gratious ARPs correctly or be able to kill tcp connections correctly which will lead to application failures.
|
||||
</p></dd><dt><span class="term">--reclock=<filename></span></dt><dd><p>
|
||||
@ -154,10 +154,10 @@
|
||||
implemented in the future.
|
||||
</p></dd><dt><span class="term">--usage</span></dt><dd><p>
|
||||
Print useage information to the screen.
|
||||
</p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2528910"></a><h2>Private vs Public addresses</h2><p>
|
||||
</p></dd></dl></div></div><div class="refsect1" title="Private vs Public addresses"><a name="id507260"></a><h2>Private vs Public addresses</h2><p>
|
||||
When used for ip takeover in a HA environment, each node in a ctdb
|
||||
cluster has multiple ip addresses assigned to it. One private and one or more public.
|
||||
</p><div class="refsect2" lang="en"><a name="id2528921"></a><h3>Private address</h3><p>
|
||||
</p><div class="refsect2" title="Private address"><a name="id507269"></a><h3>Private address</h3><p>
|
||||
This is the physical ip address of the node which is configured in
|
||||
linux and attached to a physical interface. This address uniquely
|
||||
identifies a physical node in the cluster and is the ip addresses
|
||||
@ -187,7 +187,7 @@
|
||||
10.1.1.2
|
||||
10.1.1.3
|
||||
10.1.1.4
|
||||
</pre></div><div class="refsect2" lang="en"><a name="id2528969"></a><h3>Public address</h3><p>
|
||||
</pre></div><div class="refsect2" title="Public address"><a name="id507304"></a><h3>Public address</h3><p>
|
||||
A public address on the other hand is not attached to an interface.
|
||||
This address is managed by ctdbd itself and is attached/detached to
|
||||
a physical node at runtime.
|
||||
@ -248,7 +248,7 @@
|
||||
unavailable. 10.1.1.1 can not be failed over to node 2 or node 3 since
|
||||
these nodes do not have this ip address listed in their public
|
||||
addresses file.
|
||||
</p></div></div><div class="refsect1" lang="en"><a name="id2529051"></a><h2>Node status</h2><p>
|
||||
</p></div></div><div class="refsect1" title="Node status"><a name="id507365"></a><h2>Node status</h2><p>
|
||||
The current status of each node in the cluster can be viewed by the
|
||||
'ctdb status' command.
|
||||
</p><p>
|
||||
@ -285,50 +285,50 @@
|
||||
RECMASTER or NATGW.
|
||||
This node does not perticipate in the CTDB cluster but can still be
|
||||
communicated with. I.e. ctdb commands can be sent to it.
|
||||
</p></div><div class="refsect1" lang="en"><a name="id2529117"></a><h2>PUBLIC TUNABLES</h2><p>
|
||||
</p></div><div class="refsect1" title="PUBLIC TUNABLES"><a name="id507414"></a><h2>PUBLIC TUNABLES</h2><p>
|
||||
These are the public tuneables that can be used to control how ctdb behaves.
|
||||
</p><div class="refsect2" lang="en"><a name="id2529127"></a><h3>KeepaliveInterval</h3><p>Default: 1</p><p>
|
||||
</p><div class="refsect2" title="KeepaliveInterval"><a name="id507423"></a><h3>KeepaliveInterval</h3><p>Default: 1</p><p>
|
||||
How often should the nodes send keepalives to eachother.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529141"></a><h3>KeepaliveLimit</h3><p>Default: 5</p><p>
|
||||
</p></div><div class="refsect2" title="KeepaliveLimit"><a name="id507436"></a><h3>KeepaliveLimit</h3><p>Default: 5</p><p>
|
||||
After how many keepalive intervals without any traffic should a node
|
||||
wait until marking the peer as DISCONNECTED.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529156"></a><h3>MonitorInterval</h3><p>Default: 15</p><p>
|
||||
</p></div><div class="refsect2" title="MonitorInterval"><a name="id507449"></a><h3>MonitorInterval</h3><p>Default: 15</p><p>
|
||||
How often should ctdb run the event scripts to check for a nodes health.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529170"></a><h3>TickleUpdateInterval</h3><p>Default: 20</p><p>
|
||||
</p></div><div class="refsect2" title="TickleUpdateInterval"><a name="id507461"></a><h3>TickleUpdateInterval</h3><p>Default: 20</p><p>
|
||||
How often will ctdb record and store the "tickle" information used to
|
||||
kickstart stalled tcp connections after a recovery.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529184"></a><h3>EventScriptTimeout</h3><p>Default: 20</p><p>
|
||||
</p></div><div class="refsect2" title="EventScriptTimeout"><a name="id507475"></a><h3>EventScriptTimeout</h3><p>Default: 20</p><p>
|
||||
How long should ctdb let an event script run before aborting it and
|
||||
marking the node unhealthy.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529198"></a><h3>RecoveryBanPeriod</h3><p>Default: 300</p><p>
|
||||
</p></div><div class="refsect2" title="RecoveryBanPeriod"><a name="id507488"></a><h3>RecoveryBanPeriod</h3><p>Default: 300</p><p>
|
||||
If a node becomes banned causing repetitive recovery failures. The node will
|
||||
eventually become banned from the cluster.
|
||||
This controls how long the culprit node will be banned from the cluster
|
||||
before it is allowed to try to join the cluster again.
|
||||
Dont set to small. A node gets banned for a reason and it is usually due
|
||||
Don't set to small. A node gets banned for a reason and it is usually due
|
||||
to real problems with the node.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529217"></a><h3>DatabaseHashSize</h3><p>Default: 100000</p><p>
|
||||
</p></div><div class="refsect2" title="DatabaseHashSize"><a name="id507504"></a><h3>DatabaseHashSize</h3><p>Default: 100000</p><p>
|
||||
Size of the hash chains for the local store of the tdbs that ctdb manages.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529232"></a><h3>RerecoveryTimeout</h3><p>Default: 10</p><p>
|
||||
</p></div><div class="refsect2" title="RerecoveryTimeout"><a name="id507516"></a><h3>RerecoveryTimeout</h3><p>Default: 10</p><p>
|
||||
Once a recovery has completed, no additional recoveries are permitted until this timeout has expired.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529246"></a><h3>EnableBans</h3><p>Default: 1</p><p>
|
||||
When set to 0, this disables BANNING completely in the cluster and thus nodes can not get banned, even it they break. Dont set to 0.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529261"></a><h3>DeterministicIPs</h3><p>Default: 1</p><p>
|
||||
</p></div><div class="refsect2" title="EnableBans"><a name="id507529"></a><h3>EnableBans</h3><p>Default: 1</p><p>
|
||||
When set to 0, this disables BANNING completely in the cluster and thus nodes can not get banned, even it they break. Don't set to 0.
|
||||
</p></div><div class="refsect2" title="DeterministicIPs"><a name="id507543"></a><h3>DeterministicIPs</h3><p>Default: 1</p><p>
|
||||
When enabled, this tunable makes ctdb try to keep public IP addresses locked to specific nodes as far as possible. This makes it easier for debugging since you can know that as long as all nodes are healthy public IP X will always be hosted by node Y.
|
||||
</p><p>
|
||||
The cost of using deterministic IP address assignment is that it disables part of the logic where ctdb tries to reduce the number of public IP assignment changes in the cluster. This tunable may increase the number of IP failover/failbacks that are performed on the cluster by a small margin.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529286"></a><h3>DisableWhenUnhealthy</h3><p>Default: 0</p><p>
|
||||
</p></div><div class="refsect2" title="DisableWhenUnhealthy"><a name="id507563"></a><h3>DisableWhenUnhealthy</h3><p>Default: 0</p><p>
|
||||
When set, As soon as a node becomes unhealthy, that node will also automatically become permanently DISABLED. Once a node is DISABLED, the only way to make it participate in the cluster again and host services is by manually enabling the node again using 'ctdb enable'.
|
||||
</p><p>
|
||||
This disables parts of the resilience and robustness of the cluster and should ONLY be used when the system administrator is actively monitoring the cluster, so that nodes can be enabled again.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2529310"></a><h3>NoIPFailback</h3><p>Default: 0</p><p>
|
||||
</p></div><div class="refsect2" title="NoIPFailback"><a name="id507583"></a><h3>NoIPFailback</h3><p>Default: 0</p><p>
|
||||
When set to 1, ctdb will not perform failback of IP addresses when a node becomes healthy. Ctdb WILL perform failover of public IP addresses when a node becomes UNHEALTHY, but when the node becomes HEALTHY again, ctdb will not fail the addresses back.
|
||||
</p><p>
|
||||
Use with caution! Normally when a node becomes available to the cluster
|
||||
ctdb will try to reassign public IP addresses onto the new node as a way to distribute the workload evenly across the clusternode. Ctdb tries to make sure that all running nodes have approximately the same number of public addresses it hosts.
|
||||
</p><p>
|
||||
When you enable this tunable, CTDB will no longer attempt to rebalance the cluster by failing IP addresses back to the new nodes. An unbalanced cluster will therefore remain unbalanced until there is manual intervention from the administrator. When this parameter is set, you can manually fail public IP addresses over to the new node(s) using the 'ctdb moveip' command.
|
||||
</p></div></div><div class="refsect1" lang="en"><a name="id2529346"></a><h2>LVS</h2><p>
|
||||
</p></div></div><div class="refsect1" title="LVS"><a name="id507611"></a><h2>LVS</h2><p>
|
||||
LVS is a mode where CTDB presents one single IP address for the entire
|
||||
cluster. This is an alternative to using public IP addresses and round-robin
|
||||
DNS to loadbalance clients across the cluster.
|
||||
@ -369,7 +369,7 @@ ctdb will try to reassign public IP addresses onto the new node as a way to dist
|
||||
the processing node back to the clients. For read-intensive i/o patterns you can acheive very high throughput rates in this mode.
|
||||
</p><p>
|
||||
Note: you can use LVS and public addresses at the same time.
|
||||
</p><div class="refsect2" lang="en"><a name="id2529426"></a><h3>Configuration</h3><p>
|
||||
</p><div class="refsect2" title="Configuration"><a name="id507667"></a><h3>Configuration</h3><p>
|
||||
To activate LVS on a CTDB node you must specify CTDB_PUBLIC_INTERFACE and
|
||||
CTDB_LVS_PUBLIC_ADDRESS in /etc/sysconfig/ctdb.
|
||||
</p><p>
|
||||
@ -392,7 +392,7 @@ You must also specify the "--lvs" command line argument to ctdbd to activete LVS
|
||||
all of the clients from the node BEFORE you enable LVS. Also make sure
|
||||
that when you ping these hosts that the traffic is routed out through the
|
||||
eth0 interface.
|
||||
</p></div><div class="refsect1" lang="en"><a name="id2529474"></a><h2>REMOTE CLUSTER NODES</h2><p>
|
||||
</p></div><div class="refsect1" title="REMOTE CLUSTER NODES"><a name="id507704"></a><h2>REMOTE CLUSTER NODES</h2><p>
|
||||
It is possible to have a CTDB cluster that spans across a WAN link.
|
||||
For example where you have a CTDB cluster in your datacentre but you also
|
||||
want to have one additional CTDB node located at a remote branch site.
|
||||
@ -421,7 +421,7 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
</p><p>
|
||||
Verify with the command "ctdb getcapabilities" that that node no longer
|
||||
has the recmaster or the lmaster capabilities.
|
||||
</p></div><div class="refsect1" lang="en"><a name="id2529524"></a><h2>NAT-GW</h2><p>
|
||||
</p></div><div class="refsect1" title="NAT-GW"><a name="id551307"></a><h2>NAT-GW</h2><p>
|
||||
Sometimes it is desireable to run services on the CTDB node which will
|
||||
need to originate outgoing traffic to external servers. This might
|
||||
be contacting NIS servers, LDAP servers etc. etc.
|
||||
@ -444,7 +444,7 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
if there are no public addresses assigned to the node.
|
||||
This is the simplest way but it uses up a lot of ip addresses since you
|
||||
have to assign both static and also public addresses to each node.
|
||||
</p><div class="refsect2" lang="en"><a name="id2529565"></a><h3>NAT-GW</h3><p>
|
||||
</p><div class="refsect2" title="NAT-GW"><a name="id551336"></a><h3>NAT-GW</h3><p>
|
||||
A second way is to use the built in NAT-GW feature in CTDB.
|
||||
With NAT-GW you assign one public NATGW address for each natgw group.
|
||||
Each NATGW group is a set of nodes in the cluster that shares the same
|
||||
@ -459,7 +459,7 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
In each NATGW group, one of the nodes is designated the NAT Gateway
|
||||
through which all traffic that is originated by nodes in this group
|
||||
will be routed through if a public addresses are not available.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476149"></a><h3>Configuration</h3><p>
|
||||
</p></div><div class="refsect2" title="Configuration"><a name="id551358"></a><h3>Configuration</h3><p>
|
||||
NAT-GW is configured in /etc/sysconfigctdb by setting the following
|
||||
variables:
|
||||
</p><pre class="screen">
|
||||
@ -498,31 +498,31 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
# CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
|
||||
# CTDB_NATGW_PRIVATE_NETWORK=10.1.1.0/24
|
||||
# CTDB_NATGW_NODES=/etc/ctdb/natgw_nodes
|
||||
</pre></div><div class="refsect2" lang="en"><a name="id2476220"></a><h3>CTDB_NATGW_PUBLIC_IP</h3><p>
|
||||
</pre></div><div class="refsect2" title="CTDB_NATGW_PUBLIC_IP"><a name="id551401"></a><h3>CTDB_NATGW_PUBLIC_IP</h3><p>
|
||||
This is an ip address in the public network that is used for all outgoing
|
||||
traffic when the public addresses are not assigned.
|
||||
This address will be assigned to one of the nodes in the cluster which
|
||||
will masquerade all traffic for the other nodes.
|
||||
</p><p>
|
||||
Format of this parameter is IPADDRESS/NETMASK
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476237"></a><h3>CTDB_NATGW_PUBLIC_IFACE</h3><p>
|
||||
</p></div><div class="refsect2" title="CTDB_NATGW_PUBLIC_IFACE"><a name="id551415"></a><h3>CTDB_NATGW_PUBLIC_IFACE</h3><p>
|
||||
This is the physical interface where the CTDB_NATGW_PUBLIC_IP will be
|
||||
assigned to. This should be an interface connected to the public network.
|
||||
</p><p>
|
||||
Format of this parameter is INTERFACE
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476252"></a><h3>CTDB_NATGW_DEFAULT_GATEWAY</h3><p>
|
||||
</p></div><div class="refsect2" title="CTDB_NATGW_DEFAULT_GATEWAY"><a name="id551428"></a><h3>CTDB_NATGW_DEFAULT_GATEWAY</h3><p>
|
||||
This is the default gateway to use on the node that is elected to host
|
||||
the CTDB_NATGW_PUBLIC_IP. This is the default gateway on the public network.
|
||||
</p><p>
|
||||
Format of this parameter is IPADDRESS
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476268"></a><h3>CTDB_NATGW_PRIVATE_NETWORK</h3><p>
|
||||
</p></div><div class="refsect2" title="CTDB_NATGW_PRIVATE_NETWORK"><a name="id551442"></a><h3>CTDB_NATGW_PRIVATE_NETWORK</h3><p>
|
||||
This is the network/netmask used for the interal private network.
|
||||
</p><p>
|
||||
Format of this parameter is IPADDRESS/NETMASK
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476282"></a><h3>CTDB_NATGW_NODES</h3><p>
|
||||
</p></div><div class="refsect2" title="CTDB_NATGW_NODES"><a name="id551453"></a><h3>CTDB_NATGW_NODES</h3><p>
|
||||
This is the list of all nodes that belong to the same NATGW group
|
||||
as this node. The default is /etc/ctdb/natgw_nodes.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476294"></a><h3>Operation</h3><p>
|
||||
</p></div><div class="refsect2" title="Operation"><a name="id551463"></a><h3>Operation</h3><p>
|
||||
When the NAT-GW functionality is used, one of the nodes is elected
|
||||
to act as a NAT router for all the other nodes in the group when
|
||||
they need to originate traffic to the external public network.
|
||||
@ -537,7 +537,7 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
</p><p>
|
||||
This is implemented in the 11.natgw eventscript. Please see the
|
||||
eventscript for further information.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476325"></a><h3>Removing/Changing NATGW at runtime</h3><p>
|
||||
</p></div><div class="refsect2" title="Removing/Changing NATGW at runtime"><a name="id551488"></a><h3>Removing/Changing NATGW at runtime</h3><p>
|
||||
The following are the procedures to change/remove a NATGW configuration
|
||||
at runtime, without having to restart ctdbd.
|
||||
</p><p>
|
||||
@ -551,7 +551,7 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
1, Run 'CTDB_BASE=/etc/ctdb /etc/ctdb/events.d/11.natgw removenatgw'
|
||||
2, Then change the configuration in /etc/sysconfig/ctdb
|
||||
3, Run 'CTDB_BASE=/etc/ctdb /etc/ctdb/events.d/11.natgw updatenatgw'
|
||||
</pre></div></div><div class="refsect1" lang="en"><a name="id2476364"></a><h2>NOTIFICATION SCRIPT</h2><p>
|
||||
</pre></div></div><div class="refsect1" title="NOTIFICATION SCRIPT"><a name="id551519"></a><h2>NOTIFICATION SCRIPT</h2><p>
|
||||
Notification scripts are used with ctdb to have a call-out from ctdb
|
||||
to a user-specified script when certain state changes occur in ctdb.
|
||||
This is commonly to set up either sending SNMP traps or emails
|
||||
@ -563,17 +563,17 @@ CTDB_CAPABILITY_RECMASTER=no
|
||||
See /etc/ctdb/notify.sh for an example script.
|
||||
</p><p>
|
||||
CTDB currently generates notifications on these state changes:
|
||||
</p><div class="refsect2" lang="en"><a name="id2476394"></a><h3>unhealthy</h3><p>
|
||||
</p><div class="refsect2" title="unhealthy"><a name="id551542"></a><h3>unhealthy</h3><p>
|
||||
This call-out is triggered when the node changes to UNHEALTHY state.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476404"></a><h3>healthy</h3><p>
|
||||
</p></div><div class="refsect2" title="healthy"><a name="id551552"></a><h3>healthy</h3><p>
|
||||
This call-out is triggered when the node changes to HEALTHY state.
|
||||
</p></div><div class="refsect2" lang="en"><a name="id2476415"></a><h3>startup</h3><p>
|
||||
</p></div><div class="refsect2" title="startup"><a name="id551561"></a><h3>startup</h3><p>
|
||||
This call-out is triggered when ctdb has started up and all managed services are up and running.
|
||||
</p></div></div><div class="refsect1" lang="en"><a name="id2476426"></a><h2>ClamAV Daemon</h2><p>
|
||||
</p></div></div><div class="refsect1" title="ClamAV Daemon"><a name="id551572"></a><h2>ClamAV Daemon</h2><p>
|
||||
CTDB has support to manage the popular anti-virus daemon ClamAV.
|
||||
This support is implemented through the
|
||||
eventscript : /etc/ctdb/events.d/31.clamd.
|
||||
</p><div class="refsect2" lang="en"><a name="id2476437"></a><h3>Configuration</h3><p>
|
||||
</p><div class="refsect2" title="Configuration"><a name="id551580"></a><h3>Configuration</h3><p>
|
||||
Start by configuring CLAMAV normally and test that it works. Once this is
|
||||
done, copy the configuration files over to all the nodes so that all nodes
|
||||
share identical CLAMAV configurations.
|
||||
@ -602,10 +602,10 @@ Once you have restarted CTDBD, use
|
||||
ctdb scriptstatus
|
||||
</pre><p>
|
||||
and verify that the 31.clamd eventscript is listed and that it was executed successfully.
|
||||
</p></div></div><div class="refsect1" lang="en"><a name="id2476497"></a><h2>SEE ALSO</h2><p>
|
||||
</p></div></div><div class="refsect1" title="SEE ALSO"><a name="id551630"></a><h2>SEE ALSO</h2><p>
|
||||
ctdb(1), onnode(1)
|
||||
<a class="ulink" href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a>
|
||||
</p></div><div class="refsect1" lang="en"><a name="id2476510"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
|
||||
</p></div><div class="refsect1" title="COPYRIGHT/LICENSE"><a name="id551643"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br>
|
||||
Copyright (C) Andrew Tridgell 2007<br>
|
||||
Copyright (C) Ronnie sahlberg 2007<br>
|
||||
<br>
|
||||
|
Loading…
Reference in New Issue
Block a user