<commit_before>.TH CMAN_TOOL 8 "Nov 23 2004" "Cluster utilities"

.SH NAME
cman_tool \- Cluster Management Tool
.SH SYNOPSIS
.B cman_tool join | leave | expected | kill | version [options]
.br
.SH DESCRIPTION
.PP
.B cman_tool
is a program that manages the cluster management subsystem CMAN. cman_tool
can be used to join the node to a cluster, leave the cluster, kill another
cluster node or change the value of expected votes of a cluster.
.br
Be careful that you understand the consequences of the commands issued via cman_tool
as they can affect all nodes in your cluster. Most of the time the cman_tool
will only be invoked from your startup and shutdown scripts.
.br
.SH SUBCOMMANDS
.TP
.I join
This is the main use of cman_tool. It instructs the cluster manager to attempt
to join an existing cluster or (if no existing cluster exists) then to form
a new one on its own.
.br
If no options are given to this command then it will take the cluster 
configuration information from CCS. However, it is possible to provide 
all the information on the command-line or to override CCS values by using
the command line.

.TP
.I leave
Tells CMAN to leave the cluster. You cannot do this if there are subsystems
(eg DLM, GFS) active. You should dismount all GFS filesystems,
shutdown CLVM, fence and anything else using the cluster manager before
using 
.B cman_tool leave.
Look in /proc/cluster/services and /proc/cluster/status
to see how many (and which) services are running.
.br
When a node leaves the cluster, the remaining nodes recalculate quorum and this
may block cluster activity if the required number of votes is not present.
If this node is to be down for an extended period of time and you need to
keep the cluster running, add the
.B remove
option, and the remaining nodes will recalculate quorum such that activity 
can continue.

.TP
.I kill
Tells CMAN to kill another node in the cluster. This will cause the local
node to send a "KILL" message to that node and it will shut down.  Recovery
will occur for the killed node as if it had failed.  This is a sort of remote
version of "leave force" so only use if if you really know what you are doing.

.TP
.I expected
Tells CMAN a new value of expected votes and instructs it to recalculate
quorum based on this value. 
.br
Use this option if your cluster has lost quorum due to nodes failing and
you need to get it running again in a hurry.

.TP
.I version
Used alone this will report the major, minor, patch and config versions
used by CMAN (also displayed in /proc/cluster/status). It can also be used
with -r to set a new config version on all cluster members.

.SH "LEAVE" OPTIONS
.TP
.I force
Shuts down the cluster manager without first telling any of the subsystems
to close down. Use this option with extreme care as it could easily cause data
loss.
.TP
.I remove
Tells the rest of the cluster to recalculate quorum such that activity can
continue without this node.

.SH "EXPECTED" OPTIONS
.TP
.I -e <expected-votes>
The new value of expected votes to use. This will usually be enough
to bring the cluster back to life. Values that would cause incorrect
quorum will be rejected.

.SH "KILL" OPTIONS
.TP
.I -n <nodename>
The node name of the node to be killed. This should be the unqualified node
name as it appears in /proc/cluster/nodes.

.SH "VERSION" OPTIONS
.TP
.I -r <config_version>
The new config version.

.br
.SH "JOIN" OPTIONS
.TP
.I -X
Tells cman_tool to ignore CCS altogether. All of the information necessary
to join the cluster must be provided on the command-line. Note that if
you get this wrong, it is possible that the node will form a cluster on
it's own and ignore a cluster it is supposed to be joining, so this method
of invocation is not recommended.
.TP
.I -c <clustername>
Provides a text name for the cluster. You can have several clusters on one
LAN and they are distinguished by this name. Note that the name is hashed to 
provide a unique number which is what actually distinguishes the cluster, so
it is possible that two different names can clash. If this happens, the node
will not be allowed into the existing cluster and you will have to pick 
another name or use different port number for cluster communication.
.TP
.I -p <port>
UDP port number used for cluster communication. This defaults to 6809.
.TP
.I -v <votes>
Number of votes this node has in the cluster. Defaults to 1.
.TP
.I -e <expected votes>
Number of expected votes for the whole cluster. If different nodes 
provide different values then the highest is used. The cluster will
only operate when quorum is reached - that is more than half the
available votes are available to the cluster. There is no default for
this value. If you are using CCS then ccs_tool will use the total
number of votes for all nodes in the configuration file.
.TP
.I -2
Sets the cluster up for a special "two node only" mode. Because of the
quorum requirements mentioned above, a two-node cluster cannot be valid.
This option tells the cluster manager that there will only ever be two
nodes in the cluster and relies on fencing to ensure cluster integrity.
If you specify this you cannot add more nodes without taking down the 
existing cluster and reconfiguring it. Expected votes should be set to
1 for a two-node cluster.
.TP
.I -n <nodename>
Overrides the node name. By default the unqualified hostname is used. This
option can also be used to specify which interface is used for cluster
communication as cman_tool will (unless multicast is specified below)
use the broadcast address associated with that hostname. If you
are using IPv6 then you will have to use multicast rather than broadcast.
.TP
.I -N <nodeid>
Overrides the node ID for this node. Normally, nodes are assigned a 
node id by the cluster join mechanism. If you want to ensure that
your nodes always have the same number regardless of the order in 
which they join the cluster then you can hard-code these IDs. 
.BR
Setting node IDs in CCS is a far better way to do this though.
.BR
Note that the node's application to join the cluster may be rejected if you
try to set the nodeid to one that has already been used, or if the node 
was previously a member of the cluster but with a different nodeid.
.TP
.I -m <multicast-address>
Specifies a multicast address to use for cluster communication. This
is required for IPv6 operation. You should also specify an ethernet 
interface to bind to this multicast address using the -i option.
.TP
.I -i <interface>
Used in conjunction with -m above to specify the interface for
multicast to use.
<commit_msg>document new actions wait, status, nodes, services<commit_after>.TH CMAN_TOOL 8 "Nov 23 2004" "Cluster utilities"

.SH NAME
cman_tool \- Cluster Management Tool
.SH SYNOPSIS
.B cman_tool join | leave | kill | expected | votes | version | wait | status | nodes | services [options]
.br
.SH DESCRIPTION
.PP
.B cman_tool
is a program that manages the cluster management subsystem CMAN. cman_tool
can be used to join the node to a cluster, leave the cluster, kill another
cluster node or change the value of expected votes of a cluster.
.br
Be careful that you understand the consequences of the commands issued via cman_tool
as they can affect all nodes in your cluster. Most of the time the cman_tool
will only be invoked from your startup and shutdown scripts.
.br
.SH SUBCOMMANDS
.TP
.I join
This is the main use of cman_tool. It instructs the cluster manager to attempt
to join an existing cluster or (if no existing cluster exists) then to form
a new one on its own.
.br
If no options are given to this command then it will take the cluster 
configuration information from CCS. However, it is possible to provide 
all the information on the command-line or to override CCS values by using
the command line.

.TP
.I leave
Tells CMAN to leave the cluster. You cannot do this if there are subsystems
(eg DLM, GFS) active. You should dismount all GFS filesystems,
shutdown CLVM, fenced and anything else using the cluster manager before
using 
.B cman_tool leave.
Look at 'cman_tool status|services' to see how many (and which) services are
running.
.br
When a node leaves the cluster, the remaining nodes recalculate quorum and this
may block cluster activity if the required number of votes is not present.
If this node is to be down for an extended period of time and you need to
keep the cluster running, add the
.B remove
option, and the remaining nodes will recalculate quorum such that activity 
can continue.

.TP
.I kill
Tells CMAN to kill another node in the cluster. This will cause the local
node to send a "KILL" message to that node and it will shut down.  Recovery
will occur for the killed node as if it had failed.  This is a sort of remote
version of "leave force" so only use if if you really know what you are doing.

.TP
.I expected
Tells CMAN a new value of expected votes and instructs it to recalculate
quorum based on this value. 
.br
Use this option if your cluster has lost quorum due to nodes failing and
you need to get it running again in a hurry.

.TP
.I version
Used alone this will report the major, minor, patch and config versions
used by CMAN (also displayed in 'cman_tool status'). It can also be used
with -r to set a new config version on all cluster members.

.TP
.I wait 
Waits until the node is a member of the cluster and then returns.

.TP
.I status
Displays the local view of the cluster status.

.TP
.I nodes
Displays the local view of the cluster nodes.

.TP
.I services
Displays the local view of the cluster services.

.SH "LEAVE" OPTIONS
.TP
.I force
Shuts down the cluster manager without first telling any of the subsystems
to close down. Use this option with extreme care as it could easily cause data
loss.
.TP
.I remove
Tells the rest of the cluster to recalculate quorum such that activity can
continue without this node.

.SH "EXPECTED" OPTIONS
.TP
.I -e <expected-votes>
The new value of expected votes to use. This will usually be enough
to bring the cluster back to life. Values that would cause incorrect
quorum will be rejected.

.SH "KILL" OPTIONS
.TP
.I -n <nodename>
The node name of the node to be killed. This should be the unqualified node
name as it appears in 'cman_tool nodes'.

.SH "VERSION" OPTIONS
.TP
.I -r <config_version>
The new config version.

.SH "WAIT" OPTIONS
.TP
.I -q
Waits until the cluster is quorate before returning.

.br
.SH "JOIN" OPTIONS
.TP
.I -X
Tells cman_tool to ignore CCS altogether. All of the information necessary
to join the cluster must be provided on the command-line. Note that if
you get this wrong, it is possible that the node will form a cluster on
it's own and ignore a cluster it is supposed to be joining, so this method
of invocation is not recommended.
.TP
.I -c <clustername>
Provides a text name for the cluster. You can have several clusters on one
LAN and they are distinguished by this name. Note that the name is hashed to 
provide a unique number which is what actually distinguishes the cluster, so
it is possible that two different names can clash. If this happens, the node
will not be allowed into the existing cluster and you will have to pick 
another name or use different port number for cluster communication.
.TP
.I -p <port>
UDP port number used for cluster communication. This defaults to 6809.
.TP
.I -v <votes>
Number of votes this node has in the cluster. Defaults to 1.
.TP
.I -e <expected votes>
Number of expected votes for the whole cluster. If different nodes 
provide different values then the highest is used. The cluster will
only operate when quorum is reached - that is more than half the
available votes are available to the cluster. There is no default for
this value. If you are using CCS then ccs_tool will use the total
number of votes for all nodes in the configuration file.
.TP
.I -2
Sets the cluster up for a special "two node only" mode. Because of the
quorum requirements mentioned above, a two-node cluster cannot be valid.
This option tells the cluster manager that there will only ever be two
nodes in the cluster and relies on fencing to ensure cluster integrity.
If you specify this you cannot add more nodes without taking down the 
existing cluster and reconfiguring it. Expected votes should be set to
1 for a two-node cluster.
.TP
.I -n <nodename>
Overrides the node name. By default the unqualified hostname is used. This
option can also be used to specify which interface is used for cluster
communication as cman_tool will (unless multicast is specified below)
use the broadcast address associated with that hostname. If you
are using IPv6 then you will have to use multicast rather than broadcast.
.TP
.I -N <nodeid>
Overrides the node ID for this node. Normally, nodes are assigned a 
node id by the cluster join mechanism. If you want to ensure that
your nodes always have the same number regardless of the order in 
which they join the cluster then you can hard-code these IDs. 
.BR
Setting node IDs in CCS is a far better way to do this though.
.BR
Note that the node's application to join the cluster may be rejected if you
try to set the nodeid to one that has already been used, or if the node 
was previously a member of the cluster but with a different nodeid.
.TP
.I -m <multicast-address>
Specifies a multicast address to use for cluster communication. This
is required for IPv6 operation. You should also specify an ethernet 
interface to bind to this multicast address using the -i option.
.TP
.I -i <interface>
Used in conjunction with -m above to specify the interface for
multicast to use.

{'fraction_non_alphanumeric': 0.03825701624815362, 'fraction_numerical': 0.002363367799113737, 'mean_word_length': 3.860373295046662, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7207490', 'n_tokens_mistral': 3701, 'n_tokens_neox': 3589, 'n_words': 2377}