Migration Automaton

OS upgrades (upgrade from AIX 7.1 to 7.2 or 7.3, upgrade from AIX 7.2 to 7.3) can be carried out easily with the migration automaton. The migration is carried out on the NIM server, i.e. the system is still available during the migration. The migration is carried out using an alternate disk copy. In the event of an error, the original version of the operating system can be easily rebooted.

A sample run (excerpt) is shown below:

The migration automaton is started on the NIM server with the AIX_migrate command. The arguments are the name of the NIM client to be migrated (in our case the TSM server aixtsm01) and the name of the LPP source to be used for the upgrade (in our case this is called aix720502lpp).:

aixnim # AIX_migrate aixtsm01 aix720502lpp

First, some checks are performed:

INFO: is 'aixtsm01' a NIM client ... yes
INFO: is 'aix720502lpp' a lpp_source ... yes
INFO: is 'nimadm_pre' a NIM script ... yes
INFO: is 'nimadm_post' a NIM script ... yes
INFO: determine VG to use for caching ... nimadm1vg
INFO: is 'aix720502spot' a spot ... yes
INFO: 'bos.alt_disk_install.rte' version of NIM master ...
INFO: 'bos.alt_disk_install.rte' version of spot ...
INFO: connect type of 'aixtsm01' is ... nimsh (secure)
INFO: check connection to 'aixtsm01' ... success
INFO: unmirror command '/opt/pwrcmps/bin/free_disk' present on 'aixtsm01' ... yes

The rootvg is then un-mirrored on the NIM client in order to gain a physical volume for an altinst_rootvg:

INFO: performing unmirroring on 'aixtsm01'
INFO: checking whether altinst_rootvg exists ... no
INFO: checking whether old_rootvg exists ... no
INFO: has rootvg more than one hdisk ... yes (2)
INFO: getting IPL-device ... hdisk0
INFO: verify hdisk0 is in rootvg ... yes
INFO: get non-IPL hdisks from rootvg ... hdisk1
INFO: checking for secondary dump device ... /dev/lvdump01
INFO: removing secondary dump device ... done
INFO: unmirror rootvg ...
INFO: hd9var on hdisk1 ... removed copy
INFO: hd3 on hdisk1 ... removed copy
INFO: hd1 on hdisk1 ... removed copy
INFO: hd10opt on hdisk1 ... removed copy
INFO: hd5 on hdisk1 ... removed copy
INFO: clear boot record on hdisk1 ... done
INFO: hd6 on hdisk1 ... removed copy
INFO: hd8 on hdisk1 ... removed copy
INFO: hd4 on hdisk1 ... removed copy
INFO: hd2 on hdisk1 ... removed copy
INFO: livedump on hdisk1 ... removed copy
INFO: hd11admin on hdisk1 ... removed copy
INFO: remove hdisk1 from rootvg ... done
INFO: updating bootlist ... done
INFO: performing bosboot ... done
SUCCESS: hdisk1
INFO: hdisk 'hdisk1' has been freed

After that, the upgrade process starts using nimadm:

INFO: starting nimadm task
INFO: nimadm -c aixtsm01 -j nimadm1vg -s aix720502spot -l aix720502lpp -d hdisk1 -a nimadm_pre -z nimadm_post -Y
Initializing the NIM master.
Initializing NIM client aixtsm01.

Verifying alt_disk_migration eligibility.
Initializing log: /var/adm/ras/alt_mig/aixtsm01_alt_mig.log
Starting Alternate Disk Migration.

Executing nimadm phase 1.
Cloning altinst_rootvg on client, Phase 1.

Custom scripts can be run prior to the migration:

Executing nimadm phase 4.
Executing user chroot script /export/nim/cust_scripts/nimadm_pre.ksh.

This can be used, for example, to back up configuration files, uninstall fixes, etc.

The actual upgrade of the operating system is carried out in phase 6:

Executing nimadm phase 6.
Installing and migrating software.
Updating install utilities.

                         Installing Software...

installp: APPLYING software for:

. . . . . << Copyright notice for xlsmp.rte >> . . . . . . .
Licensed Materials - Property of IBM

   Copyright IBM Corp. 1997, 2018.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for xlsmp.rte >>. . . .

Filesets processed:  1 of 1340  (Total time:  12 secs).

This phase can take some time as this is where most of the work is done. At the end of this phase, a corresponding success message is issued:

install_all_updates: Checking for recommended maintenance level 7200-05.
install_all_updates: Executing /usr/bin/oslevel -rf, Result = 7200-05
install_all_updates: Verification completed.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
install_all_updates: Result = SUCCESS
Known Recommended Maintenance Levels

If desired, you can run your own scripts after the migration to the new AIX version:

Executing nimadm phase 7.
Executing user chroot script /export/nim/cust_scripts/nimadm_post.ksh.

In the further phases, the data is finally copied back to the NIM client. The migration is complete with cleanup in stage 12:

Executing nimadm phase 12.
Cleaning up alt_disk_migration on the NIM master.
Cleaning up alt_disk_migration on client aixtsm01.

aixnim #

 Im Anschluß muss der NIM-Client lediglich rebootet werden:

aixtsm01 # oslevel -s
aixtsm01 # shutdown -r now
aixtsm01 # oslevel -s
aixtsm01 #

(Note: The reboot can also be triggered by the migration automaton.)