IBM Support

Hostname Change - PureData System for Analytics

Question & Answer


Question

How do I change the hostname on the PureData System for Analytics hosts?

Cause

Need to change or update the hostnames on the PureData appliance hosts.

Answer

These steps assume HA1 is the primary host.

To determine the primary host that is in use, please run the below command as the 'root user.

crm_mon -i5

Note what hostname the resources are running on, that will be the primary host. For this document, HA1 is the assumed primary host.

1. As a root user, log into HA1

2. Shut down the Netezza software by running the following command:
    [root@nzhost1 ~]# crm_resource –r nps –p target_role –v stopped

3. Stop the heartbeat service on both the hosts using the following commands:
    [root@nzhost1 ~]# ssh ha2 'service heartbeat stop'
    [root@nzhost1 ~]# service heartbeat stop
 
4. As a root user, verify that the cluster resources are stopped using the following command:
    [root@nzhost1 ~]# crm_mon -i5 (Ctrl-C out)

5. Stop the drbd service on both hosts using the following commands:
    [root@nzhost1 ~]# ssh ha2 'service drbd stop'
    [root@nzhost1 ~]# service drbd stop
6. To keep services off on reboot use the following commands:
    [root@nzhost1 ~]# chkconfig heartbeat off
    [root@nzhost1 ~]# ssh ha2 'chkconfig heartbeat off'
    [root@nzhost1 ~]# chkconfig drbd off
    [root@nzhost1 ~]# ssh ha2 'chkconfig drbd off'
7. Restart the heartbeat service on both host using the following commands:
    [root@nzhost1 ~]#  service heartbeat start
    [root@nzhost1 ~]#  ssh ha2 'service heartbeat start'
8. Change the hostnames in the /etc/hosts file on both HA1 and HA2. DRBD and heartbeat require a hostname resolution to an IP address in the /etc/hosts file.
  • On HA1:
    [root@nzhost1 ~]# vi /etc/hosts (Change the hostnames for HA1, HA2, and VIP)
     
  • On HA2:
    [root@nzhost1 ~]# vi /etc/hosts (Change the hostnames for HA1, HA2, and VIP)

*****WAIT 10 minutes or until both hosts show ONLINE in 'crm_mon -i5' output*****

9. Run nz-hostnamer using the appropriate hostnames as shown below:
    [root@nzhost1 ~]# cd /opt/nz-hwsupport/install_tools/
    
[root@nzhost1 ~]# ./nz-hostnamer.pl -a new_hostname_ha1 -b new_hostname_ha2
***** Wait for Script to Finish and return to a prompt *****

10. Reboot HA2

11. After HA2 comes back up, Reboot HA1 wait for it to come up.

12. Carefully verify /etc/hosts that all the hostnames and IPs are correct, then re-check network configuration for the configured interface.

Check output of netstat -rn command and verify output is looking good.
Check DNS is all good or comment out temporarily.
Verify no host is mounting /nz and /export/home partition with df -h command.

N3001 ONLY Run the following to configure the VIP or Cluster IP:

[root@nzhost1 ~]# /nzlocal/scripts/heartbeat_config.sh --ip xxx.xxx.xxx.xxx --mask xxx.xxx.xxx.xxx --dev dev_name
       dev_name is the eth/bond passing external network traffic, exp. bond3

13. Have a session open to HA1 and HA2 to start drbd and heartbeat services on both hosts using the following commands:
    [root@nzhost1 ~]# service heartbeat start
    [root@nzhost2 ~]# service heartbeat start

    [root@nzhost1 ~]# service drbd start
    [root@nzhost2 ~]# service drbd start

    [root@nzhost1 ~]# chkconfig heartbeat on
    [root@nzhost1 ~]# ssh ha2 'chkconfig heartbeat on'
    [root@nzhost1 ~]# chkconfig drbd on
    [root@nzhost1 ~]# ssh ha2 'chkconfig drbd on'
 

14. Monitor cluster using the below command. Wait until the crm_mon shows the cluster is started. 
   
[root@nzhost1 ~]# crm_mon -i5 (Ctrl-C out)

15. As a root user, start the Netezza software using the following command:
    [root@nzhost1 ~]# crm_resource –r nps –p target_role –v started
16. Monitor cluster using the below command:
    [root@nzhost1 ~]# crm_mon -i5 (Ctrl-C out)
Ensure that all resources start, and that the DB comes online.

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Host","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
13 August 2020

UID

swg21974059