25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon (original) (raw)

25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon

The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it. It also maintains a log of cluster activities. Management clients can connect to the management server and check the cluster's status.

All options that can be used with ndb_mgmd are shown in the following table. Additional descriptions follow the table.

ndb_node-id_config.bin.seq-number  

node-id is the management server's node ID; seq-number is a sequence number, beginning with 1. For example, if the management server's node ID is 5, then the first three configuration cache files would, when they are created, be named ndb_5_config.bin.1,ndb_5_config.bin.2, andndb_5_config.bin.3.
If your intent is to purge or reload the configuration cache without actually disabling caching, you should startndb_mgmd with one of the options--reload or--initial instead of--skip-config-cache.
To re-enable the configuration cache, simply restart the management server, but without the--config-cache or--skip-config-cache option that was used previously to disable the configuration cache.
ndb_mgmd does not check for the configuration directory (--configdir) or attempts to create one when --skip-config-cache is used. (Bug #13428853)

[ndbd]  
NodeId = 1  
HostName = 198.51.100.101  
[ndbd]  
NodeId = 2  
HostName = 198.51.100.102  
[ndbd]  
NodeId = 3  
HostName = 198.51.100.103  
[ndbd]  
NodeId = 4  
HostName = 198.51.100.104  
[ndb_mgmd]  
NodeId = 10  
HostName = 198.51.100.150  
[ndb_mgmd]  
NodeId = 11  
HostName = 198.51.100.151  
[api]  
NodeId = 20  
HostName = 198.51.100.200  
[api]  
NodeId = 21  
HostName = 198.51.100.201  

Assume that you wish to start this cluster using only the management server having node ID 10 and running on the host having the IP address 198.51.100.150. (Suppose, for example, that the host computer on which you intend to the other management server is temporarily unavailable due to a hardware failure, and you are waiting for it to be repaired.) To start the cluster in this way, use a command line on the machine at 198.51.100.150 to enter the following command:

$> ndb_mgmd --ndb-nodeid=10 --nowait-nodes=11  

As shown in the preceding example, when using--nowait-nodes, you must also use the --ndb-nodeid option to specify the node ID of thisndb_mgmd process.
You can then start each of the cluster's data nodes in the usual way. If you wish to start and use the second management server in addition to the first management server at a later time without restarting the data nodes, you must start each data node with a connection string that references both management servers, like this:

$> ndbd -c 198.51.100.150,198.51.100.151  

The same is true with regard to the connection string used with any mysqld processes that you wish to start as NDB Cluster SQL nodes connected to this cluster. See Section 25.4.3.3, “NDB Cluster Connection Strings”, for more information.
When used with ndb_mgmd, this option affects the behavior of the management node with regard to other management nodes only. Do not confuse it with the--nowait-nodes option used withndbd or ndbmtd to permit a cluster to start with fewer than its full complement of data nodes; when used with data nodes, this option affects their behavior only with regard to other data nodes.
Multiple management node IDs may be passed to this option as a comma-separated list. Each node ID must be no less than 1 and no greater than 255. In practice, it is quite rare to use more than two management servers for the same NDB Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster.
Note
When you later start the “missing” management server, its configuration must match that of the management server that is already in use by the cluster. Otherwise, it fails the configuration check performed by the existing management server, and does not start.

It is not strictly necessary to specify a connection string when starting the management server. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly.

See Section 25.4.3.3, “NDB Cluster Connection Strings”, for information about using connection strings.Section 25.5.4, “ndb_mgmd — The NDB Cluster Management Server Daemon”, describes other options for ndb_mgmd.

The following files are created or used byndb_mgmd in its starting directory, and are placed in the DataDir as specified in the config.ini configuration file. In the list that follows,nodeid is the unique node identifier.