diff options
Diffstat (limited to 'source4/cluster/ctdb/doc')
-rw-r--r-- | source4/cluster/ctdb/doc/ctdb.1 | 403 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/ctdb.1.html | 277 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/ctdb.1.xml | 553 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/ctdbd.1 | 213 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/ctdbd.1.html | 182 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/ctdbd.1.xml | 379 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/onnode.1 | 79 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/onnode.1.html | 45 | ||||
-rw-r--r-- | source4/cluster/ctdb/doc/onnode.1.xml | 91 |
9 files changed, 2222 insertions, 0 deletions
diff --git a/source4/cluster/ctdb/doc/ctdb.1 b/source4/cluster/ctdb/doc/ctdb.1 new file mode 100644 index 0000000000..e8f764bd86 --- /dev/null +++ b/source4/cluster/ctdb/doc/ctdb.1 @@ -0,0 +1,403 @@ +.\" Title: ctdb +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/> +.\" Date: 07/10/2007 +.\" Manual: +.\" Source: +.\" +.TH "CTDB" "1" "07/10/2007" "" "" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +ctdb \- clustered tdb database management utility +.SH "SYNOPSIS" +.HP 29 +\fBctdb [ OPTIONS ] COMMAND ...\fR +.HP 5 +\fBctdb\fR [\-n\ <node>] [\-Y] [\-t\ <timeout>] [\-?\ \-\-help] [\-\-usage] [\-d\ \-\-debug=<INTEGER>] [\-\-socket=<filename>] +.SH "DESCRIPTION" +.PP +ctdb is a utility to view and manage a ctdb cluster. +.SH "OPTIONS" +.PP +\-n <node> +.RS 4 +This specifies on which node to execute the command. Default is to run the command on the deamon running on the local host. +.RE +.PP +\-Y +.RS 4 +Produce output in machinereadable form for easier parsing by scripts. Not all commands support this option. +.RE +.PP +\-t <timeout> +.RS 4 +How long should ctdb wait for a command to complete before timing out. Default is 3 seconds. +.RE +.PP +\-? \-\-help +.RS 4 +Print some help text to the screen. +.RE +.PP +\-\-usage +.RS 4 +Print useage information to the screen. +.RE +.PP +\-d \-\-debug=<debuglevel> +.RS 4 +Change the debug level for the command. Default is 0. +.RE +.PP +\-\-socket=<filename> +.RS 4 +Specify the socketname to use when connecting to the local ctdb daemon. The default is /tmp/ctdb.socket . +.sp +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. +.RE +.SH "ADMINISTRATIVE COMMANDS" +.PP +These are commands used to monitor and administrate a CTDB cluster. +.SS "status" +.PP +This command shows the current status of the ctdb node. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +\fBnode status\fR +.RS +.PP +Node status reflects the current status of the node. There are four possible states: +.PP +OK \- This node is fully functional. +.PP +DISCONNECTED \- This node could not be connected through the network and is currently not parcipitating 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. +.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 currnetly 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. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +\fBgeneration\fR +.RS +.PP +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. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +\fBVNNMAP\fR +.RS +.PP +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 parcipitating in the vnnmap can become lmaster or dmaster for a database record. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +\fBRecovery mode\fR +.RS +.PP +This is the current recovery mode of the cluster. There are two possible modes: +.PP +NORMAL \- The cluster is fully operational. +.PP +RECOVERY \- The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete. A recovery process should finish within seconds. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated. +.RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +\fBRecovery master\fR +.RS +.PP +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. +.RE +.PP +Example: ctdb status +.PP +Example output: +.sp +.RS 4 +.nf +Number of nodes:4 +vnn:0 11.1.2.200 OK (THIS NODE) +vnn:1 11.1.2.201 OK +vnn:2 11.1.2.202 OK +vnn:3 11.1.2.203 OK +Generation:1362079228 +Size:4 +hash:0 lmaster:0 +hash:1 lmaster:1 +hash:2 lmaster:2 +hash:3 lmaster:3 +Recovery mode:NORMAL (0) +Recovery master:0 + +.fi +.RE +.SS "ping" +.PP +This command will "ping" all CTDB daemons in the cluster to verify that they are processing commands correctly. +.PP +Example: ctdb ping +.PP +Example output: +.sp +.RS 4 +.nf +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 +.RE +.SS "ip" +.PP +This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip. +.PP +Example: ctdb ip +.PP +Example output: +.sp +.RS 4 +.nf +Number of nodes:4 +12.1.1.1 0 +12.1.1.2 1 +12.1.1.3 2 +12.1.1.4 3 + +.fi +.RE +.SS "getvar <name>" +.PP +Get the runtime value of a tuneable variable. +.PP +Example: ctdb getvar MaxRedirectCount +.PP +Example output: +.sp +.RS 4 +.nf +MaxRedirectCount = 3 + +.fi +.RE +.SS "setvar <name> <value>" +.PP +Set the runtime value of a tuneable variable. +.PP +Example: ctdb setvar MaxRedirectCount 5 +.SS "listvars" +.PP +List all tuneable variables. +.PP +Example: ctdb listvars +.PP +Example output: +.sp +.RS 4 +.nf +MaxRedirectCount = 5 +SeqnumFrequency = 1 +ControlTimeout = 60 +TraverseTimeout = 20 +KeepaliveInterval = 2 +KeepaliveLimit = 3 +MaxLACount = 7 +RecoverTimeout = 5 +RecoverInterval = 1 +ElectionTimeout = 3 +TakeoverTimeout = 5 +MonitorInterval = 15 +EventScriptTimeout = 20 +RecoveryGracePeriod = 60 +RecoveryBanPeriod = 300 + +.fi +.RE +.SS "statistics" +.PP +Collect statistics from the CTDB daemon about how many calls it has served. +.PP +Example: ctdb statistics +.PP +Example output: +.sp +.RS 4 +.nf +CTDB version 1 + num_clients 3 + frozen 0 + recovering 0 + client_packets_sent 360489 + client_packets_recv 360466 + node_packets_sent 480931 + node_packets_recv 240120 + keepalive_packets_sent 4 + keepalive_packets_recv 3 + node + req_call 2 + reply_call 2 + req_dmaster 0 + reply_dmaster 0 + reply_error 0 + req_message 42 + req_control 120408 + reply_control 360439 + client + req_call 2 + req_message 24 + req_control 360440 + timeouts + call 0 + control 0 + traverse 0 + total_calls 2 + pending_calls 0 + lockwait_calls 0 + pending_lockwait_calls 0 + memory_used 5040 + max_hop_count 0 + max_call_latency 4.948321 sec + max_lockwait_latency 0.000000 sec + +.fi +.RE +.SS "statisticsreset" +.PP +This command is used to clear all statistics counters in a node. +.PP +Example: ctdb statisticsreset +.SS "getdebug" +.PP +Get the current debug level for the node. the debug level controls what information is written to the log file. +.SS "setdebug <debuglevel>" +.PP +Set the debug level of a node. This is a number between 0 and 9 and controls what information will be written to the logfile. +.SS "getpid" +.PP +This command will return the process id of the ctdb daemon. +.SS "disable" +.PP +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. +.SS "enable" +.PP +Re\-enable a node that has been administratively disabled. +.SS "ban <bantime|0>" +.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. +.PP +Nodes are automatically banned if they are the cause of too many cluster recoveries. +.SS "unban" +.PP +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. +.SS "shutdown" +.PP +This command will shutdown a specific CTDB daemon. +.SS "recover" +.PP +This command will trigger the recovery daemon to do a cluster recovery. +.SS "killtcp <srcip:port> <dstip:port>" +.PP +This command will kill the specified TCP connection by issuing a TCP RST to the srcip:port endpoint. +.SS "tickle <srcip:port> <dstip:port>" +.PP +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 acknowledge number and will when received by the source host result in it sending an immediate correct ACK back to the other end. +.PP +TCP tickles are useful to "tickle" clients after a IP failover has occured since this will make the client immediately recognize the 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. +.SH "DEBUGGING COMMANDS" +.PP +These commands are primarily used for CTDB development and testing and should not be used for normal administration. +.SS "process\-exists <pid>" +.PP +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. +.SS "getdbmap" +.PP +This command lists all clustered TDB databases that the CTDB daemon has attahced to. +.PP +Example: ctdb getdbmap +.PP +Example output: +.sp +.RS 4 +.nf +Number of databases:4 +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 + +.fi +.RE +.SS "catdb <dbname>" +.PP +This command will dump a clustered TDB database to the screen. This is a debugging command. +.SS "getmonmode" +.PP +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. +.PP +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. +.PP +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. +.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. +.SS "dumpmemory" +.PP +This is a debugging command. This command will make the ctdb daemon to write a fill memory allocation map to the log file. +.SS "freeze" +.PP +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. +.PP +This is primarily used by the recovery daemon to stop all samba daemons from accessing any databases while the database is recovered and rebuilt. +.SS "thaw" +.PP +Thaw a previously frozen node. +.SH "SEE ALSO" +.PP +ctdbd(1), onnode(1) +\fI\%http://ctdb.samba.org/\fR +.SH "COPYRIGHT/LICENSE" +.sp +.RS 4 +.nf +Copyright (C) Andrew Tridgell 2007 +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. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +.fi +.RE diff --git a/source4/cluster/ctdb/doc/ctdb.1.html b/source4/cluster/ctdb/doc/ctdb.1.html new file mode 100644 index 0000000000..165dc29781 --- /dev/null +++ b/source4/cluster/ctdb/doc/ctdb.1.html @@ -0,0 +1,277 @@ +<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.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><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"><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>] [-? --help] [--usage] [-d --debug=<INTEGER>] [--socket=<filename>]</p></div></div><div class="refsect1" lang="en"><a name="id2488867"></a><h2>DESCRIPTION</h2><p> + ctdb is a utility to view and manage a ctdb cluster. + </p></div><div class="refsect1" lang="en"><a name="id2488877"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-n <node></span></dt><dd><p> + This specifies on which node to execute the command. Default is + to run the command on the deamon running on the local host. + </p></dd><dt><span class="term">-Y</span></dt><dd><p> + Produce output in machinereadable form for easier parsing by scripts. Not all commands support this option. + </p></dd><dt><span class="term">-t <timeout></span></dt><dd><p> + How long should ctdb wait for a command to complete before timing out. Default is 3 seconds. + </p></dd><dt><span class="term">-? --help</span></dt><dd><p> + Print some help text to the screen. + </p></dd><dt><span class="term">--usage</span></dt><dd><p> + Print useage information to the screen. + </p></dd><dt><span class="term">-d --debug=<debuglevel></span></dt><dd><p> + Change the debug level for the command. Default is 0. + </p></dd><dt><span class="term">--socket=<filename></span></dt><dd><p> + Specify the socketname to use when connecting to the local ctdb + daemon. The default is /tmp/ctdb.socket . + </p><p> + 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" lang="en"><a name="id2488991"></a><h2>Administrative Commands</h2><p> + These are commands used to monitor and administrate a CTDB cluster. + </p><div class="refsect2" lang="en"><a name="id2489000"></a><h3>status</h3><p> + This command shows the current status of the ctdb node. + </p><div class="refsect3" lang="en"><a name="id2489009"></a><h4>node status</h4><p> + Node status reflects the current status of the node. There are four possible states: + </p><p> + OK - This node is fully functional. + </p><p> + DISCONNECTED - This node could not be connected through the network and is currently not parcipitating 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. + </p><p> + 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. + </p><p> + 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 currnetly being hosted. All unhealthy nodes should be investigated and require an administrative action to rectify. + </p><p> + 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. + </p></div><div class="refsect3" lang="en"><a name="id2489061"></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. + </p></div><div class="refsect3" lang="en"><a name="id2490207"></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 parcipitating in the vnnmap can become lmaster or dmaster for a database record. + </p></div><div class="refsect3" lang="en"><a name="id2490221"></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. + </p><p> + RECOVERY - The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete. A recovery process should finish within seconds. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated. + </p></div><div class="refsect3" lang="en"><a name="id2490244"></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></div><p> + Example: ctdb status + </p><p>Example output:</p><pre class="screen"> +Number of nodes:4 +vnn:0 11.1.2.200 OK (THIS NODE) +vnn:1 11.1.2.201 OK +vnn:2 11.1.2.202 OK +vnn:3 11.1.2.203 OK +Generation:1362079228 +Size:4 +hash:0 lmaster:0 +hash:1 lmaster:1 +hash:2 lmaster:2 +hash:3 lmaster:3 +Recovery mode:NORMAL (0) +Recovery master:0 + </pre></div><div class="refsect2" lang="en"><a name="id2490275"></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 + </p><p> + Example output: + </p><pre class="screen"> +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" lang="en"><a name="id2490302"></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. + </p><p> + Example: ctdb ip + </p><p> + Example output: + </p><pre class="screen"> +Number of nodes:4 +12.1.1.1 0 +12.1.1.2 1 +12.1.1.3 2 +12.1.1.4 3 + </pre></div><div class="refsect2" lang="en"><a name="id2490327"></a><h3>getvar <name></h3><p> + Get the runtime value of a tuneable variable. + </p><p> + Example: ctdb getvar MaxRedirectCount + </p><p> + Example output: + </p><pre class="screen"> +MaxRedirectCount = 3 + </pre></div><div class="refsect2" lang="en"><a name="id2490350"></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" lang="en"><a name="id2490365"></a><h3>listvars</h3><p> + List all tuneable variables. + </p><p> + Example: ctdb listvars + </p><p> + Example output: + </p><pre class="screen"> +MaxRedirectCount = 5 +SeqnumFrequency = 1 +ControlTimeout = 60 +TraverseTimeout = 20 +KeepaliveInterval = 2 +KeepaliveLimit = 3 +MaxLACount = 7 +RecoverTimeout = 5 +RecoverInterval = 1 +ElectionTimeout = 3 +TakeoverTimeout = 5 +MonitorInterval = 15 +EventScriptTimeout = 20 +RecoveryGracePeriod = 60 +RecoveryBanPeriod = 300 + </pre></div><div class="refsect2" lang="en"><a name="id2490393"></a><h3>statistics</h3><p> + Collect statistics from the CTDB daemon about how many calls it has served. + </p><p> + Example: ctdb statistics + </p><p> + Example output: + </p><pre class="screen"> +CTDB version 1 + num_clients 3 + frozen 0 + recovering 0 + client_packets_sent 360489 + client_packets_recv 360466 + node_packets_sent 480931 + node_packets_recv 240120 + keepalive_packets_sent 4 + keepalive_packets_recv 3 + node + req_call 2 + reply_call 2 + req_dmaster 0 + reply_dmaster 0 + reply_error 0 + req_message 42 + req_control 120408 + reply_control 360439 + client + req_call 2 + req_message 24 + req_control 360440 + timeouts + call 0 + control 0 + traverse 0 + total_calls 2 + pending_calls 0 + lockwait_calls 0 + pending_lockwait_calls 0 + memory_used 5040 + max_hop_count 0 + max_call_latency 4.948321 sec + max_lockwait_latency 0.000000 sec + </pre></div><div class="refsect2" lang="en"><a name="id2490436"></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" lang="en"><a name="id2490450"></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></div><div class="refsect2" lang="en"><a name="id2490461"></a><h3>setdebug <debuglevel></h3><p> + Set the debug level of a node. This is a number between 0 and 9 and controls what information will be written to the logfile. + </p></div><div class="refsect2" lang="en"><a name="id2536585"></a><h3>getpid</h3><p> + This command will return the process id of the ctdb daemon. + </p></div><div class="refsect2" lang="en"><a name="id2536595"></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" lang="en"><a name="id2536613"></a><h3>enable</h3><p> + Re-enable a node that has been administratively disabled. + </p></div><div class="refsect2" lang="en"><a name="id2536623"></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. + </p><p> + Nodes are automatically banned if they are the cause of too many + cluster recoveries. + </p></div><div class="refsect2" lang="en"><a name="id2536646"></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 class="refsect2" lang="en"><a name="id2536658"></a><h3>shutdown</h3><p> + This command will shutdown a specific CTDB daemon. + </p></div><div class="refsect2" lang="en"><a name="id2536668"></a><h3>recover</h3><p> + This command will trigger the recovery daemon to do a cluster + recovery. + </p></div><div class="refsect2" lang="en"><a name="id2536679"></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. + </p></div><div class="refsect2" lang="en"><a name="id2536690"></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 + acknowledge number and will when received by the source host result + in it sending an immediate correct ACK back to the other end. + </p><p> + TCP tickles are useful to "tickle" clients after a IP failover has + occured since this will make the client immediately recognize the + 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><div class="refsect1" lang="en"><a name="id2536716"></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" lang="en"><a name="id2536726"></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" lang="en"><a name="id2536738"></a><h3>getdbmap</h3><p> + This command lists all clustered TDB databases that the CTDB daemon has attahced to. + </p><p> + Example: ctdb getdbmap + </p><p> + Example output: + </p><pre class="screen"> +Number of databases:4 +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 + </pre></div><div class="refsect2" lang="en"><a name="id2536766"></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" lang="en"><a name="id2536777"></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" lang="en"><a name="id2536808"></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" lang="en"><a name="id2536823"></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" lang="en"><a name="id2536835"></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 the log file. + </p></div><div class="refsect2" lang="en"><a name="id2536846"></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. + </p><p> + 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" lang="en"><a name="id2536864"></a><h3>thaw</h3><p> + Thaw a previously frozen node. + </p></div></div><div class="refsect1" lang="en"><a name="id2536875"></a><h2>SEE ALSO</h2><p> + ctdbd(1), onnode(1) + <a href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a> + </p></div><div class="refsect1" lang="en"><a name="id2536888"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br> +Copyright (C) Andrew Tridgell 2007<br> +Copyright (C) Ronnie sahlberg 2007<br> +<br> +This program is free software; you can redistribute it and/or modify<br> +it under the terms of the GNU General Public License as published by<br> +the Free Software Foundation; either version 3 of the License, or (at<br> +your option) any later version.<br> +<br> +This program is distributed in the hope that it will be useful, but<br> +WITHOUT ANY WARRANTY; without even the implied warranty of<br> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br> +General Public License for more details.<br> +<br> +You should have received a copy of the GNU General Public License<br> +along with this program; if not, see http://www.gnu.org/licenses/.<br> +</p></div></div></div></body></html> diff --git a/source4/cluster/ctdb/doc/ctdb.1.xml b/source4/cluster/ctdb/doc/ctdb.1.xml new file mode 100644 index 0000000000..6ed50afb67 --- /dev/null +++ b/source4/cluster/ctdb/doc/ctdb.1.xml @@ -0,0 +1,553 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc"> +<refentry id="ctdb.1"> + +<refmeta> + <refentrytitle>ctdb</refentrytitle> + <manvolnum>1</manvolnum> +</refmeta> + + +<refnamediv> + <refname>ctdb</refname> + <refpurpose>clustered tdb database management utility</refpurpose> +</refnamediv> + +<refsynopsisdiv> + <cmdsynopsis> + <command>ctdb [ OPTIONS ] COMMAND ...</command> + </cmdsynopsis> + + <cmdsynopsis> + <command>ctdb</command> + <arg choice="opt">-n <node></arg> + <arg choice="opt">-Y</arg> + <arg choice="opt">-t <timeout></arg> + <arg choice="opt">-? --help</arg> + <arg choice="opt">--usage</arg> + <arg choice="opt">-d --debug=<INTEGER></arg> + <arg choice="opt">--socket=<filename></arg> + </cmdsynopsis> + +</refsynopsisdiv> + + <refsect1><title>DESCRIPTION</title> + <para> + ctdb is a utility to view and manage a ctdb cluster. + </para> + </refsect1> + + + <refsect1> + <title>OPTIONS</title> + + <variablelist> + <varlistentry><term>-n <node></term> + <listitem> + <para> + This specifies on which node to execute the command. Default is + to run the command on the deamon running on the local host. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-Y</term> + <listitem> + <para> + Produce output in machinereadable form for easier parsing by scripts. Not all commands support this option. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-t <timeout></term> + <listitem> + <para> + How long should ctdb wait for a command to complete before timing out. Default is 3 seconds. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-? --help</term> + <listitem> + <para> + Print some help text to the screen. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--usage</term> + <listitem> + <para> + Print useage information to the screen. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-d --debug=<debuglevel></term> + <listitem> + <para> + Change the debug level for the command. Default is 0. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--socket=<filename></term> + <listitem> + <para> + Specify the socketname to use when connecting to the local ctdb + daemon. The default is /tmp/ctdb.socket . + </para> + <para> + 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. + </para> + </listitem> + </varlistentry> + + </variablelist> + </refsect1> + + + <refsect1><title>Administrative Commands</title> + <para> + These are commands used to monitor and administrate a CTDB cluster. + </para> + + <refsect2><title>status</title> + <para> + This command shows the current status of the ctdb node. + </para> + + <refsect3><title>node status</title> + <para> + Node status reflects the current status of the node. There are four possible states: + </para> + <para> + OK - This node is fully functional. + </para> + <para> + DISCONNECTED - This node could not be connected through the network and is currently not parcipitating 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. + </para> + <para> + 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. + </para> + <para> + 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 currnetly being hosted. All unhealthy nodes should be investigated and require an administrative action to rectify. + </para> + <para> + 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. + </para> + </refsect3> + + <refsect3><title>generation</title> + <para> + 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. + </para> + </refsect3> + + <refsect3><title>VNNMAP</title> + <para> + 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 parcipitating in the vnnmap can become lmaster or dmaster for a database record. + </para> + </refsect3> + + <refsect3><title>Recovery mode</title> + <para> + This is the current recovery mode of the cluster. There are two possible modes: + </para> + <para> + NORMAL - The cluster is fully operational. + </para> + <para> + RECOVERY - The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete. A recovery process should finish within seconds. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated. + </para> + </refsect3> + + <refsect3><title>Recovery master</title> + <para> + 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. + </para> + </refsect3> + + <para> + Example: ctdb status + </para> + <para>Example output:</para> + <screen format="linespecific"> +Number of nodes:4 +vnn:0 11.1.2.200 OK (THIS NODE) +vnn:1 11.1.2.201 OK +vnn:2 11.1.2.202 OK +vnn:3 11.1.2.203 OK +Generation:1362079228 +Size:4 +hash:0 lmaster:0 +hash:1 lmaster:1 +hash:2 lmaster:2 +hash:3 lmaster:3 +Recovery mode:NORMAL (0) +Recovery master:0 + </screen> + </refsect2> + + <refsect2><title>ping</title> + <para> + This command will "ping" all CTDB daemons in the cluster to verify that they are processing commands correctly. + </para> + <para> + Example: ctdb ping + </para> + <para> + Example output: + </para> + <screen format="linespecific"> +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) + </screen> + </refsect2> + + <refsect2><title>ip</title> + <para> + This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip. + </para> + <para> + Example: ctdb ip + </para> + <para> + Example output: + </para> + <screen format="linespecific"> +Number of nodes:4 +12.1.1.1 0 +12.1.1.2 1 +12.1.1.3 2 +12.1.1.4 3 + </screen> + </refsect2> + + <refsect2><title>getvar <name></title> + <para> + Get the runtime value of a tuneable variable. + </para> + <para> + Example: ctdb getvar MaxRedirectCount + </para> + <para> + Example output: + </para> + <screen format="linespecific"> +MaxRedirectCount = 3 + </screen> + </refsect2> + + <refsect2><title>setvar <name> <value></title> + <para> + Set the runtime value of a tuneable variable. + </para> + <para> + Example: ctdb setvar MaxRedirectCount 5 + </para> + </refsect2> + + <refsect2><title>listvars</title> + <para> + List all tuneable variables. + </para> + <para> + Example: ctdb listvars + </para> + <para> + Example output: + </para> + <screen format="linespecific"> +MaxRedirectCount = 5 +SeqnumFrequency = 1 +ControlTimeout = 60 +TraverseTimeout = 20 +KeepaliveInterval = 2 +KeepaliveLimit = 3 +MaxLACount = 7 +RecoverTimeout = 5 +RecoverInterval = 1 +ElectionTimeout = 3 +TakeoverTimeout = 5 +MonitorInterval = 15 +EventScriptTimeout = 20 +RecoveryGracePeriod = 60 +RecoveryBanPeriod = 300 + </screen> + </refsect2> + + <refsect2><title>statistics</title> + <para> + Collect statistics from the CTDB daemon about how many calls it has served. + </para> + <para> + Example: ctdb statistics + </para> + <para> + Example output: + </para> + <screen format="linespecific"> +CTDB version 1 + num_clients 3 + frozen 0 + recovering 0 + client_packets_sent 360489 + client_packets_recv 360466 + node_packets_sent 480931 + node_packets_recv 240120 + keepalive_packets_sent 4 + keepalive_packets_recv 3 + node + req_call 2 + reply_call 2 + req_dmaster 0 + reply_dmaster 0 + reply_error 0 + req_message 42 + req_control 120408 + reply_control 360439 + client + req_call 2 + req_message 24 + req_control 360440 + timeouts + call 0 + control 0 + traverse 0 + total_calls 2 + pending_calls 0 + lockwait_calls 0 + pending_lockwait_calls 0 + memory_used 5040 + max_hop_count 0 + max_call_latency 4.948321 sec + max_lockwait_latency 0.000000 sec + </screen> + </refsect2> + + <refsect2><title>statisticsreset</title> + <para> + This command is used to clear all statistics counters in a node. + </para> + <para> + Example: ctdb statisticsreset + </para> + </refsect2> + + <refsect2><title>getdebug</title> + <para> + Get the current debug level for the node. the debug level controls what information is written to the log file. + </para> + </refsect2> + + <refsect2><title>setdebug <debuglevel></title> + <para> + Set the debug level of a node. This is a number between 0 and 9 and controls what information will be written to the logfile. + </para> + </refsect2> + + <refsect2><title>getpid</title> + <para> + This command will return the process id of the ctdb daemon. + </para> + </refsect2> + + <refsect2><title>disable</title> + <para> + 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. + </para> + </refsect2> + + <refsect2><title>enable</title> + <para> + Re-enable a node that has been administratively disabled. + </para> + </refsect2> + + <refsect2><title>ban <bantime|0></title> + <para> + Administratively ban a node for bantime seconds. A bantime of 0 means that the node should be permanently banned. + </para> + <para> + 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. + </para> + <para> + Nodes are automatically banned if they are the cause of too many + cluster recoveries. + </para> + </refsect2> + + <refsect2><title>unban</title> + <para> + 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. + </para> + </refsect2> + + <refsect2><title>shutdown</title> + <para> + This command will shutdown a specific CTDB daemon. + </para> + </refsect2> + + <refsect2><title>recover</title> + <para> + This command will trigger the recovery daemon to do a cluster + recovery. + </para> + </refsect2> + + <refsect2><title>killtcp <srcip:port> <dstip:port></title> + <para> + This command will kill the specified TCP connection by issuing a + TCP RST to the srcip:port endpoint. + </para> + </refsect2> + + <refsect2><title>tickle <srcip:port> <dstip:port></title> + <para> + 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 + acknowledge number and will when received by the source host result + in it sending an immediate correct ACK back to the other end. + </para> + <para> + TCP tickles are useful to "tickle" clients after a IP failover has + occured since this will make the client immediately recognize the + 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. + </para> + </refsect2> + + </refsect1> + + + <refsect1><title>Debugging Commands</title> + <para> + These commands are primarily used for CTDB development and testing and + should not be used for normal administration. + </para> + <refsect2><title>process-exists <pid></title> + <para> + 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. + </para> + </refsect2> + + <refsect2><title>getdbmap</title> + <para> + This command lists all clustered TDB databases that the CTDB daemon has attahced to. + </para> + <para> + Example: ctdb getdbmap + </para> + <para> + Example output: + </para> + <screen format="linespecific"> +Number of databases:4 +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 + </screen> + </refsect2> + + <refsect2><title>catdb <dbname></title> + <para> + This command will dump a clustered TDB database to the screen. This is a debugging command. + </para> + </refsect2> + + <refsect2><title>getmonmode</title> + <para> + 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. + </para> + <para> + 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. + </para> + <para> + 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. + </para> + </refsect2> + + + <refsect2><title>setmonmode <0|1></title> + <para> + 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. + </para> + </refsect2> + + <refsect2><title>attach <dbname></title> + <para> + This is a debugging command. This command will make the CTDB daemon create a new CTDB database and attach to it. + </para> + </refsect2> + + <refsect2><title>dumpmemory</title> + <para> + This is a debugging command. This command will make the ctdb daemon to write a fill memory allocation map to the log file. + </para> + </refsect2> + + <refsect2><title>freeze</title> + <para> + 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. + </para> + <para> + This is primarily used by the recovery daemon to stop all samba + daemons from accessing any databases while the database is recovered + and rebuilt. + </para> + </refsect2> + + <refsect2><title>thaw</title> + <para> + Thaw a previously frozen node. + </para> + </refsect2> + + </refsect1> + + + <refsect1><title>SEE ALSO</title> + <para> + ctdbd(1), onnode(1) + <ulink url="http://ctdb.samba.org/"/> + </para> + </refsect1> + <refsect1><title>COPYRIGHT/LICENSE</title> +<literallayout> +Copyright (C) Andrew Tridgell 2007 +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. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +</literallayout> + </refsect1> +</refentry> diff --git a/source4/cluster/ctdb/doc/ctdbd.1 b/source4/cluster/ctdb/doc/ctdbd.1 new file mode 100644 index 0000000000..682d813028 --- /dev/null +++ b/source4/cluster/ctdb/doc/ctdbd.1 @@ -0,0 +1,213 @@ +.\" Title: ctdbd +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/> +.\" Date: 07/10/2007 +.\" Manual: +.\" Source: +.\" +.TH "CTDBD" "1" "07/10/2007" "" "" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +ctdbd \- The CTDB cluster daemon +.SH "SYNOPSIS" +.HP 6 +\fBctdbd\fR +.HP 6 +\fBctdbd\fR {\-\-reclock=<filename>} {\-\-nlist=<filename>} {\-\-dbdir=<directory>} [\-?\ \-\-help] [\-\-usage] [\-i\ \-\-interactive] [\-\-public\-addresses=<filename>] [\-\-public\-interface=<interface>] [\-\-event\-script=<filename>] [\-\-logfile=<filename>] [\-\-listen=<address>] [\-\-transport=<STRING>] [\-\-socket=<filename>] [\-d\ \-\-debug=<INTEGER>] [\-\-torture] +.SH "DESCRIPTION" +.PP +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. +.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. +.PP +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\-awailability load\-sharing CIFS server cluster. +.SH "OPTIONS" +.PP +\-? \-\-help +.RS 4 +Print some help text to the screen. +.RE +.PP +\-\-usage +.RS 4 +Print useage information to the screen. +.RE +.PP +\-\-reclock=<filename> +.RS 4 +This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to arbitrate which node has the role of recovery\-master. This file must be stored on shared storage. +.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. +.sp +This file is usually /etc/ctdb/nodes . +.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. +.sp +This directory would usually be /var/ctdb . +.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. +.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 one entry for each node in the cluster. +.sp +This is usually the file /etc/ctdb/public_addresses +.RE +.PP +\-\-public\-interface=<interface> +.RS 4 +When used with IP takeover this option specifies which physical interface should be used to attach the public addresses to. +.RE +.PP +\-\-event\-script=<filename> +.RS 4 +This option is used to specify which events script that ctdbd will use to manage services when the cluster configuration changes. +.sp +This will normally be /etc/ctdb/events which is part of the ctdb distribution. +.RE +.PP +\-\-logfile=<filename> +.RS 4 +This is the file where ctdbd will write its log. This is usually /var/log/log.ctdb . +.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. +.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. +.RE +.PP +\-\-transport=<STRING> +.RS 4 +This option specifies which transport to use for ctdbd internode communications. The default is "tcp". +.sp +Suported transports are "tcp" and "infiniband". +.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. +.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. +.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. +.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. +.sp +You do NOT want to use this option unless you are developing and testing new functionality in ctdbd. +.RE +.SH "PRIVATE VS PUBLIC ADDRESSES" +.PP +When used for ip takeover in a HA environment, each node in a ctdb cluster has two ip addresses assigned to it. One private and one 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. +.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. +.PP +Each node is assigned an internal node number which corresponds to which line in the nodes file that has the local private address of the node. +.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. + + Example /etc/ctdb/nodes for a four node cluster: + +.sp +.RS 4 +.nf + 10.1.1.1 + 10.1.1.2 + 10.1.1.3 + 10.1.1.4 + +.fi +.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. You should NOT have this address configured to an interface in linux. Let ctdbd manage these addresses. +.PP +The ctdb cluster will assign/reassign these public addresses across the available 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. +.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. +.PP +By default, each node will when operational always serve its primary public address which is the corresponding line for that node number in the public addresses file. I.e. as long as node X is available and fully oprational it will always be the node that serves the corresponding public address. +.PP +The list of public addresses also contain the netmask for that address. the reason for this is because ctdbd needs to know which mask to use when it adds/removes the address from a physical node. This netmask is also used by ctdbd when making decisions on which node should take over a public ip address for a failed node. A node will only be allowed to take over a public address from a different node IFF that public address resides in the same subnet as the primary public address for that node. + + Example /etc/ctdb/public_addresses for a four node cluster: + +.sp +.RS 4 +.nf + 11.1.1.1/24 + 11.1.1.2/24 + 11.1.2.1/24 + 11.1.2.2/24 + +.fi +.RE +.PP +In this example, if node 3 fails, its public address can be taken over by node 2 since node 2 is on the same subnet as 3 but not by node 0 or node 1 since node 0 and 1 are both on a different subnet from node 3. +.SH "NODE STATUS" +.PP +The current status of each node in the cluster can be viewed by the 'ctdb status' command. +.PP +There are five possible for a node. +.PP +OK \- This node is fully functional. +.PP +DISCONNECTED \- This node could not be connected through the network and is currently not parcipitating 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. +.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. +.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. +.SH "SEE ALSO" +.PP +ctdb(1), onnode(1) +\fI\%http://ctdb.samba.org/\fR +.SH "COPYRIGHT/LICENSE" +.sp +.RS 4 +.nf +Copyright (C) Andrew Tridgell 2007 +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. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +.fi +.RE diff --git a/source4/cluster/ctdb/doc/ctdbd.1.html b/source4/cluster/ctdb/doc/ctdbd.1.html new file mode 100644 index 0000000000..49d2fdc468 --- /dev/null +++ b/source4/cluster/ctdb/doc/ctdbd.1.html @@ -0,0 +1,182 @@ +<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.72.0"></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> {--reclock=<filename>} {--nlist=<filename>} {--dbdir=<directory>} [-? --help] [--usage] [-i --interactive] [--public-addresses=<filename>] [--public-interface=<interface>] [--event-script=<filename>] [--logfile=<filename>] [--listen=<address>] [--transport=<STRING>] [--socket=<filename>] [-d --debug=<INTEGER>] [--torture]</p></div></div><div class="refsect1" lang="en"><a name="id2488930"></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. + </p><p> + Combined with a cluster filesystem ctdbd provides a full HA environment for services such as clustered Samba and NFS as well as other services. + </p><p> + 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-awailability load-sharing CIFS server cluster. + </p></div><div class="refsect1" lang="en"><a name="id2488962"></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">--usage</span></dt><dd><p> + Print useage information to the screen. + </p></dd><dt><span class="term">--reclock=<filename></span></dt><dd><p> + This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to arbitrate which node has the role of recovery-master. + This file must be stored on shared storage. + </p></dd><dt><span class="term">--nlist=<filename></span></dt><dd><p> + 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. + </p><p> + This file is usually /etc/ctdb/nodes . + </p></dd><dt><span class="term">--dbdir=<directory></span></dt><dd><p> + 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. + </p><p> + This directory would usually be /var/ctdb . + </p></dd><dt><span class="term">-i --interactive</span></dt><dd><p> + 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. + </p></dd><dt><span class="term">--public_addresses=<filename></span></dt><dd><p> + When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains one entry for each node in the cluster. + </p><p> + This is usually the file /etc/ctdb/public_addresses + </p></dd><dt><span class="term">--public-interface=<interface></span></dt><dd><p> + When used with IP takeover this option specifies which physical interface should be used to attach the public addresses to. + </p></dd><dt><span class="term">--event-script=<filename></span></dt><dd><p> + This option is used to specify which events script that ctdbd will + use to manage services when the cluster configuration changes. + </p><p> + This will normally be /etc/ctdb/events which is part of the ctdb distribution. + </p></dd><dt><span class="term">--logfile=<filename></span></dt><dd><p> + This is the file where ctdbd will write its log. This is usually /var/log/log.ctdb . + </p></dd><dt><span class="term">--listen=<address></span></dt><dd><p> + 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. + </p><p> + 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. + </p></dd><dt><span class="term">--transport=<STRING></span></dt><dd><p> + This option specifies which transport to use for ctdbd internode communications. The default is "tcp". + </p><p> + Suported transports are "tcp" and "infiniband". + </p></dd><dt><span class="term">--socket=<filename></span></dt><dd><p> + 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. + </p><p> + 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. + </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. + </p></dd><dt><span class="term">--torture</span></dt><dd><p> + 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. + </p><p> + You do NOT want to use this option unless you are developing and testing new functionality in ctdbd. + </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2490376"></a><h2>Private vs Public addresses</h2><p> + When used for ip takeover in a HA environment, each node in a ctdb + cluster has two ip addresses assigned to it. One private and one public. + </p><div class="refsect2" lang="en"><a name="id2490386"></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 + that ctdbd will use to communicate with the ctdbd daemons on the + other nodes in the cluster. + </p><p> + 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. + </p><p> + Each node is assigned an internal node number which corresponds to + which line in the nodes file that has the local private address + of the node. + </p><p> + 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. + </p> + Example /etc/ctdb/nodes for a four node cluster: + <pre class="screen"> + 10.1.1.1 + 10.1.1.2 + 10.1.1.3 + 10.1.1.4 + </pre></div><div class="refsect2" lang="en"><a name="id2490432"></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. You should NOT have this address configured + to an interface in linux. Let ctdbd manage these addresses. + </p><p> + The ctdb cluster will assign/reassign these public addresses across the + available 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. + </p><p> + 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. + </p><p> + By default, each node will when operational always serve its primary + public address which is the corresponding line for that node number + in the public addresses file. I.e. as long as node X is available and + fully oprational it will always be the node that serves the + corresponding public address. + </p><p> + The list of public addresses also contain the netmask for that address. + the reason for this is because ctdbd needs to know which mask to use + when it adds/removes the address from a physical node. This netmask + is also used by ctdbd when making decisions on which node should take + over a public ip address for a failed node. + A node will only be allowed to take over a public address from a + different node IFF that public address resides in the same subnet + as the primary public address for that node. + </p> + Example /etc/ctdb/public_addresses for a four node cluster: + <pre class="screen"> + 11.1.1.1/24 + 11.1.1.2/24 + 11.1.2.1/24 + 11.1.2.2/24 + </pre><p> + In this example, if node 3 fails, its public address can be taken over + by node 2 since node 2 is on the same subnet as 3 but not by node 0 or + node 1 since node 0 and 1 are both on a different subnet from node 3. + </p></div></div><div class="refsect1" lang="en"><a name="id2536612"></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> + There are five possible for a node. + </p><p> + OK - This node is fully functional. + </p><p> + DISCONNECTED - This node could not be connected through the network + and is currently not parcipitating 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. + </p><p> + 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. + </p><p> + 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. + </p><p> + 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. + </p></div><div class="refsect1" lang="en"><a name="id2536669"></a><h2>SEE ALSO</h2><p> + ctdb(1), onnode(1) + <a href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a> + </p></div><div class="refsect1" lang="en"><a name="id2536682"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br> +Copyright (C) Andrew Tridgell 2007<br> +Copyright (C) Ronnie sahlberg 2007<br> +<br> +This program is free software; you can redistribute it and/or modify<br> +it under the terms of the GNU General Public License as published by<br> +the Free Software Foundation; either version 3 of the License, or (at<br> +your option) any later version.<br> +<br> +This program is distributed in the hope that it will be useful, but<br> +WITHOUT ANY WARRANTY; without even the implied warranty of<br> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br> +General Public License for more details.<br> +<br> +You should have received a copy of the GNU General Public License<br> +along with this program; if not, see http://www.gnu.org/licenses/.<br> +</p></div></div></div></body></html> diff --git a/source4/cluster/ctdb/doc/ctdbd.1.xml b/source4/cluster/ctdb/doc/ctdbd.1.xml new file mode 100644 index 0000000000..cbff8d8b5b --- /dev/null +++ b/source4/cluster/ctdb/doc/ctdbd.1.xml @@ -0,0 +1,379 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc"> +<refentry id="ctdbd.1"> + +<refmeta> + <refentrytitle>ctdbd</refentrytitle> + <manvolnum>1</manvolnum> +</refmeta> + + +<refnamediv> + <refname>ctdbd</refname> + <refpurpose>The CTDB cluster daemon</refpurpose> +</refnamediv> + +<refsynopsisdiv> + <cmdsynopsis> + <command>ctdbd</command> + </cmdsynopsis> + + <cmdsynopsis> + <command>ctdbd</command> + <arg choice="req">--reclock=<filename></arg> + <arg choice="req">--nlist=<filename></arg> + <arg choice="req">--dbdir=<directory></arg> + <arg choice="opt">-? --help</arg> + <arg choice="opt">--usage</arg> + <arg choice="opt">-i --interactive</arg> + <arg choice="opt">--public-addresses=<filename></arg> + <arg choice="opt">--public-interface=<interface></arg> + <arg choice="opt">--event-script=<filename></arg> + <arg choice="opt">--logfile=<filename></arg> + <arg choice="opt">--listen=<address></arg> + <arg choice="opt">--transport=<STRING></arg> + <arg choice="opt">--socket=<filename></arg> + <arg choice="opt">-d --debug=<INTEGER></arg> + <arg choice="opt">--torture</arg> + </cmdsynopsis> + +</refsynopsisdiv> + + <refsect1><title>DESCRIPTION</title> + <para> + ctdbd is the main ctdb daemon. + </para> + <para> + ctdbd provides a clustered version of the TDB database with automatic rebuild/recovery of the databases upon nodefailures. + </para> + <para> + Combined with a cluster filesystem ctdbd provides a full HA environment for services such as clustered Samba and NFS as well as other services. + </para> + <para> + ctdbd provides monitoring of all nodes in the cluster and automatically reconfigures the cluster and recovers upon node failures. + </para> + <para> + ctdbd is the main component in clustered Samba that provides a high-awailability load-sharing CIFS server cluster. + </para> + </refsect1> + + + <refsect1> + <title>OPTIONS</title> + + <variablelist> + <varlistentry><term>-? --help</term> + <listitem> + <para> + Print some help text to the screen. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--usage</term> + <listitem> + <para> + Print useage information to the screen. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--reclock=<filename></term> + <listitem> + <para> + This is the name of the lock file stored of the shared cluster filesystem that ctdbd uses to arbitrate which node has the role of recovery-master. + This file must be stored on shared storage. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--nlist=<filename></term> + <listitem> + <para> + 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. + </para> + <para> + This file is usually /etc/ctdb/nodes . + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--dbdir=<directory></term> + <listitem> + <para> + 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. + </para> + <para> + This directory would usually be /var/ctdb . + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-i --interactive</term> + <listitem> + <para> + 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. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--public_addresses=<filename></term> + <listitem> + <para> + When used with IP takeover this specifies a file containing the public ip addresses to use on the cluster. This file contains one entry for each node in the cluster. + </para> + <para> + This is usually the file /etc/ctdb/public_addresses + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--public-interface=<interface></term> + <listitem> + <para> + When used with IP takeover this option specifies which physical interface should be used to attach the public addresses to. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--event-script=<filename></term> + <listitem> + <para> + This option is used to specify which events script that ctdbd will + use to manage services when the cluster configuration changes. + </para> + <para> + This will normally be /etc/ctdb/events which is part of the ctdb distribution. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--logfile=<filename></term> + <listitem> + <para> + This is the file where ctdbd will write its log. This is usually /var/log/log.ctdb . + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--listen=<address></term> + <listitem> + <para> + 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. + </para> + <para> + 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. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--transport=<STRING></term> + <listitem> + <para> + This option specifies which transport to use for ctdbd internode communications. The default is "tcp". + </para> + <para> + Suported transports are "tcp" and "infiniband". + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--socket=<filename></term> + <listitem> + <para> + 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. + </para> + <para> + 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. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>-d --debug=<DEBUGLEVEL></term> + <listitem> + <para> + 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. + </para> + </listitem> + </varlistentry> + + <varlistentry><term>--torture</term> + <listitem> + <para> + 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. + </para> + <para> + You do NOT want to use this option unless you are developing and testing new functionality in ctdbd. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + + <refsect1><title>Private vs Public addresses</title> + <para> + When used for ip takeover in a HA environment, each node in a ctdb + cluster has two ip addresses assigned to it. One private and one public. + </para> + + <refsect2><title>Private address</title> + <para> + 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. + </para> + <para> + 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. + </para> + <para> + Each node is assigned an internal node number which corresponds to + which line in the nodes file that has the local private address + of the node. + </para> + <para> + 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. + </para> + Example /etc/ctdb/nodes for a four node cluster: + <screen format="linespecific"> + 10.1.1.1 + 10.1.1.2 + 10.1.1.3 + 10.1.1.4 + </screen> + </refsect2> + <refsect2><title>Public address</title> + <para> + 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. You should NOT have this address configured + to an interface in linux. Let ctdbd manage these addresses. + </para> + <para> + The ctdb cluster will assign/reassign these public addresses across the + available 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. + </para> + <para> + 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. + </para> + <para> + By default, each node will when operational always serve its primary + public address which is the corresponding line for that node number + in the public addresses file. I.e. as long as node X is available and + fully oprational it will always be the node that serves the + corresponding public address. + </para> + <para> + The list of public addresses also contain the netmask for that address. + the reason for this is because ctdbd needs to know which mask to use + when it adds/removes the address from a physical node. This netmask + is also used by ctdbd when making decisions on which node should take + over a public ip address for a failed node. + A node will only be allowed to take over a public address from a + different node IFF that public address resides in the same subnet + as the primary public address for that node. + </para> + Example /etc/ctdb/public_addresses for a four node cluster: + <screen format="linespecific"> + 11.1.1.1/24 + 11.1.1.2/24 + 11.1.2.1/24 + 11.1.2.2/24 + </screen> + <para> + In this example, if node 3 fails, its public address can be taken over + by node 2 since node 2 is on the same subnet as 3 but not by node 0 or + node 1 since node 0 and 1 are both on a different subnet from node 3. + </para> + </refsect2> + </refsect1> + + + <refsect1><title>Node status</title> + <para> + The current status of each node in the cluster can be viewed by the + 'ctdb status' command. + </para> + <para> + There are five possible for a node. + </para> + + <para> + OK - This node is fully functional. + </para> + + <para> + DISCONNECTED - This node could not be connected through the network + and is currently not parcipitating 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. + </para> + + <para> + 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. + </para> + + <para> + 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. + </para> + + <para> + 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. + </para> + </refsect1> + + + <refsect1><title>SEE ALSO</title> + <para> + ctdb(1), onnode(1) + <ulink url="http://ctdb.samba.org/"/> + </para> + </refsect1> + <refsect1><title>COPYRIGHT/LICENSE</title> +<literallayout> +Copyright (C) Andrew Tridgell 2007 +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. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +</literallayout> + </refsect1> +</refentry> diff --git a/source4/cluster/ctdb/doc/onnode.1 b/source4/cluster/ctdb/doc/onnode.1 new file mode 100644 index 0000000000..926df4d145 --- /dev/null +++ b/source4/cluster/ctdb/doc/onnode.1 @@ -0,0 +1,79 @@ +.\" Title: onnode +.\" Author: +.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/> +.\" Date: 07/10/2007 +.\" Manual: +.\" Source: +.\" +.TH "ONNODE" "1" "07/10/2007" "" "" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +onnode \- run commands on ctdb nodes +.SH "SYNOPSIS" +.HP 24 +\fBonnode NODE COMMAND ...\fR +.SH "DESCRIPTION" +.PP +onnode is a utility to run commands on a specific node of a CTDB cluster, or on all nodes. +.PP +The NODE option specifies which node to run a command on. You can specify a numeric node number (from 0 to N\-1) or the special node 'all'. +.PP +The COMMAND can be any shell command. The onnode utility uses ssh or rsh to connect to the remote nodes and run the command. +.PP +If the COMMAND starts with a /, then the command is run via the 'at' service. Otherwise the command is run in the foreground. +.SH "EXAMPLES" +.PP +The following command would show the process ID of ctdb on all nodes +.sp +.RS 4 +.nf +onnode all pidof ctdbd + +.fi +.RE +.PP +The following command would show the last 5 lines of log on each node, preceded by the nodes hostname +.sp +.RS 4 +.nf +onnode all "hostname; tail \-5 /var/log/log.ctdb" + +.fi +.RE +.PP +The following command would restart the ctdb service on all nodes. +.sp +.RS 4 +.nf +onnode all service ctdb restart + +.fi +.RE +.SH "SEE ALSO" +.PP +ctdbd(1), ctdb(1), +\fI\%http://ctdb.samba.org/\fR +.SH "COPYRIGHT/LICENSE" +.sp +.RS 4 +.nf +Copyright (C) Andrew Tridgell 2007 +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. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +.fi +.RE diff --git a/source4/cluster/ctdb/doc/onnode.1.html b/source4/cluster/ctdb/doc/onnode.1.html new file mode 100644 index 0000000000..57ddfec37b --- /dev/null +++ b/source4/cluster/ctdb/doc/onnode.1.html @@ -0,0 +1,45 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>onnode</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="onnode.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>onnode — run commands on ctdb nodes</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">onnode NODE COMMAND ...</code> </p></div></div><div class="refsect1" lang="en"><a name="id2490457"></a><h2>DESCRIPTION</h2><p> + onnode is a utility to run commands on a specific node of a CTDB + cluster, or on all nodes. + </p><p> + The NODE option specifies which node to run a command on. You + can specify a numeric node number (from 0 to N-1) or the special + node 'all'. + </p><p> + The COMMAND can be any shell command. The onnode utility uses + ssh or rsh to connect to the remote nodes and run the command. + </p><p> + If the COMMAND starts with a /, then the command is run via the + 'at' service. Otherwise the command is run in the foreground. + </p></div><div class="refsect1" lang="en"><a name="id2487793"></a><h2>EXAMPLES</h2><p> + The following command would show the process ID of ctdb on all nodes + </p><pre class="screen"> +onnode all pidof ctdbd + </pre><p> + The following command would show the last 5 lines of log on each + node, preceded by the nodes hostname + </p><pre class="screen"> +onnode all "hostname; tail -5 /var/log/log.ctdb" + </pre><p> + The following command would restart the ctdb service on all nodes. + </p><pre class="screen"> +onnode all service ctdb restart + </pre></div><div class="refsect1" lang="en"><a name="id2488691"></a><h2>SEE ALSO</h2><p> + ctdbd(1), ctdb(1), <a href="http://ctdb.samba.org/" target="_top">http://ctdb.samba.org/</a> + </p></div><div class="refsect1" lang="en"><a name="id2488704"></a><h2>COPYRIGHT/LICENSE</h2><div class="literallayout"><p><br> +Copyright (C) Andrew Tridgell 2007<br> +Copyright (C) Ronnie sahlberg 2007<br> +<br> +This program is free software; you can redistribute it and/or modify<br> +it under the terms of the GNU General Public License as published by<br> +the Free Software Foundation; either version 3 of the License, or (at<br> +your option) any later version.<br> +<br> +This program is distributed in the hope that it will be useful, but<br> +WITHOUT ANY WARRANTY; without even the implied warranty of<br> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br> +General Public License for more details.<br> +<br> +You should have received a copy of the GNU General Public License<br> +along with this program; if not, see http://www.gnu.org/licenses/.<br> +</p></div></div></div></body></html> diff --git a/source4/cluster/ctdb/doc/onnode.1.xml b/source4/cluster/ctdb/doc/onnode.1.xml new file mode 100644 index 0000000000..e044e5fc42 --- /dev/null +++ b/source4/cluster/ctdb/doc/onnode.1.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc"> +<refentry id="onnode.1"> + +<refmeta> + <refentrytitle>onnode</refentrytitle> + <manvolnum>1</manvolnum> +</refmeta> + + +<refnamediv> + <refname>onnode</refname> + <refpurpose>run commands on ctdb nodes</refpurpose> +</refnamediv> + +<refsynopsisdiv> + <cmdsynopsis> + <command>onnode NODE COMMAND ...</command> + </cmdsynopsis> +</refsynopsisdiv> + + <refsect1><title>DESCRIPTION</title> + <para> + onnode is a utility to run commands on a specific node of a CTDB + cluster, or on all nodes. + </para> + <para> + The NODE option specifies which node to run a command on. You + can specify a numeric node number (from 0 to N-1) or the special + node 'all'. + </para> + <para> + The COMMAND can be any shell command. The onnode utility uses + ssh or rsh to connect to the remote nodes and run the command. + </para> + <para> + If the COMMAND starts with a /, then the command is run via the + 'at' service. Otherwise the command is run in the foreground. + </para> + </refsect1> + + <refsect1><title>EXAMPLES</title> + <para> + The following command would show the process ID of ctdb on all nodes + </para> + <screen format="linespecific"> +onnode all pidof ctdbd + </screen> + + <para> + The following command would show the last 5 lines of log on each + node, preceded by the nodes hostname + </para> + <screen format="linespecific"> +onnode all "hostname; tail -5 /var/log/log.ctdb" + </screen> + + <para> + The following command would restart the ctdb service on all nodes. + </para> + <screen format="linespecific"> +onnode all service ctdb restart + </screen> + + </refsect1> + + <refsect1><title>SEE ALSO</title> + <para> + ctdbd(1), ctdb(1), <ulink url="http://ctdb.samba.org/"/> + </para> + </refsect1> + <refsect1><title>COPYRIGHT/LICENSE</title> +<literallayout> +Copyright (C) Andrew Tridgell 2007 +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. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see http://www.gnu.org/licenses/. +</literallayout> + </refsect1> +</refentry> |