content_image/745076.jpg content_image/745077.jpg
## 23.5.4 Summary of NDB Cluster Start Phases 

This section provides a simplified outline of the steps involved when NDB Cluster data nodes are started. More complete information can be found in NDB Cluster Start Phases, in the NDB  Internals Guide . 

These phases are the same as those reported in the output from the node_id  STATUS  command in the management client (see Section 23.5.1, “Commands in the NDB Cluster Management Client” ). These start phases are also reported in the start_phase  column of the ndbinfo.nodes  table. 

Start types.  There are several different startup types and modes, as shown in the following list: 

• Initial start.  The cluster starts with a clean file system on all data nodes. This occurs either when the cluster started for the very first time, or when all data nodes are restarted using the --initial  option. 

<img src='content_image/745076.jpg'>

## Note 

Disk Data files are not removed when restarting a node using --initial . 

• System restart.  The cluster starts and reads data stored in the data nodes. This occurs when the cluster has been shut down after having been in use, when it is desired for the cluster to resume operations from the point where it left off. 

• Node restart.  This is the online restart of a cluster node while the cluster itself is running. 

• Initial node restart.  This is the same as a node restart, except that the node is reinitialized and started with a clean file system. 

Setup and initialization (phase -1).  Prior to startup, each data node ( ndbd  process) must be initialized. Initialization consists of the following steps: 

1. Obtain a node ID 

2. Fetch configuration data 

3. Allocate ports to be used for inter-node communications 

4. Allocate memory according to settings obtained from the configuration file 

When a data node or SQL node first connects to the management node, it reserves a cluster node ID. To make sure that no other node allocates the same node ID, this ID is retained until the node has managed to connect to the cluster and at least one ndbd  reports that this node is connected. This retention of the node ID is guarded by the connection between the node in question and ndb_mgmd . 

After each data node has been initialized, the cluster startup process can proceed. The stages which the cluster goes through during this process are listed here: 

• Phase 0.  The NDBFS  and NDBCNTR  blocks start. Data node file systems are cleared on those data nodes that were started with --initial  option. 

• Phase 1.  In this stage, all remaining NDB  kernel blocks are started. NDB Cluster connections are set up, inter-block communications are established, and heartbeats are started. In the case of a node restart, API node connections are also checked. 

<img src='content_image/745077.jpg'>

## Note 

When one or more nodes hang in Phase 1 while the remaining node or nodes hang in Phase 2, this often indicates network problems. One possible cause of such issues is one or more cluster hosts having multiple network interfaces. 

