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


4.2.2 The remove hosts Command

remove hosts {--hosts=|-h }host_list site_name

host_list:
    host[, host[, ...]]

This command removes one or more hosts from an existing management site. It takes as arguments a required option --hosts (or its short form -h), whose value is a comma-separated list of one or more hosts to be removed, and the name of the site from which the hosts are to be removed. A number of limitations apply:

  • The name of the host to be removed must not be localhost or 127.0.0.1.

  • The host to be removed must not have any managed processes from any clusters assigned to them (remove those processes first with the remove process command); it can have unmanaged processes assigned to them though (typically, ndbapi@hostname or mysqld@*hostname).

  • There should not be any packages defined with explicit paths pointing to the host to be removed.

  • A quorum consists of a majority of hosts (i.e., half of the total number of hosts plus one) must exist for the site both before and after the host's removal, or it will not be possible to execute the remove host command.

  • You cannot remove the last host from a site; use the delete site command instead.

The following command removes two hosts named tonfisk and flundra from the management site mysite:

mcm> remove hosts --hosts=tonfisk,flundra mysite;
+----------------------------+
| Command result             |
+----------------------------+
| Hosts removed successfully |
+----------------------------+
1 row in set (0.48 sec)