Informing the IBM Community

AIX tech tip: which HMC does this LPAR belong to?

0
(0)

HMC LPAR

In a large Power environment where you have multiple Power Systems and perhaps hundreds of LPARs, there may well be multiple Hardware Management Consoles. When the environment is spread across several sites, it can be a challenge even identifying which HMC to log onto to manage a particular LPAR.

I recently had this situation. I could connect to the LPAR but, as it was a huge environment, I needed to discover which HMC I could use to assign more CPU to the LPAR. You may have the opposite challenge. You know the HMC but you can’t connect to the LPAR (which may be down) and you’re not sure which Power System the LPAR belongs to.

There are two ways to find the right HMC for the right LPAR. One way is to log on to the individual LPAR itself and list the HMCs that it connects to. This is quite straightforward, provided that the LPAR is up and running and has an active connection to the HMC.

Log on to the AIX LPAR and run the following command:

lsrsrc IBM.MCP
Resource Persistent Attributes for IBM.MCP
resource 1:
        MNName            = "10.10.98.138"
        NodeID            = 11353856313793622475
        KeyToken          = "hmc1"
        IPAddresses       = {"10.10.52.23"}
        ConnectivityNames = {"10.10.98.138"}
        HMCName           = "7042CR5*12345CC"
        HMCIPAddr         = "10.10.52.23"
        HMCAddIPs         = "192.168.128.1"
        HMCAddIPv6s       = ""
        ActivePeerDomain  = ""
        NodeNameList      = {"aixlpar1"}
resource 2:
        MNName            = "10.10.98.138"
        NodeID            = 1911965131305084673
        KeyToken          = "hmc2"
        IPAddresses       = {"10.10.52.24"}
        ConnectivityNames = {"10.10.98.138"}
        HMCName           = "7042CR5*12345AC"
        HMCIPAddr         = "10.10.52.24"
        HMCAddIPs         = "192.168.1.50,10.0.0.1"
        HMCAddIPv6s       = ""
        ActivePeerDomain  = ""
        NodeNameList      = {"aixlpar1"}

Note that on older releases of AIX, the command used to be lsrsrc IBM.ManagementServer instead of IBM.MCP.

You can see from the output of the lsrsrc command that this LPAR is managed by two HMCs and you should be able to log on to either one of them to manage the AIX LPAR. Connecting to the HMC would allow you to restart the AIX LPAR, do dynamic LPAR (DLPAR) operations such as assigning more CPU or memory and make changes to the LPAR profile. Profile changes take effect when the LPAR is shut down and the new profile is activated.

But what if you can’t connect to the LPAR in the first place? You can still log on to each HMC and list all the servers (“managed systems” in HMC terminology). From the HMC command line, here is the command to run:

lssyscfg -r sys -F name

This will give you just the server names as indicated by the -F flag. You could display the server model number and serial number as well using:

lssyscfg -r sys -F name:type_model:serial_num

Let’s just stick with the name and then list all the LPARs that are associated with each managed system. I’m assuming that the hostname of the LPAR is the same as the LPAR name on the HMC, or at least the LPAR name contains the hostname. If not, you’d probably need to match up the LPAR ID, which is beyond the scope of this article.

So, working with an LPAR name that matches the hostname, we can list the LPARs that belong to each Power System. To do that, it’s a simple loop. We need to change the flags on the lssyscfg command within the loop to display the LPAR name.

for i in $(lssyscfg -r sys -F name)
do
    lssyscfg -r lpar -m $i -F name
done

The -m flag is to indicate the managed system name that you want to look at.

You can add a grep command to filter to the LPAR that you want. For example, here’s how to display the LPAR called aixlpar1:

for i in $(lssyscfg -r sys -F name)
do
      echo “Checking managed system $i “    
      lssyscfg -r lpar -n $i -F name | grep -i aixlpar1
done

Although the HMC command line syntax is pretty unwieldy and hard to remember, it does come in handy when you have to check larger environments and the browser-based interface would be too slow. You can check the syntax for the HMC command line in the links below.

It is helpful to get a little familiar with the HMC command line, especially with the command to list the configuration (lssyscfg). If you do, you can gather information about your environment into a CSV format. This can be pretty handy if you need to upload the configuration information into a spreadsheet or a database.

Resources

List management consoles: IBM Knowledge CenterResource classes defined by the management domain resource manager

IBM Knowledge CentreHMC Manual reference page on lssyscfg (list system resources).

Anthony English has worked on IBM Power Systems and their predecessors since the first commercial release of AIX. He is a well-recognised author in the field of IT, and has some unique perspectives on technical and business-related topics. Anthony is based in Sydney, Australia with his wife and seven young children.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.