Operating System - HP-UX
1826614 Members
2782 Online
109695 Solutions
New Discussion

a procedure of changing hostname under mcsg

 
SOLVED
Go to solution
KCS_1
Respected Contributor

a procedure of changing hostname under mcsg

Hello,

we are running 2nodes(rx7640)cluser that configured with ServiceGuard(A.11.17) with CFS and planing to change the hostname both of them. what is the best solution without any trouble?

Easy going at all.
7 REPLIES 7
Aashique
Honored Contributor

Re: a procedure of changing hostname under mcsg

Hi,
To change the hostname you must need downtime.

Halt the cluster.
change the file /etc/cmclnodelist
and
/etc/cmcluster/pkgname/pkgname.conf

NODE_NAME node1
NODE_NAME node2

check the configuration file.
apply the configuration file
start the cluster.

Thanks & Regards
Aashique
Ramesh S
Esteemed Contributor
Solution

Re: a procedure of changing hostname under mcsg

Hi

In order to change the hostname,number of system and cluster files must be edited, the server must be rebooted, and the cluster configuration file must be re-applied.Use the following steps to complete the changeover.


1. If the present cluster configuration does not match the present
hardware configuration, further cluster modifications may compound
unresolved issues. Determine if the present cluster binary is still
compatible with the cluster hardware and resolve the issues as deemed
necessary before proceeding with this document:

# cd /etc/cmcluster
# cmgetconf CONF # create a cluster ASCII from the binary
# cmcheckconf -C CONF # verify the binary against the hardware

If cmcheckconf fails, it may be necessary to dissolve the present
cluster and create a new ASCII file. This requires that the cluster
be halted:

# cmhaltcl
# cmdeleteconf

(The creation of the new cluster configuration file comes in step 10.)

2. Perform cmhaltnode on the node receiving the new hostname.

3. Execute the set_parms hostname command. This will change the
hostname reference in the following files:

/etc/rc.config.d/netconf
/etc/hosts

4. On each node where they exist, change the NODE_NAME references in both
the cluster and package configuration files on:

/etc/cmcluster/cmclconfig.ascii (cluster ASCII file)
NODE_NAME

/etc/cmcluster// (package config file)
NODE_NAME

5. Update these files on both hosts with the new hostname:
~root/.rhosts or /etc/cmcluster/cmclnodelist
/etc/hosts.equiv
/etc/hosts

Update any DNS name servers as well.

6. If any, update references to the old hostname in package control
scripts. References to floating or relocatable IP addresses or names
should not be affected.

7. On the server being renamed, edit the /etc/rc.config.d/cmcluster
file to disable it's ability to join the cluster on reboot:
AUTOSTART_CMCLD=0

8. Reboot the server with the new hostname.

9. Verify hostname change:
# uname -a ; hostname

10. If the cluster was dissolved in step 1, create a new cluster ASCII file:

# cmquerycl -C /etc/cmcluster/CONF -n nodeA -n nodeB

11. Verify the configuration files and update the cluster binary file.
Example:

# cd /etc/cmcluster
# cmcheckconf -C cluster.ascii -P pkg1/pkg1.conf -P pkg2/pkg2.conf ...
# cmapplyconf -C cluster.ascii -P pkg1/pkg1.conf -P pkg2/pkg2.conf ...

12. Use the cmrunnode command to bring the
node into the cluster. Move packages to it as necessary.

13. Edit the /etc/rc.config.d/cmcluster file on each node
to enable automatic cluster startup upon system boot.
AUTOSTART_CMCLD=1

ITRC Doc; UMCSGKBRC00006541

Best Regards,
Ramesh
whiteknight
Honored Contributor

Re: a procedure of changing hostname under mcsg

Kim,

Ramesh has the best solution.

Cheers

WK
Problem never ends, you must know how to fix it
Asif Sharif
Honored Contributor

Re: a procedure of changing hostname under mcsg

See the Technical knowledge base - document
UMCSGKBRC00006541
http://www12.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c01028186-2

Regards,
Asif Sharif
Regards,
Asif Sharif
Steven E. Protter
Exalted Contributor

Re: a procedure of changing hostname under mcsg

Shalom,

change /etc/rc.config.d/netconf

Use /etc/hosts networking to establish aliases for the old and new names.

You can then roll your cluster through a rolling reboot and keep it running assuming you make no typos.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stephen Doud
Honored Contributor

Re: a procedure of changing hostname under mcsg

The aforementioned document (which I authored) was written before the advent of Serviceguard Storage Management Suite, Cluster File System. Therefore, the document does not discuss CFS packages.

Note that the document calls for a cmdeleteconf, which will delete all CFS packages. Since Serviceguard does not at this time have a method to quickly restore CFS packages after rebuilding the cluster, the administrator will have to do it manually, or, if you have a software support contract, you are entitled to download this file:
emr_na-c01137101-1
TITLE: HPUX Serviceguard CFS - Reconstituting CFS packages after cluster recreation.

The document includes a script to rapidly recreate CFS packages.
Note that the script must be run BEFORE deleting the cluster because it generates yet another script to automate the CFS package rebuilding process.

Also note that after changing hostnames, the resulting script must be modified, as old hostnames are listed.

KCS_1
Respected Contributor

Re: a procedure of changing hostname under mcsg

Thanks all for good comments!
Easy going at all.