Documentation Home
MySQL Cluster Manager 9.3 User Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


5.6.7 Theremove process Command

remove process [--removedirs]process_id_listcluster_nameprocess_id_list:process_id[,process_id[, ...]]

This command removes permanently the processes in theprocess_id_list from the cluster namedcluster_name. It provides a means to scale down a cluster offline.

If the--removedirs option is used, all data for the specified processes will be deleted.

The following restrictions apply when using this command:

  1. The cluster must be in the status ofcreated orstopped.

  2. The processes to be removed must be in the status ofstopped,added, orimport.

  3. The command cannot remove all processes from a cluster in thecreated status; at least one process must be left.

  4. The command cannot remove all process of the same type from a cluster in thestopped status; at least one process must be left in the cluster for each type of nodes (management, data, and API).

  5. The command cannot remove a data node that is in thestopped status if it is already a member of a node group (i.e., if it has ever been started and was fully functional).

You can use theshow status--process orlist processes command to obtain the process IDs for all the processes in a given cluster:

mcm> show status --process mycluster;+--------+----------+---------+--------+-----------+-----------+| NodeId | Process  | Host    | Status | Nodegroup | Package   |+--------+----------+---------+--------+-----------+-----------+| 49     | ndb_mgmd | flundra | added  |           | mypackage || 1      | ndbmtd   | flundra | added  | n/a       | mypackage || 2      | ndbmtd   | flundra | added  | n/a       | mypackage || 50     | mysqld   | flundra | added  |           | mypackage || 51     | mysqld   | flundra | added  |           | mypackage || 52     | ndbapi   | *       | added  |           |           || 53     | ndbapi   | *       | added  |           |           |+--------+----------+---------+--------+-----------+-----------+7 rows in set (0.03 sec)

The process IDs are the same as the node IDs for the processes shown in the output of the above or some othermcm client commands, or in the output of thendb_mgm -e "show" command (seendb_mgm — The NDB Cluster Management Client). In the above example, the SQL node with the process ID50 inmycluster can be removed by the following command:

mcm> remove process 50 mycluster;+------------------------------+| Command result               |+------------------------------+| Process removed successfully |+------------------------------+1 row in set (0.48 sec)

And in this case, since the cluster was never started, we may also remove both data nodes:

mcm> remove process 1,2 mycluster;+------------------------------+| Command result               |+------------------------------+| Process removed successfully |+------------------------------+1 row in set (0.40 sec)