Multi-MN HA Scenario
If the IP address of the server where a MN is located changes, change the IP address of
the MN by following these steps:
- In a MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql
- Run the following commands in each MN to manually change the NIC addresses of
all servers. (Here, assume that bond0 is the management
network.)
[root@localhost ~]# zs-restore-network-setting -i br_bond0 #Clear the IP address of the bridge. [root@localhost ~]# zs-show-network #Check whether the IP address is successfully cleared. [root@localhost ~]# zs-network-setting -i br_bond0 172.31.250.100 255.255.255.0 172.31.250.1 #Enter the addresses according to your actual needs.
- In each MN, run the following commands in sequence to change the IP address of
each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl restart_node #Restart the MN for the configuration to take effect.
- In the MN of the backup database, run the install_ha command to reinstall the HA suite. For more information, see Specify Command Line.
More Information
If the server where a MN is located is added as another node at the same time, update
the IP address of the corresponding node by following these steps:
- Scenario 1: The management node, compute node, and backup storage share the
same server.
- Log in to the UI. On the Hardware page, place the target host into maintenance mode and disable the target backup storage.
- In a MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql
- Run the following command in each MN to manually change the NIC
address of all servers. (Here, assume that bond0 is the
management
network.)
[root@localhost ~]# zs-restore-network-setting -i br_bond0 #Clear the IP address of the bridge. [root@localhost ~]# zs-show-network #Check whether the IP address is successfully cleared. [root@localhost ~]# zs-network-setting -i br_bond0 172.31.250.100 255.255.255.0 172.31.250.1 #Enter the addresses according to your actual needs.
- In each MN, run the following commands in sequence to change the
IP address of each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl restart_node #Restart the MN for the configuration to take effect.
- Log in to the UI by using the MN IP address of the backup database, and change the IP address of the corresponding host and backup storage, respectively.
- In the MN of the backup database, run the install_ha command to reinstall the HA suite. For more information, see Specify Command Line.
- Scenario 2: The management node and storage node share the same server.
Here, the storage node uses the Ceph distributed deployment method.
- In a MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql
- Log in to the UI by using a VIP. On the Hardware page, place the target host into maintenance mode, and disable the target primary storage and backup storage. On the Resource Pool page, disable the VM instance.
- Change the management IP address of the Ceph storage.
- In each MN, run the following commands in sequence to change the
IP address of each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl restart_node #Restart the MN for the configuration to take effect.
- In the MN of the backup database, run the install_ha command to reinstall the HA suite. For more information, see Specify Command Line.
Note: Modifying an IP address in Ceph scenarios is a heavy operation. Please contact the official technical support for help.
- In a MN, run the following command to back up the
database:
- Scenario 3:
The management node, compute node, storage node, and backup storage share the same server. Here, the storage node uses the Ceph distributed deployment method.
- In a MN, run the following command to back up the
database:
[root@localhost ~]# zstack-ctl dump_mysql
- Log in to the UI by using a VIP. On the Hardware page, place the target host into maintenance mode, and disable the target primary storage and backup storage. On the Resource Pool page, disable the VM instance.
- Change the management IP address of the Ceph storage.
Note: Modifying an IP address in Ceph scenarios is a heavy operation. Please contact the official technical support for help.
- In each MN, run the following commands in sequence to change the IP
address of each
MN:
[root@localhost ~]# zstack-ctl change_ip --ip 172.31.250.110 #Here, 172.31.250.110 is the new IP address of the MN. [root@localhost ~]# zstack-ctl restart_node #Restart the MN for the configuration to take effect.
- Log in to the UI by using the MN IP address of the backup database,
and change the corresponding host IP address, backup storage IP
address, and the monitor IP address of the Ceph primary
storage.
Note: If the type of the backup storage is Ceph, change the monitor IP address of the Ceph backup storage. For more information, contact the official technical support.
- In the MN of the backup database, run the install_ha command to reinstall the HA suite. For more information, see Specify Command Line.
- Log in to the UI by using a VIP. On the Hardware page, enable the backup storage, primary storage, and host. On the Resource Pool page, enable the VM instance.
- In a MN, run the following command to back up the
database: