Under Construction

Optional: Assignment of LPARs to Managed Systems

The LPAR tool uses 3 local files in which assignments of LPARs, managed systems and HMC are saved. These 3 local files are read in every time the LPAR tool is called and largely determine how the LPAR tool works. The files are maintained by the LPAR tool, i.e. manual adjustments are not necessary and should not be made. These 3 files are briefly discussed below; they are located in the home directory by default (but this can also be reconfigured).

The first file is the hmc.list file, which was already introduced in the Getting Started chapter. This file contains all known HMCs. List the contents of the file on your system:

$ cat ~/hmc.list
hmca01:421970C:7042-CR8:hmca01
hmca02:4219813:7042-CR8:hmca02
hmcg01:635561C:7042-CR8:hscroot@hmcg01
hmcg02:63559A3:7042-CR8:hscroot@hmcg02
hmc01:322480C:7042-CR9:hmc01
hmc02:322481C:7042-CR9:hmc02
$

If a new HMC is registered with the “hmc add” command, it is added to this file by the LPAR tool. If an HMC is removed with the “hmc remove” command, the corresponding entry in the hmc.list file is removed. The hmc.list file is very static. Changes are only made by “hmc add” and “hmc remove“. Since new HMCs are rarely added or old HMCs removed, the content should remain the same for a long time.

The second file is the ms.list file, which contains all known managed systems. If an HMC is registered using “hmc add“, then all managed systems connected to this HMC are identified and entered into the ms.list file. If an HMC is removed (“hmc remove“), then the associated managed systems are also automatically removed, unless they are connected to a second known HMC.

List the contents of the ms.list file on your system:

$ cat ~/ms.list
msa02:105D21V:8284-22A:hmca01,421970C:hmca02,4219813
msa03:10B2C1V:8286-41A:hmca01,421970C:hmca02,4219813
msa01:104D01V:8284-22A:hmca01,421970C:hmca02,4219813
...
$

In addition to the name of the managed system, the serial number and the type, the connected HMCs are listed (usually 2 HMCs). Here, too, as with the HMCs above, the content rarely changes.

The last file is the lpar.list file. This file contains all known LPARs. For each LPAR, in addition to the LPAR name and LPAR ID, the serial number, the type of LPAR and the underlying managed system are stored.

View the contents of the lpar.list file on your system:

$ cat ~/lpar.list
aix02:17:aixlinux:105D21VH:msa02,105D21V
aix04:16:aixlinux:105D21VG:msa02,105D21V
aix08:15:aixlinux:105D21VF:msa02,105D21V
msa02-viol:1:vioserver:105D21V1:msa02,105D21V

$

If only the LPAR name is specified in a command, the LPAR tool uses this file to find the associated managed system and then the associated HMCs via the ms.list file. The file is therefore very important for the functioning of the LPAR tool.

If an HMC is registered, then in addition to the managed systems (as described above), the LPARs that can be reached via this HMC are also determined and entered into the lpar.list file.

The information in this file may no longer be up to date after some time. Reasons for this include the following:

    • An LPAR was deleted via the GUI or another tool. However, the LPAR is still listed in the lpar.list file.
    • A new LPAR was created via the GUI or another tool. However, there is no entry for this LPAR in the lpar.list file.
    • An LPAR was moved to another managed system using LPM via GUI or another tool. The old managed system can still be found as the managed system in lpar.list.

Note: If LPARs are created, deleted or moved using the LPAR tool, the entries in lpar.list are updated accordingly and are then correct. However, entries from other LPAR tool users are not adjusted!

However, the assignments can be updated very easily with the “hmc rescan” command. If no argument is specified, all entries of all HMCs, managed systems and LPARs are updated. If one or more HMCs are explicitly specified as an argument, only the entries belonging to these HMCs are updated. It is recommended to use the “hmc rescan” command from time to time to update the entries.

Start “hmc rescan” on your system and measure the time the command takes to perform the update:

$ time hmc rescan
hmc01:
   ms02
    > aix04
    > aix06
    > ms02-vio2
    > ms02-vio1
   ms03
    > aix01
    > aix03
    > ms03-vio2
    > ms03-vio1


real      0m8.048s
user      0m1.643s
sys       0m1.664s
$

On our system, this took about 8 seconds. We have 6 HMCs, about 40 managed systems and about 500 LPARs.

Let us show you which commands are executed on the HMCs during “hmc rescan” (option “-v”):

$ hmc -v rescan
hmca01: lshmc -n
hmca01: lshmc -v
hmca01: lssyscfg -r sys
hmca01: lssyscfg -r lpar -m msa02
hmca01: lssyscfg -r lpar -m msa03

$

In our case, a total of about 90 commands were executed on the HMCs (in 8 seconds).

Note: In one of the next versions of the LPAR tool we will significantly reduce this through parallelization.

When using the LPAR tool in scripts, especially if these are then run automatically, you should run “hmc rescan” at the beginning of the script. This ensures that the information about all LPARs is up to date.