source: vendor/current/ctdb/doc/ctdb.1

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 42.7 KB
Line 
1'\" t
2.\" Title: ctdb
3.\" Author:
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\" Date: 01/27/2016
6.\" Manual: CTDB - clustered TDB database
7.\" Source: ctdb
8.\" Language: English
9.\"
10.TH "CTDB" "1" "01/27/2016" "ctdb" "CTDB \- clustered TDB database"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31ctdb \- CTDB management utility
32.SH "SYNOPSIS"
33.HP \w'\fBctdb\fR\ 'u
34\fBctdb\fR [\fIOPTION\fR...] {\fICOMMAND\fR} [\fICOMMAND\-ARGS\fR]
35.SH "DESCRIPTION"
36.PP
37ctdb is a utility to view and manage a CTDB cluster\&.
38.PP
39The following terms are used when referring to nodes in a cluster:
40.PP
41PNN
42.RS 4
43Physical Node Number\&. The physical node number is an integer that describes the node in the cluster\&. The first node has physical node number 0\&. in a cluster\&.
44.RE
45.PP
46PNN\-LIST
47.RS 4
48This is either a single PNN, a comma\-separate list of PNNs or "all"\&.
49.RE
50.PP
51Commands that reference a database use the following terms:
52.PP
53DB
54.RS 4
55This is either a database name, such as
56locking\&.tdb
57or a database ID such as "0x42fe72c5"\&.
58.RE
59.PP
60DB\-LIST
61.RS 4
62A space separated list of at least one
63\fIDB\fR\&.
64.RE
65.SH "OPTIONS"
66.PP
67\-n \fIPNN\-LIST\fR
68.RS 4
69The nodes specified by PNN\-LIST should be queried for the requested information\&. Default is to query the daemon running on the local host\&.
70.RE
71.PP
72\-Y
73.RS 4
74Produce output in machine readable form for easier parsing by scripts\&. This uses a field delimiter of \*(Aq:\*(Aq\&. Not all commands support this option\&.
75.RE
76.PP
77\-x \fISEPARATOR\fR
78.RS 4
79Use SEPARATOR to delimit fields in machine readable output\&. This implies \-Y\&.
80.RE
81.PP
82\-X
83.RS 4
84Produce output in machine readable form for easier parsing by scripts\&. This uses a field delimiter of \*(Aq|\*(Aq\&. Not all commands support this option\&.
85.sp
86This is equivalent to "\-x|" and avoids some shell quoting issues\&.
87.RE
88.PP
89\-t \fITIMEOUT\fR
90.RS 4
91Indicates that ctdb should wait up to TIMEOUT seconds for a response to most commands sent to the CTDB daemon\&. The default is 10 seconds\&.
92.RE
93.PP
94\-T \fITIMELIMIT\fR
95.RS 4
96Indicates that TIMELIMIT is the maximum run time (in seconds) for the ctdb command\&. When TIMELIMIT is exceeded the ctdb command will terminate with an error\&. The default is 120 seconds\&.
97.RE
98.PP
99\-? \-\-help
100.RS 4
101Print some help text to the screen\&.
102.RE
103.PP
104\-\-usage
105.RS 4
106Print useage information to the screen\&.
107.RE
108.PP
109\-d \-\-debug=\fIDEBUGLEVEL\fR
110.RS 4
111Change the debug level for the command\&. Default is NOTICE (2)\&.
112.RE
113.PP
114\-\-socket=\fIFILENAME\fR
115.RS 4
116Specify that FILENAME is the name of the Unix domain socket to use when connecting to the local CTDB daemon\&. The default is
117/usr/local/var/run/ctdb/ctdbd\&.socket\&.
118.RE
119.SH "ADMINISTRATIVE COMMANDS"
120.PP
121These are commands used to monitor and administer a CTDB cluster\&.
122.SS "pnn"
123.PP
124This command displays the PNN of the current node\&.
125.SS "xpnn"
126.PP
127This command displays the PNN of the current node without contacting the CTDB daemon\&. It parses the nodes file directly, so can produce unexpected output if the nodes file has been edited but has not been reloaded\&.
128.SS "status"
129.PP
130This command shows the current status of all CTDB nodes based on information from the queried node\&.
131.PP
132Note: If the the queried node is INACTIVE then the status might not be current\&.
133.sp
134.it 1 an-trap
135.nr an-no-space-flag 1
136.nr an-break-flag 1
137.br
138.ps +1
139\fBNode status\fR
140.RS 4
141.PP
142This includes the number of physical nodes and the status of each node\&. See
143\fBctdb\fR(7)
144for information about node states\&.
145.RE
146.sp
147.it 1 an-trap
148.nr an-no-space-flag 1
149.nr an-break-flag 1
150.br
151.ps +1
152\fBGeneration\fR
153.RS 4
154.PP
155The 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\&.
156.PP
157This number does not have any particular meaning other than to keep track of when a cluster has gone through a recovery\&. It is a random number that represents the current instance of a ctdb cluster and its databases\&. The CTDB daemon uses this number internally to be able to tell when commands to operate on the cluster and the databases was issued in a different generation of the cluster, to ensure that commands that operate on the databases will not survive across a cluster database recovery\&. After a recovery, all old outstanding commands will automatically become invalid\&.
158.PP
159Sometimes this number will be shown as "INVALID"\&. This only means that the ctdbd daemon has started but it has not yet merged with the cluster through a recovery\&. All nodes start with generation "INVALID" and are not assigned a real generation id until they have successfully been merged with a cluster through a recovery\&.
160.RE
161.sp
162.it 1 an-trap
163.nr an-no-space-flag 1
164.nr an-break-flag 1
165.br
166.ps +1
167\fBVirtual Node Number (VNN) map\fR
168.RS 4
169.PP
170Consists of the number of virtual nodes and mapping from virtual node numbers to physical node numbers\&. Virtual nodes host CTDB databases\&. Only nodes that are participating in the VNN map can become lmaster or dmaster for database records\&.
171.RE
172.sp
173.it 1 an-trap
174.nr an-no-space-flag 1
175.nr an-break-flag 1
176.br
177.ps +1
178\fBRecovery mode\fR
179.RS 4
180.PP
181This is the current recovery mode of the cluster\&. There are two possible modes:
182.PP
183NORMAL \- The cluster is fully operational\&.
184.PP
185RECOVERY \- 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\&.
186.PP
187Once the recovery master detects an inconsistency, for example a node becomes disconnected/connected, the recovery daemon will trigger a cluster recovery process, where all databases are remerged across the cluster\&. When this process starts, the recovery master will first "freeze" all databases to prevent applications such as samba from accessing the databases and it will also mark the recovery mode as RECOVERY\&.
188.PP
189When the CTDB daemon starts up, it will start in RECOVERY mode\&. Once the node has been merged into a cluster and all databases have been recovered, the node mode will change into NORMAL mode and the databases will be "thawed", allowing samba to access the databases again\&.
190.RE
191.sp
192.it 1 an-trap
193.nr an-no-space-flag 1
194.nr an-break-flag 1
195.br
196.ps +1
197\fBRecovery master\fR
198.RS 4
199.PP
200This 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\&.
201.PP
202Only one node at a time can be the designated recovery master\&. Which node is designated the recovery master is decided by an election process in the recovery daemons running on each node\&.
203.RE
204.sp
205.it 1 an-trap
206.nr an-no-space-flag 1
207.nr an-break-flag 1
208.br
209.ps +1
210\fBExample\fR
211.RS 4
212.sp
213.if n \{\
214.RS 4
215.\}
216.nf
217# ctdb status
218Number of nodes:4
219pnn:0 192\&.168\&.2\&.200 OK (THIS NODE)
220pnn:1 192\&.168\&.2\&.201 OK
221pnn:2 192\&.168\&.2\&.202 OK
222pnn:3 192\&.168\&.2\&.203 OK
223Generation:1362079228
224Size:4
225hash:0 lmaster:0
226hash:1 lmaster:1
227hash:2 lmaster:2
228hash:3 lmaster:3
229Recovery mode:NORMAL (0)
230Recovery master:0
231
232.fi
233.if n \{\
234.RE
235.\}
236.RE
237.SS "nodestatus [\fIPNN\-LIST\fR]"
238.PP
239This command is similar to the
240\fBstatus\fR
241command\&. It displays the "node status" subset of output\&. The main differences are:
242.sp
243.RS 4
244.ie n \{\
245\h'-04'\(bu\h'+03'\c
246.\}
247.el \{\
248.sp -1
249.IP \(bu 2.3
250.\}
251The exit code is the bitwise\-OR of the flags for each specified node, while
252\fBctdb status\fR
253exits with 0 if it was able to retrieve status for all nodes\&.
254.RE
255.sp
256.RS 4
257.ie n \{\
258\h'-04'\(bu\h'+03'\c
259.\}
260.el \{\
261.sp -1
262.IP \(bu 2.3
263.\}
264\fBctdb status\fR
265provides status information for all nodes\&.
266\fBctdb nodestatus\fR
267defaults to providing status for only the current node\&. If PNN\-LIST is provided then status is given for the indicated node(s)\&.
268.RE
269.PP
270A common invocation in scripts is
271\fBctdb nodestatus all\fR
272to check whether all nodes in a cluster are healthy\&.
273.sp
274.it 1 an-trap
275.nr an-no-space-flag 1
276.nr an-break-flag 1
277.br
278.ps +1
279\fBExample\fR
280.RS 4
281.sp
282.if n \{\
283.RS 4
284.\}
285.nf
286# ctdb nodestatus
287pnn:0 10\&.0\&.0\&.30 OK (THIS NODE)
288
289# ctdb nodestatus all
290Number of nodes:2
291pnn:0 10\&.0\&.0\&.30 OK (THIS NODE)
292pnn:1 10\&.0\&.0\&.31 OK
293
294.fi
295.if n \{\
296.RE
297.\}
298.RE
299.SS "recmaster"
300.PP
301This command shows the pnn of the node which is currently the recmaster\&.
302.PP
303Note: If the the queried node is INACTIVE then the status might not be current\&.
304.SS "uptime"
305.PP
306This command shows the uptime for the ctdb daemon\&. When the last recovery or ip\-failover completed and how long it took\&. If the "duration" is shown as a negative number, this indicates that there is a recovery/failover in progress and it started that many seconds ago\&.
307.sp
308.it 1 an-trap
309.nr an-no-space-flag 1
310.nr an-break-flag 1
311.br
312.ps +1
313\fBExample\fR
314.RS 4
315.sp
316.if n \{\
317.RS 4
318.\}
319.nf
320# ctdb uptime
321Current time of node : Thu Oct 29 10:38:54 2009
322Ctdbd start time : (000 16:54:28) Wed Oct 28 17:44:26 2009
323Time of last recovery/failover: (000 16:53:31) Wed Oct 28 17:45:23 2009
324Duration of last recovery/failover: 2\&.248552 seconds
325
326.fi
327.if n \{\
328.RE
329.\}
330.RE
331.SS "listnodes"
332.PP
333This command shows lists the ip addresses of all the nodes in the cluster\&.
334.sp
335.it 1 an-trap
336.nr an-no-space-flag 1
337.nr an-break-flag 1
338.br
339.ps +1
340\fBExample\fR
341.RS 4
342.sp
343.if n \{\
344.RS 4
345.\}
346.nf
347# ctdb listnodes
348192\&.168\&.2\&.200
349192\&.168\&.2\&.201
350192\&.168\&.2\&.202
351192\&.168\&.2\&.203
352
353.fi
354.if n \{\
355.RE
356.\}
357.RE
358.SS "natgwlist"
359.PP
360Show the current NAT gateway master and the status of all nodes in the current NAT gateway group\&. See the
361NAT GATEWAY
362section in
363\fBctdb\fR(7)
364for more details\&.
365.sp
366.it 1 an-trap
367.nr an-no-space-flag 1
368.nr an-break-flag 1
369.br
370.ps +1
371\fBExample\fR
372.RS 4
373.sp
374.if n \{\
375.RS 4
376.\}
377.nf
378# ctdb natgwlist
3790 192\&.168\&.2\&.200
380Number of nodes:4
381pnn:0 192\&.168\&.2\&.200 OK (THIS NODE)
382pnn:1 192\&.168\&.2\&.201 OK
383pnn:2 192\&.168\&.2\&.202 OK
384pnn:3 192\&.168\&.2\&.203 OK
385
386.fi
387.if n \{\
388.RE
389.\}
390.RE
391.SS "ping"
392.PP
393This command will "ping" specified CTDB nodes in the cluster to verify that they are running\&.
394.sp
395.it 1 an-trap
396.nr an-no-space-flag 1
397.nr an-break-flag 1
398.br
399.ps +1
400\fBExample\fR
401.RS 4
402.sp
403.if n \{\
404.RS 4
405.\}
406.nf
407# ctdb ping
408response from 0 time=0\&.000054 sec (3 clients)
409
410.fi
411.if n \{\
412.RE
413.\}
414.RE
415.SS "ifaces"
416.PP
417This command will display the list of network interfaces, which could host public addresses, along with their status\&.
418.sp
419.it 1 an-trap
420.nr an-no-space-flag 1
421.nr an-break-flag 1
422.br
423.ps +1
424\fBExample\fR
425.RS 4
426.sp
427.if n \{\
428.RS 4
429.\}
430.nf
431# ctdb ifaces
432Interfaces on node 0
433name:eth5 link:up references:2
434name:eth4 link:down references:0
435name:eth3 link:up references:1
436name:eth2 link:up references:1
437
438# ctdb \-X ifaces
439|Name|LinkStatus|References|
440|eth5|1|2|
441|eth4|0|0|
442|eth3|1|1|
443|eth2|1|1|
444
445.fi
446.if n \{\
447.RE
448.\}
449.RE
450.SS "ip"
451.PP
452This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip\&. By default this command will ONLY show those public addresses that are known to the node itself\&. To see the full list of all public ips across the cluster you must use "ctdb ip all"\&.
453.sp
454.it 1 an-trap
455.nr an-no-space-flag 1
456.nr an-break-flag 1
457.br
458.ps +1
459\fBExample\fR
460.RS 4
461.sp
462.if n \{\
463.RS 4
464.\}
465.nf
466# ctdb ip \-v
467Public IPs on node 0
468172\&.31\&.91\&.82 node[1] active[] available[eth2,eth3] configured[eth2,eth3]
469172\&.31\&.91\&.83 node[0] active[eth3] available[eth2,eth3] configured[eth2,eth3]
470172\&.31\&.91\&.84 node[1] active[] available[eth2,eth3] configured[eth2,eth3]
471172\&.31\&.91\&.85 node[0] active[eth2] available[eth2,eth3] configured[eth2,eth3]
472172\&.31\&.92\&.82 node[1] active[] available[eth5] configured[eth4,eth5]
473172\&.31\&.92\&.83 node[0] active[eth5] available[eth5] configured[eth4,eth5]
474172\&.31\&.92\&.84 node[1] active[] available[eth5] configured[eth4,eth5]
475172\&.31\&.92\&.85 node[0] active[eth5] available[eth5] configured[eth4,eth5]
476
477# ctdb \-X ip \-v
478|Public IP|Node|ActiveInterface|AvailableInterfaces|ConfiguredInterfaces|
479|172\&.31\&.91\&.82|1||eth2,eth3|eth2,eth3|
480|172\&.31\&.91\&.83|0|eth3|eth2,eth3|eth2,eth3|
481|172\&.31\&.91\&.84|1||eth2,eth3|eth2,eth3|
482|172\&.31\&.91\&.85|0|eth2|eth2,eth3|eth2,eth3|
483|172\&.31\&.92\&.82|1||eth5|eth4,eth5|
484|172\&.31\&.92\&.83|0|eth5|eth5|eth4,eth5|
485|172\&.31\&.92\&.84|1||eth5|eth4,eth5|
486|172\&.31\&.92\&.85|0|eth5|eth5|eth4,eth5|
487
488.fi
489.if n \{\
490.RE
491.\}
492.RE
493.SS "ipinfo \fIIP\fR"
494.PP
495This command will display details about the specified public addresses\&.
496.sp
497.it 1 an-trap
498.nr an-no-space-flag 1
499.nr an-break-flag 1
500.br
501.ps +1
502\fBExample\fR
503.RS 4
504.sp
505.if n \{\
506.RS 4
507.\}
508.nf
509# ctdb ipinfo 172\&.31\&.92\&.85
510Public IP[172\&.31\&.92\&.85] info on node 0
511IP:172\&.31\&.92\&.85
512CurrentNode:0
513NumInterfaces:2
514Interface[1]: Name:eth4 Link:down References:0
515Interface[2]: Name:eth5 Link:up References:2 (active)
516
517.fi
518.if n \{\
519.RE
520.\}
521.RE
522.SS "scriptstatus"
523.PP
524This command displays which scripts where run in the previous monitoring cycle and the result of each script\&. If a script failed with an error, causing the node to become unhealthy, the output from that script is also shown\&.
525.sp
526.it 1 an-trap
527.nr an-no-space-flag 1
528.nr an-break-flag 1
529.br
530.ps +1
531\fBExample\fR
532.RS 4
533.sp
534.if n \{\
535.RS 4
536.\}
537.nf
538# ctdb scriptstatus
5397 scripts were executed last monitoring cycle
54000\&.ctdb Status:OK Duration:0\&.056 Tue Mar 24 18:56:57 2009
54110\&.interface Status:OK Duration:0\&.077 Tue Mar 24 18:56:57 2009
54211\&.natgw Status:OK Duration:0\&.039 Tue Mar 24 18:56:57 2009
54320\&.multipathd Status:OK Duration:0\&.038 Tue Mar 24 18:56:57 2009
54431\&.clamd Status:DISABLED
54540\&.vsftpd Status:OK Duration:0\&.045 Tue Mar 24 18:56:57 2009
54641\&.httpd Status:OK Duration:0\&.039 Tue Mar 24 18:56:57 2009
54750\&.samba Status:ERROR Duration:0\&.082 Tue Mar 24 18:56:57 2009
548OUTPUT:ERROR: Samba tcp port 445 is not responding
549
550.fi
551.if n \{\
552.RE
553.\}
554.RE
555.SS "disablescript \fISCRIPT\fR"
556.PP
557This command is used to disable an eventscript\&.
558.PP
559This will take effect the next time the eventscripts are being executed so it can take a short while until this is reflected in \*(Aqscriptstatus\*(Aq\&.
560.SS "enablescript \fISCRIPT\fR"
561.PP
562This command is used to enable an eventscript\&.
563.PP
564This will take effect the next time the eventscripts are being executed so it can take a short while until this is reflected in \*(Aqscriptstatus\*(Aq\&.
565.SS "listvars"
566.PP
567List all tuneable variables, except the values of the obsolete tunables like VacuumMinInterval\&. The obsolete tunables can be retrieved only explicitly with the "ctdb getvar" command\&.
568.sp
569.it 1 an-trap
570.nr an-no-space-flag 1
571.nr an-break-flag 1
572.br
573.ps +1
574\fBExample\fR
575.RS 4
576.sp
577.if n \{\
578.RS 4
579.\}
580.nf
581# ctdb listvars
582MaxRedirectCount = 3
583SeqnumInterval = 1000
584ControlTimeout = 60
585TraverseTimeout = 20
586KeepaliveInterval = 5
587KeepaliveLimit = 5
588RecoverTimeout = 20
589RecoverInterval = 1
590ElectionTimeout = 3
591TakeoverTimeout = 9
592MonitorInterval = 15
593TickleUpdateInterval = 20
594EventScriptTimeout = 30
595MonitorTimeoutCount = 1
596RecoveryGracePeriod = 120
597RecoveryBanPeriod = 300
598DatabaseHashSize = 100001
599DatabaseMaxDead = 5
600RerecoveryTimeout = 10
601EnableBans = 1
602DeterministicIPs = 0
603LCP2PublicIPs = 1
604ReclockPingPeriod = 60
605NoIPFailback = 0
606DisableIPFailover = 0
607VerboseMemoryNames = 0
608RecdPingTimeout = 60
609RecdFailCount = 10
610LogLatencyMs = 0
611RecLockLatencyMs = 1000
612RecoveryDropAllIPs = 120
613VacuumInterval = 10
614VacuumMaxRunTime = 30
615RepackLimit = 10000
616VacuumLimit = 5000
617VacuumFastPathCount = 60
618MaxQueueDropMsg = 1000000
619UseStatusEvents = 0
620AllowUnhealthyDBRead = 0
621StatHistoryInterval = 1
622DeferredAttachTO = 120
623AllowClientDBAttach = 1
624RecoverPDBBySeqNum = 0
625
626.fi
627.if n \{\
628.RE
629.\}
630.RE
631.SS "getvar \fINAME\fR"
632.PP
633Get the runtime value of a tuneable variable\&.
634.sp
635.it 1 an-trap
636.nr an-no-space-flag 1
637.nr an-break-flag 1
638.br
639.ps +1
640\fBExample\fR
641.RS 4
642.sp
643.if n \{\
644.RS 4
645.\}
646.nf
647# ctdb getvar MaxRedirectCount
648MaxRedirectCount = 3
649
650.fi
651.if n \{\
652.RE
653.\}
654.RE
655.SS "setvar \fINAME\fR \fIVALUE\fR"
656.PP
657Set the runtime value of a tuneable variable\&.
658.PP
659Example: ctdb setvar MaxRedirectCount 5
660.SS "lvsmaster"
661.PP
662This command shows which node is currently the LVSMASTER\&. The LVSMASTER is the node in the cluster which drives the LVS system and which receives all incoming traffic from clients\&.
663.PP
664LVS is the mode where the entire CTDB/Samba cluster uses a single ip address for the entire cluster\&. In this mode all clients connect to one specific node which will then multiplex/loadbalance the clients evenly onto the other nodes in the cluster\&. This is an alternative to using public ip addresses\&. See the manpage for ctdbd for more information about LVS\&.
665.SS "lvs"
666.PP
667This command shows which nodes in the cluster are currently active in the LVS configuration\&. I\&.e\&. which nodes we are currently loadbalancing the single ip address across\&.
668.PP
669LVS will by default only loadbalance across those nodes that are both LVS capable and also HEALTHY\&. Except if all nodes are UNHEALTHY in which case LVS will loadbalance across all UNHEALTHY nodes as well\&. LVS will never use nodes that are DISCONNECTED, STOPPED, BANNED or DISABLED\&.
670.PP
671Example output:
672.sp
673.if n \{\
674.RS 4
675.\}
676.nf
6772:10\&.0\&.0\&.13
6783:10\&.0\&.0\&.14
679
680.fi
681.if n \{\
682.RE
683.\}
684.SS "getcapabilities"
685.PP
686This command shows the capabilities of the current node\&. See the
687CAPABILITIES
688section in
689\fBctdb\fR(7)
690for more details\&.
691.PP
692Example output:
693.sp
694.if n \{\
695.RS 4
696.\}
697.nf
698RECMASTER: YES
699LMASTER: YES
700LVS: NO
701
702.fi
703.if n \{\
704.RE
705.\}
706.SS "statistics"
707.PP
708Collect statistics from the CTDB daemon about how many calls it has served\&. Information about various fields in statistics can be found in
709\fBctdb-statistics\fR(7)\&.
710.sp
711.it 1 an-trap
712.nr an-no-space-flag 1
713.nr an-break-flag 1
714.br
715.ps +1
716\fBExample\fR
717.RS 4
718.sp
719.if n \{\
720.RS 4
721.\}
722.nf
723# ctdb statistics
724CTDB version 1
725num_clients 3
726frozen 0
727recovering 0
728client_packets_sent 360489
729client_packets_recv 360466
730node_packets_sent 480931
731node_packets_recv 240120
732keepalive_packets_sent 4
733keepalive_packets_recv 3
734node
735req_call 2
736reply_call 2
737req_dmaster 0
738reply_dmaster 0
739reply_error 0
740req_message 42
741req_control 120408
742reply_control 360439
743client
744req_call 2
745req_message 24
746req_control 360440
747timeouts
748call 0
749control 0
750traverse 0
751total_calls 2
752pending_calls 0
753lockwait_calls 0
754pending_lockwait_calls 0
755memory_used 5040
756max_hop_count 0
757max_call_latency 4\&.948321 sec
758max_lockwait_latency 0\&.000000 sec
759
760.fi
761.if n \{\
762.RE
763.\}
764.RE
765.SS "statisticsreset"
766.PP
767This command is used to clear all statistics counters in a node\&.
768.PP
769Example: ctdb statisticsreset
770.SS "dbstatistics \fIDB\fR"
771.PP
772Display statistics about the database DB\&. Information about various fields in dbstatistics can be found in
773\fBctdb-statistics\fR(7)\&.
774.sp
775.it 1 an-trap
776.nr an-no-space-flag 1
777.nr an-break-flag 1
778.br
779.ps +1
780\fBExample\fR
781.RS 4
782.sp
783.if n \{\
784.RS 4
785.\}
786.nf
787# ctdb dbstatistics locking\&.tdb
788DB Statistics: locking\&.tdb
789 ro_delegations 0
790 ro_revokes 0
791 locks
792 total 14356
793 failed 0
794 current 0
795 pending 0
796 hop_count_buckets: 28087 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0
797 lock_buckets: 0 14188 38 76 32 19 3 0 0 0 0 0 0 0 0 0
798 locks_latency MIN/AVG/MAX 0\&.001066/0\&.012686/4\&.202292 sec out of 14356
799 Num Hot Keys: 1
800 Count:8 Key:ff5bd7cb3ee3822edc1f0000000000000000000000000000
801
802.fi
803.if n \{\
804.RE
805.\}
806.RE
807.SS "getreclock"
808.PP
809Show the name of the recovery lock file, if any\&.
810.PP
811Example output:
812.sp
813.if n \{\
814.RS 4
815.\}
816.nf
817 Reclock file:/clusterfs/\&.ctdb/recovery\&.lock
818
819.fi
820.if n \{\
821.RE
822.\}
823.SS "setreclock [\fIFILE\fR]"
824.PP
825FILE specifies the name of the recovery lock file\&. If the recovery lock file is changed at run\-time then this will cause a recovery, which in turn causes the recovery lock to be retaken\&.
826.PP
827If no FILE is specified then a recovery lock file will no longer be used\&.
828.PP
829This command only affects the run\-time setting of a single CTDB node\&. This setting
830\fImust\fR
831be changed on all nodes simultaneously\&. For information about configuring the recovery lock file please see the
832CTDB_RECOVERY_LOCK
833entry in
834\fBctdbd.conf\fR(5)
835and the
836\-\-reclock
837entry in
838\fBctdbd\fR(1)\&. For information about the recovery lock please see the
839RECOVERY LOCK
840section in
841\fBctdb\fR(7)\&.
842.SS "getdebug"
843.PP
844Get the current debug level for the node\&. the debug level controls what information is written to the log file\&.
845.PP
846The debug levels are mapped to the corresponding syslog levels\&. When a debug level is set, only those messages at that level and higher levels will be printed\&.
847.PP
848The list of debug levels from highest to lowest are :
849.PP
850ERR WARNING NOTICE INFO DEBUG
851.SS "setdebug \fIDEBUGLEVEL\fR"
852.PP
853Set the debug level of a node\&. This controls what information will be logged\&.
854.PP
855The debuglevel is one of ERR WARNING NOTICE INFO DEBUG
856.SS "getpid"
857.PP
858This command will return the process id of the ctdb daemon\&.
859.SS "disable"
860.PP
861This 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\&.
862.SS "enable"
863.PP
864Re\-enable a node that has been administratively disabled\&.
865.SS "stop"
866.PP
867This command is used to administratively STOP a node in the cluster\&. A STOPPED node is connected to the cluster but will not host any public ip addresse, nor does it participate in the VNNMAP\&. The difference between a DISABLED node and a STOPPED node is that a STOPPED node does not host any parts of the database which means that a recovery is required to stop/continue nodes\&.
868.SS "continue"
869.PP
870Re\-start a node that has been administratively stopped\&.
871.SS "addip \fIIPADDR\fR/\fImask\fR \fIIFACE\fR"
872.PP
873This command is used to add a new public ip to a node during runtime\&. This allows public addresses to be added to a cluster without having to restart the ctdb daemons\&.
874.PP
875Note that this only updates the runtime instance of ctdb\&. Any changes will be lost next time ctdb is restarted and the public addresses file is re\-read\&. If you want this change to be permanent you must also update the public addresses file manually\&.
876.SS "delip \fIIPADDR\fR"
877.PP
878This command is used to remove a public ip from a node during runtime\&. If this public ip is currently hosted by the node it being removed from, the ip will first be failed over to another node, if possible, before it is removed\&.
879.PP
880Note that this only updates the runtime instance of ctdb\&. Any changes will be lost next time ctdb is restarted and the public addresses file is re\-read\&. If you want this change to be permanent you must also update the public addresses file manually\&.
881.SS "moveip \fIIPADDR\fR \fIPNN\fR"
882.PP
883This command can be used to manually fail a public ip address to a specific node\&.
884.PP
885In order to manually override the "automatic" distribution of public ip addresses that ctdb normally provides, this command only works when you have changed the tunables for the daemon to:
886.PP
887DeterministicIPs = 0
888.PP
889NoIPFailback = 1
890.SS "shutdown"
891.PP
892This command will shutdown a specific CTDB daemon\&.
893.SS "setlmasterrole on|off"
894.PP
895This command is used ot enable/disable the LMASTER capability for a node at runtime\&. This capability determines whether or not a node can be used as an LMASTER for records in the database\&. A node that does not have the LMASTER capability will not show up in the vnnmap\&.
896.PP
897Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command\&.
898.PP
899Once this setting has been enabled/disabled, you need to perform a recovery for it to take effect\&.
900.PP
901See also "ctdb getcapabilities"
902.SS "setrecmasterrole on|off"
903.PP
904This command is used ot enable/disable the RECMASTER capability for a node at runtime\&. This capability determines whether or not a node can be used as an RECMASTER for the cluster\&. A node that does not have the RECMASTER capability can not win a recmaster election\&. A node that already is the recmaster for the cluster when the capability is stripped off the node will remain the recmaster until the next cluster election\&.
905.PP
906Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command\&.
907.PP
908See also "ctdb getcapabilities"
909.SS "reloadnodes"
910.PP
911This command is used when adding new nodes, or removing existing nodes from an existing cluster\&.
912.PP
913Procedure to add nodes:
914.sp
915.RS 4
916.ie n \{\
917\h'-04' 1.\h'+01'\c
918.\}
919.el \{\
920.sp -1
921.IP " 1." 4.2
922.\}
923To expand an existing cluster, first ensure with
924\fBctdb status\fR
925that all nodes are up and running and that they are all healthy\&. Do not try to expand a cluster unless it is completely healthy!
926.RE
927.sp
928.RS 4
929.ie n \{\
930\h'-04' 2.\h'+01'\c
931.\}
932.el \{\
933.sp -1
934.IP " 2." 4.2
935.\}
936On all nodes, edit
937/usr/local/etc/ctdb/nodes
938and
939\fIadd the new nodes at the end of this file\fR\&.
940.RE
941.sp
942.RS 4
943.ie n \{\
944\h'-04' 3.\h'+01'\c
945.\}
946.el \{\
947.sp -1
948.IP " 3." 4.2
949.\}
950Verify that all the nodes have identical
951/usr/local/etc/ctdb/nodes
952files after adding the new nodes\&.
953.RE
954.sp
955.RS 4
956.ie n \{\
957\h'-04' 4.\h'+01'\c
958.\}
959.el \{\
960.sp -1
961.IP " 4." 4.2
962.\}
963Run
964\fBctdb reloadnodes\fR
965to force all nodes to reload the nodes file\&.
966.RE
967.sp
968.RS 4
969.ie n \{\
970\h'-04' 5.\h'+01'\c
971.\}
972.el \{\
973.sp -1
974.IP " 5." 4.2
975.\}
976Use
977\fBctdb status\fR
978on all nodes and verify that they now show the additional nodes\&.
979.RE
980.sp
981.RS 4
982.ie n \{\
983\h'-04' 6.\h'+01'\c
984.\}
985.el \{\
986.sp -1
987.IP " 6." 4.2
988.\}
989Install and configure the new node and bring it online\&.
990.RE
991.PP
992Procedure to remove nodes:
993.sp
994.RS 4
995.ie n \{\
996\h'-04' 1.\h'+01'\c
997.\}
998.el \{\
999.sp -1
1000.IP " 1." 4.2
1001.\}
1002To remove nodes from an existing cluster, first ensure with
1003\fBctdb status\fR
1004that all nodes, except the node to be deleted, are up and running and that they are all healthy\&. Do not try to remove nodes from a cluster unless the cluster is completely healthy!
1005.RE
1006.sp
1007.RS 4
1008.ie n \{\
1009\h'-04' 2.\h'+01'\c
1010.\}
1011.el \{\
1012.sp -1
1013.IP " 2." 4.2
1014.\}
1015Shutdown and power off the node to be removed\&.
1016.RE
1017.sp
1018.RS 4
1019.ie n \{\
1020\h'-04' 3.\h'+01'\c
1021.\}
1022.el \{\
1023.sp -1
1024.IP " 3." 4.2
1025.\}
1026On all other nodes, edit the
1027/usr/local/etc/ctdb/nodes
1028file and
1029\fIcomment out\fR
1030the nodes to be removed\&.
1031\fIDo not delete the lines for the deleted nodes\fR, just comment them out by adding a \*(Aq#\*(Aq at the beginning of the lines\&.
1032.RE
1033.sp
1034.RS 4
1035.ie n \{\
1036\h'-04' 4.\h'+01'\c
1037.\}
1038.el \{\
1039.sp -1
1040.IP " 4." 4.2
1041.\}
1042Run
1043\fBctdb reloadnodes\fR
1044to force all nodes to reload the nodes file\&.
1045.RE
1046.sp
1047.RS 4
1048.ie n \{\
1049\h'-04' 5.\h'+01'\c
1050.\}
1051.el \{\
1052.sp -1
1053.IP " 5." 4.2
1054.\}
1055Use
1056\fBctdb status\fR
1057on all nodes and verify that the deleted nodes are no longer listed\&.
1058.RE
1059.SS "reloadips [\fIPNN\-LIST\fR]"
1060.PP
1061This command reloads the public addresses configuration file on the specified nodes\&. When it completes addresses will be reconfigured and reassigned across the cluster as necessary\&.
1062.SS "getdbmap"
1063.PP
1064This command lists all clustered TDB databases that the CTDB daemon has attached to\&. Some databases are flagged as PERSISTENT, this means that the database stores data persistently and the data will remain across reboots\&. One example of such a database is secrets\&.tdb where information about how the cluster was joined to the domain is stored\&.
1065.PP
1066If a PERSISTENT database is not in a healthy state the database is flagged as UNHEALTHY\&. If there\*(Aqs at least one completely healthy node running in the cluster, it\*(Aqs possible that the content is restored by a recovery run automaticly\&. Otherwise an administrator needs to analyze the problem\&.
1067.PP
1068See also "ctdb getdbstatus", "ctdb backupdb", "ctdb restoredb", "ctdb dumpbackup", "ctdb wipedb", "ctdb setvar AllowUnhealthyDBRead 1" and (if samba or tdb\-utils are installed) "tdbtool check"\&.
1069.PP
1070Most databases are not persistent and only store the state information that the currently running samba daemons need\&. These databases are always wiped when ctdb/samba starts and when a node is rebooted\&.
1071.sp
1072.it 1 an-trap
1073.nr an-no-space-flag 1
1074.nr an-break-flag 1
1075.br
1076.ps +1
1077\fBExample\fR
1078.RS 4
1079.sp
1080.if n \{\
1081.RS 4
1082.\}
1083.nf
1084# ctdb getdbmap
1085Number of databases:10
1086dbid:0x435d3410 name:notify\&.tdb path:/usr/local/var/lib/ctdb/notify\&.tdb\&.0
1087dbid:0x42fe72c5 name:locking\&.tdb path:/usr/local/var/lib/ctdb/locking\&.tdb\&.0
1088dbid:0x1421fb78 name:brlock\&.tdb path:/usr/local/var/lib/ctdb/brlock\&.tdb\&.0
1089dbid:0x17055d90 name:connections\&.tdb path:/usr/local/var/lib/ctdb/connections\&.tdb\&.0
1090dbid:0xc0bdde6a name:sessionid\&.tdb path:/usr/local/var/lib/ctdb/sessionid\&.tdb\&.0
1091dbid:0x122224da name:test\&.tdb path:/usr/local/var/lib/ctdb/test\&.tdb\&.0
1092dbid:0x2672a57f name:idmap2\&.tdb path:/usr/local/var/lib/ctdb/persistent/idmap2\&.tdb\&.0 PERSISTENT
1093dbid:0xb775fff6 name:secrets\&.tdb path:/usr/local/var/lib/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT
1094dbid:0xe98e08b6 name:group_mapping\&.tdb path:/usr/local/var/lib/ctdb/persistent/group_mapping\&.tdb\&.0 PERSISTENT
1095dbid:0x7bbbd26c name:passdb\&.tdb path:/usr/local/var/lib/ctdb/persistent/passdb\&.tdb\&.0 PERSISTENT
1096
1097# ctdb getdbmap # example for unhealthy database
1098Number of databases:1
1099dbid:0xb775fff6 name:secrets\&.tdb path:/usr/local/var/lib/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT UNHEALTHY
1100
1101# ctdb \-X getdbmap
1102|ID|Name|Path|Persistent|Unhealthy|
1103|0x7bbbd26c|passdb\&.tdb|/usr/local/var/lib/ctdb/persistent/passdb\&.tdb\&.0|1|0|
1104
1105.fi
1106.if n \{\
1107.RE
1108.\}
1109.RE
1110.SS "backupdb \fIDB\fR \fIFILE\fR"
1111.PP
1112Copy the contents of database DB to FILE\&. FILE can later be read back using
1113\fBrestoredb\fR\&. This is mainly useful for backing up persistent databases such as
1114secrets\&.tdb
1115and similar\&.
1116.SS "restoredb \fIFILE\fR [\fIDB\fR]"
1117.PP
1118This command restores a persistent database that was previously backed up using backupdb\&. By default the data will be restored back into the same database as it was created from\&. By specifying dbname you can restore the data into a different database\&.
1119.SS "setdbreadonly \fIDB\fR"
1120.PP
1121This command will enable the read\-only record support for a database\&. This is an experimental feature to improve performance for contended records primarily in locking\&.tdb and brlock\&.tdb\&. When enabling this feature you must set it on all nodes in the cluster\&.
1122.SS "setdbsticky \fIDB\fR"
1123.PP
1124This command will enable the sticky record support for the specified database\&. This is an experimental feature to improve performance for contended records primarily in locking\&.tdb and brlock\&.tdb\&. When enabling this feature you must set it on all nodes in the cluster\&.
1125.SH "INTERNAL COMMANDS"
1126.PP
1127Internal commands are used by CTDB\*(Aqs scripts and are not required for managing a CTDB cluster\&. Their parameters and behaviour are subject to change\&.
1128.SS "gettickles \fIIPADDR\fR"
1129.PP
1130Show TCP connections that are registered with CTDB to be "tickled" if there is a failover\&.
1131.SS "gratiousarp \fIIPADDR\fR \fIINTERFACE\fR"
1132.PP
1133Send out a gratious ARP for the specified interface through the specified interface\&. This command is mainly used by the ctdb eventscripts\&.
1134.SS "killtcp"
1135.PP
1136Read a list of TCP connections, one per line, from standard input and terminate each connection\&. A connection is specified as:
1137.sp
1138.if n \{\
1139.RS 4
1140.\}
1141.nf
1142 \fISRC\-IPADDR\fR:\fISRC\-PORT\fR \fIDST\-IPADDR\fR:\fIDST\-PORT\fR
1143
1144.fi
1145.if n \{\
1146.RE
1147.\}
1148.PP
1149Each connection is terminated by issuing a TCP RST to the SRC\-IPADDR:SRC\-PORT endpoint\&.
1150.PP
1151A single connection can be specified on the command\-line rather than on standard input\&.
1152.SS "pdelete \fIDB\fR \fIKEY\fR"
1153.PP
1154Delete KEY from DB\&.
1155.SS "pfetch \fIDB\fR \fIKEY\fR"
1156.PP
1157Print the value associated with KEY in DB\&.
1158.SS "pstore \fIDB\fR \fIKEY\fR \fIFILE\fR"
1159.PP
1160Store KEY in DB with contents of FILE as the associated value\&.
1161.SS "ptrans \fIDB\fR [\fIFILE\fR]"
1162.PP
1163Read a list of key\-value pairs, one per line from FILE, and store them in DB using a single transaction\&. An empty value is equivalent to deleting the given key\&.
1164.PP
1165The key and value should be separated by spaces or tabs\&. Each key/value should be a printable string enclosed in double\-quotes\&.
1166.SS "runstate [setup|first_recovery|startup|running]"
1167.PP
1168Print the runstate of the specified node\&. Runstates are used to serialise important state transitions in CTDB, particularly during startup\&.
1169.PP
1170If one or more optional runstate arguments are specified then the node must be in one of these runstates for the command to succeed\&.
1171.sp
1172.it 1 an-trap
1173.nr an-no-space-flag 1
1174.nr an-break-flag 1
1175.br
1176.ps +1
1177\fBExample\fR
1178.RS 4
1179.sp
1180.if n \{\
1181.RS 4
1182.\}
1183.nf
1184# ctdb runstate
1185RUNNING
1186
1187.fi
1188.if n \{\
1189.RE
1190.\}
1191.RE
1192.SS "setifacelink \fIIFACE\fR up|down"
1193.PP
1194Set the internal state of network interface IFACE\&. This is typically used in the
119510\&.interface
1196script in the "monitor" event\&.
1197.PP
1198Example: ctdb setifacelink eth0 up
1199.SS "tickle \fISRC\-IPADDR\fR:\fISRC\-PORT\fR \fIDST\-IPADDR\fR:\fIDST\-PORT\fR"
1200.PP
1201Send 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\&.
1202.PP
1203TCP 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\&.
1204.SS "version"
1205.PP
1206Display the CTDB version\&.
1207.SH "DEBUGGING COMMANDS"
1208.PP
1209These commands are primarily used for CTDB development and testing and should not be used for normal administration\&.
1210.SS "OPTIONS"
1211.PP
1212\-\-print\-emptyrecords
1213.RS 4
1214This enables printing of empty records when dumping databases with the catdb, cattbd and dumpdbbackup commands\&. Records with empty data segment are considered deleted by ctdb and cleaned by the vacuuming mechanism, so this switch can come in handy for debugging the vacuuming behaviour\&.
1215.RE
1216.PP
1217\-\-print\-datasize
1218.RS 4
1219This lets database dumps (catdb, cattdb, dumpdbbackup) print the size of the record data instead of dumping the data contents\&.
1220.RE
1221.PP
1222\-\-print\-lmaster
1223.RS 4
1224This lets catdb print the lmaster for each record\&.
1225.RE
1226.PP
1227\-\-print\-hash
1228.RS 4
1229This lets database dumps (catdb, cattdb, dumpdbbackup) print the hash for each record\&.
1230.RE
1231.PP
1232\-\-print\-recordflags
1233.RS 4
1234This lets catdb and dumpdbbackup print the record flags for each record\&. Note that cattdb always prints the flags\&.
1235.RE
1236.SS "process\-exists \fIPID\fR"
1237.PP
1238This 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\&.
1239.SS "getdbstatus \fIDB\fR"
1240.PP
1241This command displays more details about a database\&.
1242.sp
1243.it 1 an-trap
1244.nr an-no-space-flag 1
1245.nr an-break-flag 1
1246.br
1247.ps +1
1248\fBExample\fR
1249.RS 4
1250.sp
1251.if n \{\
1252.RS 4
1253.\}
1254.nf
1255# ctdb getdbstatus test\&.tdb\&.0
1256dbid: 0x122224da
1257name: test\&.tdb
1258path: /usr/local/var/lib/ctdb/test\&.tdb\&.0
1259PERSISTENT: no
1260HEALTH: OK
1261
1262# ctdb getdbstatus registry\&.tdb # with a corrupted TDB
1263dbid: 0xf2a58948
1264name: registry\&.tdb
1265path: /usr/local/var/lib/ctdb/persistent/registry\&.tdb\&.0
1266PERSISTENT: yes
1267HEALTH: NO\-HEALTHY\-NODES \- ERROR \- Backup of corrupted TDB in \*(Aq/usr/local/var/lib/ctdb/persistent/registry\&.tdb\&.0\&.corrupted\&.20091208091949\&.0Z\*(Aq
1268
1269.fi
1270.if n \{\
1271.RE
1272.\}
1273.RE
1274.SS "catdb \fIDB\fR"
1275.PP
1276Print a dump of the clustered TDB database DB\&.
1277.SS "cattdb \fIDB\fR"
1278.PP
1279Print a dump of the contents of the local TDB database DB\&.
1280.SS "dumpdbbackup \fIFILE\fR"
1281.PP
1282Print a dump of the contents from database backup FILE, similar to
1283\fBcatdb\fR\&.
1284.SS "wipedb \fIDB\fR"
1285.PP
1286Remove all contents of database DB\&.
1287.SS "recover"
1288.PP
1289This command will trigger the recovery daemon to do a cluster recovery\&.
1290.SS "ipreallocate, sync"
1291.PP
1292This command will force the recovery master to perform a full ip reallocation process and redistribute all ip addresses\&. This is useful to "reset" the allocations back to its default state if they have been changed using the "moveip" command\&. While a "recover" will also perform this reallocation, a recovery is much more hevyweight since it will also rebuild all the databases\&.
1293.SS "getmonmode"
1294.PP
1295This command returns the monutoring mode of a node\&. The monitoring mode is either ACTIVE or DISABLED\&. Normally a node will continuously monitor that all other nodes that are expected are in fact connected and that they respond to commands\&.
1296.PP
1297ACTIVE \- 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\&.
1298.PP
1299DISABLED \- 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\&.
1300.SS "setmonmode 0|1"
1301.PP
1302This command can be used to explicitly disable/enable monitoring mode on a node\&. The main purpose is if one wants to attach GDB to a running ctdb daemon but wants to prevent the other nodes from marking it as DISCONNECTED and issuing a recovery\&. To do this, set monitoring mode to 0 on all nodes before attaching with GDB\&. Remember to set monitoring mode back to 1 afterwards\&.
1303.SS "attach \fIDBNAME\fR [persistent]"
1304.PP
1305Create a new CTDB database called DBNAME and attach to it on all nodes\&.
1306.SS "detach \fIDB\-LIST\fR"
1307.PP
1308Detach specified non\-persistent database(s) from the cluster\&. This command will disconnect specified database(s) on all nodes in the cluster\&. This command should only be used when none of the specified database(s) are in use\&.
1309.PP
1310All nodes should be active and tunable AllowClientDBAccess should be disabled on all nodes before detaching databases\&.
1311.SS "dumpmemory"
1312.PP
1313This is a debugging command\&. This command will make the ctdb daemon to write a fill memory allocation map to standard output\&.
1314.SS "rddumpmemory"
1315.PP
1316This is a debugging command\&. This command will dump the talloc memory allocation tree for the recovery daemon to standard output\&.
1317.SS "thaw"
1318.PP
1319Thaw a previously frozen node\&.
1320.SS "eventscript \fIARGUMENTS\fR"
1321.PP
1322This is a debugging command\&. This command can be used to manually invoke and run the eventscritps with arbitrary arguments\&.
1323.SS "ban \fIBANTIME\fR"
1324.PP
1325Administratively ban a node for BANTIME seconds\&. The node will be unbanned after BANTIME seconds have elapsed\&.
1326.PP
1327A banned node does not participate in the cluster\&. It does not host any records for the clustered TDB and does not host any public IP addresses\&.
1328.PP
1329Nodes are automatically banned if they misbehave\&. For example, a node may be banned if it causes too many cluster recoveries\&.
1330.PP
1331To administratively exclude a node from a cluster use the
1332\fBstop\fR
1333command\&.
1334.SS "unban"
1335.PP
1336This command is used to unban a node that has either been administratively banned using the ban command or has been automatically banned\&.
1337.SS "rebalancenode [\fIPNN\-LIST\fR]"
1338.PP
1339This command marks the given nodes as rebalance targets in the LCP2 IP allocation algorithm\&. The
1340\fBreloadips\fR
1341command will do this as necessary so this command should not be needed\&.
1342.SS "check_srvids \fISRVID\fR \&.\&.\&."
1343.PP
1344This command checks whether a set of srvid message ports are registered on the node or not\&. The command takes a list of values to check\&.
1345.sp
1346.it 1 an-trap
1347.nr an-no-space-flag 1
1348.nr an-break-flag 1
1349.br
1350.ps +1
1351\fBExample\fR
1352.RS 4
1353.sp
1354.if n \{\
1355.RS 4
1356.\}
1357.nf
1358# ctdb check_srvids 1 2 3 14765
1359Server id 0:1 does not exist
1360Server id 0:2 does not exist
1361Server id 0:3 does not exist
1362Server id 0:14765 exists
1363
1364.fi
1365.if n \{\
1366.RE
1367.\}
1368.RE
1369.SH "SEE ALSO"
1370.PP
1371\fBctdbd\fR(1),
1372\fBonnode\fR(1),
1373\fBctdb\fR(7),
1374\fBctdb-statistics\fR(7),
1375\fBctdb-tunables\fR(7),
1376\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
1377.SH "AUTHOR"
1378.br
1379.PP
1380This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke
1381.SH "COPYRIGHT"
1382.br
1383Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
1384.br
1385.PP
1386This 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\&.
1387.PP
1388This 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\&.
1389.PP
1390You should have received a copy of the GNU General Public License along with this program; if not, see
1391\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
1392.sp
Note: See TracBrowser for help on using the repository browser.