1CMAN_TOOL(8) System Manager's Manual CMAN_TOOL(8)
2
3
4
6 cman_tool - Cluster Management Tool
7
9 cman_tool join | leave | kill | expected | votes | version | wait |
10 status | nodes | services [options]
11
13 cman_tool is a program that manages the cluster management subsystem
14 CMAN. cman_tool can be used to join the node to a cluster, leave the
15 cluster, kill another cluster node or change the value of expected
16 votes of a cluster.
17 Be careful that you understand the consequences of the commands issued
18 via cman_tool as they can affect all nodes in your cluster. Most of the
19 time the cman_tool will only be invoked from your startup and shutdown
20 scripts.
21
23 join This is the main use of cman_tool. It instructs the cluster man‐
24 ager to attempt to join an existing cluster or (if no existing
25 cluster exists) then to form a new one on its own.
26 If no options are given to this command then it will take the
27 cluster configuration information from CCS. However, it is pos‐
28 sible to provide all the information on the command-line or to
29 override CCS values by using the command line.
30
31
32 leave Tells CMAN to leave the cluster. You cannot do this if there are
33 subsystems (eg DLM, GFS) active. You should dismount all GFS
34 filesystems, shutdown CLVM, fenced and anything else using the
35 cluster manager before using cman_tool leave. Look at
36 'cman_tool status|services' to see how many (and which) services
37 are running.
38 When a node leaves the cluster, the remaining nodes recalculate
39 quorum and this may block cluster activity if the required num‐
40 ber of votes is not present. If this node is to be down for an
41 extended period of time and you need to keep the cluster run‐
42 ning, add the remove option, and the remaining nodes will recal‐
43 culate quorum such that activity can continue.
44
45
46 kill Tells CMAN to kill another node in the cluster. This will cause
47 the local node to send a "KILL" message to that node and it will
48 shut down. Recovery will occur for the killed node as if it had
49 failed. This is a sort of remote version of "leave force" so
50 only use if if you really know what you are doing.
51
52
53 expected
54 Tells CMAN a new value of expected votes and instructs it to
55 recalculate quorum based on this value.
56 Use this option if your cluster has lost quorum due to nodes
57 failing and you need to get it running again in a hurry.
58
59
60 version
61 Used alone this will report the major, minor, patch and config
62 versions used by CMAN (also displayed in 'cman_tool status'). It
63 can also be used with -r to set a new config version on all
64 cluster members.
65
66
67 wait Waits until the node is a member of the cluster and then
68 returns.
69
70
71 status Displays the local view of the cluster status.
72
73
74 nodes Displays the local view of the cluster nodes.
75
76
77 services
78 Displays the local view of the cluster services.
79
80
82 -w Normally, "cman_tool leave" will fail if the cluster is in tran‐
83 sition (ie another node is joining or leaving the cluster). By
84 adding the -w flag, cman_tool will wait and retry the leave
85 operation repeatedly until it succeeds or a more serious error
86 occurs.
87
88 -t <seconds>
89 If -w is also specified then -t dictates the maximum amount of
90 time cman_tool is prepared to wait. If the operation times out
91 then a status of 2 is returned.
92
93 force Shuts down the cluster manager without first telling any of the
94 subsystems to close down. Use this option with extreme care as
95 it could easily cause data loss.
96
97 remove Tells the rest of the cluster to recalculate quorum such that
98 activity can continue without this node.
99
100
102 -e <expected-votes>
103 The new value of expected votes to use. This will usually be
104 enough to bring the cluster back to life. Values that would
105 cause incorrect quorum will be rejected.
106
107
109 -n <nodename>
110 The node name of the node to be killed. This should be the
111 unqualified node name as it appears in 'cman_tool nodes'.
112
113
115 -r <config_version>
116 The new config version.
117
118
120 -q Waits until the cluster is quorate before returning. -t <sec‐
121 onds> Dictates the maximum amount of time cman_tool is prepared
122 to wait. If the operation times out then a status of 2 is
123 returned.
124
125
127 -X Tells cman_tool to ignore CCS altogether. All of the information
128 necessary to join the cluster must be provided on the command-
129 line. Note that if you get this wrong, it is possible that the
130 node will form a cluster on it's own and ignore a cluster it is
131 supposed to be joining, so this method of invocation is not rec‐
132 ommended.
133
134 -c <clustername>
135 Provides a text name for the cluster. You can have several clus‐
136 ters on one LAN and they are distinguished by this name. Note
137 that the name is hashed to provide a unique number which is what
138 actually distinguishes the cluster, so it is possible that two
139 different names can clash. If this happens, the node will not be
140 allowed into the existing cluster and you will have to pick
141 another name or use different port number for cluster communica‐
142 tion.
143
144 -p <port>
145 UDP port number used for cluster communication. This defaults to
146 6809.
147
148 -v <votes>
149 Number of votes this node has in the cluster. Defaults to 1.
150
151 -e <expected votes>
152 Number of expected votes for the whole cluster. If different
153 nodes provide different values then the highest is used. The
154 cluster will only operate when quorum is reached - that is more
155 than half the available votes are available to the cluster.
156 There is no default for this value. If you are using CCS then
157 ccs_tool will use the total number of votes for all nodes in the
158 configuration file.
159
160 -2 Sets the cluster up for a special "two node only" mode. Because
161 of the quorum requirements mentioned above, a two-node cluster
162 cannot be valid. This option tells the cluster manager that
163 there will only ever be two nodes in the cluster and relies on
164 fencing to ensure cluster integrity. If you specify this you
165 cannot add more nodes without taking down the existing cluster
166 and reconfiguring it. Expected votes should be set to 1 for a
167 two-node cluster.
168
169 -n <nodename>
170 Overrides the node name. By default the unqualified hostname is
171 used. This option can also be used to specify which interface is
172 used for cluster communication as cman_tool will (unless multi‐
173 cast is specified below) use the broadcast address associated
174 with that hostname. If you are using IPv6 then you will have to
175 use multicast rather than broadcast.
176
177 -N <nodeid>
178 Overrides the node ID for this node. Normally, nodes are
179 assigned a node id by the cluster join mechanism. If you want to
180 ensure that your nodes always have the same number regardless of
181 the order in which they join the cluster then you can hard-code
182 these IDs.
183
184 -o <nodename>
185 Override the name this node will have in the cluster. This will
186 normally be the hostname or the first name specified by -n.
187 Note how this differs from -n: -n tells cman_tool how to find
188 the broadcast address and/or the entry in CCS. -o simply changes
189 the name the node will have in the cluster and has no bearing on
190 the actual name of the machine. Use this option will extreme
191 caution. Setting node IDs in CCS is a far better way to do
192 this though. Note that the node's application to join the
193 cluster may be rejected if you try to set the nodeid to one that
194 has already been used, or if the node was previously a member of
195 the cluster but with a different nodeid.
196
197 -m <multicast-address>
198 Specifies a multicast address to use for cluster communication.
199 This is required for IPv6 operation. You should also specify an
200 ethernet interface to bind to this multicast address using the
201 -i option.
202
203 -i <interface>
204 Used in conjunction with -m above to specify the interface for
205 multicast to use.
206
207 -w Join and wait until the node is a cluster member.
208
209 -q Join and wait until the cluster is quorate. If the cluster join
210 fails and -w (or -q) is specified, then it will be retried. Note
211 that cman_tool cannot tell whether the cluster join was rejected
212 by another node for a good reason or that it timed out for some
213 benign reason; so it is strongly recommended that a timeout is
214 also given with the wait options to join. If you don't want join
215 to retry on failure but do want to wait, use the cman_tool join
216 command without -w followed by cman_tool wait.
217
218 -t <seconds>
219 If -w or -q is also specified then -t dictates the maximum
220 amount of time cman_tool is prepared to wait. If the operation
221 times out then a status of 2 is returned. Note that just
222 because cman_tool has given up, does not mean that cman itself
223 has stopped trying to join a cluster.
224
225
226
227Cluster utilities Nov 23 2004 CMAN_TOOL(8)