nimadm

There's an excellent document describing nimadm by Chris Gibson. Here are my notes based on our experience during upgrades from AIX 6.1 to 7.1.

I will keep this page updated with new information.

Preparation

The client must have a clone disk with a size that's equal or larger than the rootvg's size.

The use of rsh for connect method is recommended over nimsh which failed to work for us.

To have rsh connectivity:

  • add the NIM master and the client to each other's resolvable hostname (on the interfaces communicating with each other where there's more)
  • enable rsh in client's inetd (I hope you don't have it running already):
# chsubserver -a -v shell -p tcp -r inetd

Test rsh connectivity with 'rsh $client hostname' or something in both directions

  • enable 'shell' connect method for NIM:

NIM master:

# lsnim -l $myhost
# nim -o change -a connect=shell -a cpuid= $myhost

Note that the cpuid attribute is also reset (consider it as a 'cleanup')

NIM client:

# vi /etc/niminfo
...
export NIM_SHELL=shell
...

Remember that anything you are doing after the copy has started from the client may not be transferred to the cloned disk.

Execution and logs

NIM master

# nimadm -j <NIM VG> -c <client> -s <SPOT> -l <lppsource> -d hdiskXX -Y
# tail -f /var/adm/ras/alt_mig/<client>_alt_mig.log
# alog -o -t nim | tail -100

nimadm client (with nimsh method)

# tail -f /var/adm/ras/nimsh.log

Typically, it takes ~1 hour per client. The installation phase is ~30 minutes.

Always check the execution logs, even after a seemingly successful operation!

Post-install

Make sure you have the previous SSH host keys in place and/or restore them.

Check and correct OS level. We seem to have an incomplete set in the LPP source and must update filesets on every host after upgrade to have the desired OS level.

Common failures

rsh communication is not set up properly in both ways OR nimsh is in use:

0505-158 nimadm: WARNING, unexpected result from the /alt_inst/tmp/init_br_chrp command.
ksh: /alt_inst/tmp/init_br_chrp: 0403-006 Execute permission denied.

---

Anything like this in phase 5 is a warning that the copy was incomplete due to insufficient FS space:

/opt/freeware/bin/rpm: A file or directory in the path name does not exist.
/lpp/csm.core/deinstl/csm.core.unconfig[3]: /opt/csm/bin/csmcoreuncfg:  not found.
csm.core.unconfig: Error encountered while executing /opt/csm/bin/csmcoreuncfg
/usr/lpp/csm.deploy/deinstl/csm.deploy.unconfig[17]: /opt/csm/install/:  not found.
/usr/lpp/csm.deploy/deinstl/csm.deploy.unconfig[26]: /opt/csm/install/warewulf:  not found.

---

The same in the installation phase. It usually fails here and backs out of the process.

restore: 0511-147 Unpacking file size error.
The original size of ./usr/lpp/bos.txt/liblpp.a is 367964; restored size is 367961.
restore: 0511-708 There is an internal unpacking error: decode failure
restore: 0511-121 Out of space.

---

When you forgot to cleanup after a failure and the filesystems are still in place from the previous attempt:

Creating cache file system /host_alt/alt_inst
crfs: 0506-909 /host_alt/alt_inst file system already exists.
0505-213 nimadm: ATTENTION, /usr/sbin/crfs returned an unexpected result.
0505-214 nimadm: Error creating cache file systems.

Recovery from failure

This applies to the case where the migration fails in the late phases.

You need to clean up altinst_rootvg and NIM master LVs manually.

NIM master:

# lsvg -l nimvg | grep <client>| while read lv type lps pps pvs state fs; do rmfs $fs; done

NIM client:

# alt_rootvg_op -X altinst_rootvg

References

nimadm Manual

NIM error messages

Migrating to AIX 6.1 with nimadm