1. Home
  2. Day-to-day Administration
  3. How to Clone a Bright Head Node
  1. Home
  2. High Availability
  3. How to Clone a Bright Head Node
  1. Home
  2. Installing BCM
  3. How to Clone a Bright Head Node

How to Clone a Bright Head Node

These steps are tested on Bright 9.0 with CentOS 7

PXE Boot the new head node from the current head node in RESCUE mode

  • After the node boots successfully, we will run “cm-clone-install” script to start cloning the head node

Case 1: the new head node will have the same hostname as the former head node

  • In this case, we will set the cm-clone-install parameter “–hostname” to the same name as the current head node:
root@ClusterManager:~# /cm/cm-clone-install --clone --hostname=b90-c7
[...]
Getting disk layout            ................ [  OK  ]             
The head node disk layout is saved in /cm/__headnodedisksetup.xml    
[v - view, e - edit, c - continue ]:                                  
[...]
The contents of the following disks will be erased.                  
/dev/sda                                                             
Do you want to continue [yes/no]? yes                                
Getting mount points           ................ [  OK  ]             
Partitioning hard drive        ................ [  OK  ]             
Mounting partitions            ................ [  OK  ]             
Syncing hard drive             ................ [  OK  ]             
Finalizing installation        ................ [  OK  ]
Do you want to reboot[y/n]:
  • After the clone is done and the node is rebooted successfully, the ifcfg-* files (for the interfaces) should be updated with the correct MAC addresses, device names (if necessary) and IP addresses (if necessary):
[root@b90-c7 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:02:60:84 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:fe02:6084/64 scope link
      valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:fb:4f:74 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.139/24 brd 192.168.2.255 scope global dynamic enp0s8
      valid_lft 86095sec preferred_lft 86095sec
    inet6 fe80::a00:27ff:fefb:4f74/64 scope link
      valid_lft forever preferred_lft forever

[root@b90-c7 ~]#


[root@b90-c7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
# This section of this file was automatically generated by cmd. Do not edit manually!
# BEGIN AUTOGENERATED SECTION -- DO NOT REMOVE
DEVICE=enp0s3
ONBOOT=yes
MTU=1500
BOOTPROTO=none
IPADDR=10.141.255.254
PREFIX=16
NM_CONTROLLED=no
HWADDR=08:00:27:01:E0:F0
# END AUTOGENERATED SECTION   -- DO NOT REMOVE

[root@b90-c7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
# This section of this file was automatically generated by cmd. Do not edit manually!
# BEGIN AUTOGENERATED SECTION -- DO NOT REMOVE
DEVICE=enp0s8
ONBOOT=yes
MTU=1500
BOOTPROTO=dhcp
PREFIX=24
NM_CONTROLLED=no
HWADDR=08:00:27:B5:C4:F3
# END AUTOGENERATED SECTION   -- DO NOT REMOVE
[root@b90-c7 ~]# 
  • CMDaemon will initially fail to start on the new head node because the MAC addresses of the interfaces will not match the MAC address in the license, so “request-license” will need to be run (after unlocking the product key from the customer portal) to activate the license with the new MAC address.

Notes: 

  • If the new head node is being accessed via BMC, please make sure that SetupBMC in cmd.conf is set to false so that when CMDaemon starts it will not overwrite the current IP address with the IP address stored in the database.
  • If the IP addresses of the interfaces will not change, please make sure to power off the former head node to avoid having conflicting IP addresses.
  • After updating the ifcfg-* files and re-activating the license, the MAC addresses of the interfaces on the active head node needs to be changed:
[root@b90-c7 ~]# cmsh
[b90-c7]%
[b90-c7]%
[b90-c7]%
[b90-c7]% device use master
[b90-c7->device[b90-c7]]% interfaces
[b90-c7->device[b90-c7]->interfaces]% set enp0s3 mac 08:00:27:02:60:84
[b90-c7->device*[b90-c7*]->interfaces*]% set enp0s8 mac 08:00:27:fb:4f:74
[b90-c7->device*[b90-c7*]->interfaces*]% commit
Mon Jun 29 12:18:00 2020 [warning] b90-c7: Reboot required: Interfaces have been modified

Reboot the cloned head node so that the interfaces will come up cleanly:

[b90-c7]% ds
b90-c7 ................... [   UP   ]
  • After the head node has come up properly, all the compute nodes should be rebooted to get a new certificate signed by the new license on the new head node, in case the admin decided not to re-use the private key from the existing license after running request-license.

Case 2: the new head node will have a different hostname than the current head node

  • In this case, in addition to the same steps in Case 1 and after updating the ifcfg-* files, the hostname in the cmdaemon database has to be updated:
mysql -u root -p<password> cmdaemon
MariaDB [cmdaemon]> update Devices set hostname='<new hostname>' where hostname='<old hostname>';
Updated on September 1, 2020

Related Articles

Leave a Comment