restart cluster [--sequential-restart] cluster_name
This command performs a rolling restart (see
Performing a Rolling Restart of an NDB Cluster) of the cluster
named cluster_name
. The cluster must
already be running in order for this command to succeed. (For
information about how to determine the operation state of the
cluster, see Section 4.4.6, “The show status
Command”.)
For example, the command shown here performs a rolling restart
of the cluster named mycluster
:
mcm> restart cluster mycluster;
+--------------------------------+
| Command result |
+--------------------------------+
| Cluster restarted successfully |
+--------------------------------+
1 row in set (1 min 22.53 sec)
If the cluster is not already running, restart
cluster
fails with an error, as shown here:
mcm> show status --cluster mycluster;
+-----------+---------+---------+
| Cluster | Status | Comment |
+-----------+---------+---------+
| mycluster | stopped | |
+-----------+---------+---------+
1 row in set (1.49 sec)
mcm> restart cluster mycluster;
ERROR 5009 (00MGR): Restart can not be performed as processes are
stopped in cluster mycluster
For MySQL Cluster Manager 1.4.8 and later: By default, a
rolling restart is performed on the nodes in a
parallel manner (that is, half of the nodes
are stopped and restarted together, followed by the second half
of the nodes). In some situations, you might want to have a
rolling restart performed in a sequential
manner by adding the
--sequential-restart
option, in which case nodes ares stopped and restarted one after
another.
For MySQL Cluster Manager 1.4.7 and earlier: A rolling restart is performed on the nodes in a parallel manner (i.e., half of the nodes are stopped and restarted together, followed by the second half of the nodes).
Depending on the number of nodes and the amount of data stored
in the cluster, a rolling restart can take a considerable
amount of time, up to several hours for a cluster with a great
many data nodes and a large amount of data. For this reason,
you may want to execute this command with the
--background
option
(short form
-B
)
to allow it to run in the background, freeing the MySQL Cluster Manager client
for other tasks.
Currently, there is no mechanism in MySQL Cluster Manager for performing system initial restarts of a cluster. This means that attributes that require an initial restart to be changed must be set before the cluster is started for the first time.