All the places hostnames have to get changed in AIX

The hostname gets hardcoded into a couple of nasty places that the ‘hostname’ command doesn’t see or change.  The first is ‘uname -n’ which you set with ‘uname -S newname’.  Oracle tends to use old perl scripts that use this to find the hostname.  To be safe, read the rest of this post also.

The hostname command itself seems to simply read from inet0, but sometimes this doesn’t work:

lsattr -El inet0 | grep hostname

chdev -l inet0 -a hostname=newname

Apparently if you change the hostname of a system, it doesn’t get changed in the IBM.Host stanza of rsct, which CRM relies on.  You must use a refresh command to change this.  Also, if your hostname seems to magically change back to on old name on reboot, check /etc/rc.net to see it is hardcoded there.

> lsrsrc IBM.Host
Resource Persistent Attributes for IBM.Host
resource 1:
Name = “newnodename”
NumProcessors = 16
RealMemSize = 5033164800
OSName = “AIX”
KernelVersion = “5.3”
DistributionName = “IBM”
DistributionVersion = “5300-06-07-0818”
Architecture = “ppc”
NumOnlineProcessors = 8
EntProcCapacity = 150
NumOnVProcessors = 4
NumActPProcessors = 4
ActivePeerDomain = “”
NodeNameList = {“oldnodename”}
> /usr/sbin/rsct/install/bin/recfgct
(doesn’t return anything but takes a few seconds to regenerate from the HMC)

> lsrsrc IBM.Host
Resource Persistent Attributes for IBM.Host
resource 1:
Name = “newnodename”
NumProcessors = 16
RealMemSize = 5033164800
OSName = “AIX”
KernelVersion = “5.3”
DistributionName = “IBM”
DistributionVersion = “5300-06-07-0818”
Architecture = “ppc”
NumOnlineProcessors = 8
EntProcCapacity = 150
NumOnVProcessors = 4
NumActPProcessors = 4
ActivePeerDomain = “”
NodeNameList = {“correctnodename”}

 

So to recap:

hostname newname
uname -S newname
chdev -l inet0 -a hostname=newname
/usr/sbin/rsct/install/bin/recfgct
check /etc/rc.net to see if the hostname has been hardcoded into it by HACMP or something

Leave a Reply

Your email address will not be published. Required fields are marked *