Skip to main content

Minimizing Downtime for AIX Updates

Chris Gibson details an NIM alternate disk enhancement that allows AIX updates to be installed with minimal disruption

TechChannel Data Management

The NIM alternate disk migration tool is well known for its ability to migrate a system to a later version of AIX, for example from AIX 7.2 to 7.3. Starting with AIX 7.3 Technology Level 3, the tool has been enhanced so that it can also update a system to a newer Technology Level (TL) or Service Pack (SP); for example, from AIX 7.3 TL3 SP0 to AIX 7.3 TL3 SP1. The new -U flag instructs the tool to perform an AIX TL or SP update by using the given NIM LPP source and SPOT resources.

Refer to the command reference for more information. If you’re not familiar with the NIM alternate disk tool, please take the time to read the “Using NIM Alternate Disk Migration (NIMADM)” article.

Benefit

The main reason administrators employ NIM alternate disk migration, or nimadm, is that your downtime is reduced because you can migrate the system while it is still running and functioning. All that’s required is a reboot after the migration. Well, now the same applies when using this tool to install AIX updates. However, if you are already using AIX Live Update to install TLs and SPs, then you already know that it’s possible to avoid an outage, and a reboot, entirely, but there may be cases where an administrator doesn’t have the option of using AIX Live Update. In those cases, this enhancement may be of great value.

Using the New Feature

Let’s take a quick look at how to use this new feature. In the example environment we have an AIX NIM server, named nim1, running AIX 7.3 TL3 SP1 (7300-03-01-2520), and an AIX NIM client, named aix1, running AIX 7.3 TL3 SP0 (7300-03-00-2446). Remember that your NIM server should always be at the highest, latest AIX version and level.

Note: Before updating your NIM server to TL3 SP1, please read this blog post.

AIX version and level information from the NIM server:

root@nim1 / # oslevel -s
7300-03-01-2520

AIX version and level information from the NIM client:

root@aix1 / # oslevel -s
7300-03-00-2446

The nimadm tool requires a spare disk on the NIM client to create the alternate root volume group (rootvg). Our NIM client has an unused disk named hdisk1.

root@aix1 / # lspv
hdisk0          00f9c18f733ff013              rootvg          active
hdisk1          00f9c18f12734635              None

We prefer to call nimadm with the -j option and use a cache volume group (VG). We’ve already configured a dedicated volume group (nimadmvg) on the NIM server for this purpose, and it’s large enough to hold a complete copy of the clients rootvg:

root@nim1 / # lspv
hdisk0          00f9c18fa8bd126b              rootvg          active
hdisk1          00f9c18f124e2a5d              nimadmvg        active

Performing an AIX TL or SP Update Using an LPP Source and SPOT

We call the nimadm tool to update the NIM client, from 7300-03-00-2446 to 7300-03-01-2520, with the following command and options:

nimadm -j nimadmvg -c aix1 -s spotAIX73TL3SP1 -l AIX73TL3SP1 -d hdisk1 -Y -A -U

The options specified are:

  • -j: flag specifies the cache VG on the NIM server which will be used for the update operation; in this example it’s nimadmvg.
  • -c: is the client’s name, aix1.
  • -s: is the SPOT name. This is the AIX 7.3 TL3 SP1 SPOT resource we’ve already created on our NIM server.
  • -l: is the lpp_source name. This is the AIX 7.3 TL3 SP1 LPP source we’ve already created on our NIM server.
  • -d: is the disk name for the alternate root volume group (altinst_rootvg) on the NIM client, hdisk1 in this example.
  • -Y: agrees to the software license agreements for software that will be installed during the update operation.
  • -A: Adds a timestamp (MM-DD-YYYY HH-MM-SS) at the start of each phase.
  • -U: Performs an AIX TL or SP update by using the given LPP source and SPOT. Note: This option is supported starting with AIX 7.3, Technology Level 3.

The command starts and nimadm executes all of its 12 phases (refer to the nimadm documentation for details on each phase):

root@nim1 / # nimadm -j nimadmvg -c aix1 -s spotAIX73TL3SP1 -l AIX73TL3SP1 -d hdisk1 -Y -A -U
Initializing the NIM master.
Initializing NIM client aix1.
Verifying alt_disk_migration eligibility.
Initializing log: /var/adm/ras/alt_mig/aix1_alt_mig.log
Starting Alternate Disk Migration.
+-----------------------------------------------------------------------------+
08-04-2025 18:53:15 Executing nimadm phase 1.
+-----------------------------------------------------------------------------+
Cloning altinst_rootvg on client, Phase 1.
Client alt_disk_install command: alt_disk_copy -j -M 7.3 -P1 -d "hdisk1"
Calling mkszfile to create new /image.data file.
Checking disk sizes.
LOGICAL_VOLUME= hd11admin
FS_LV= /dev/hd11admin
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
Creating logical volume alt_hd6
Creating logical volume alt_hd8Creating logical volume alt_hd4
Creating logical volume alt_hd2
Creating logical volume alt_hd9var
Creating logical volume alt_hd3
Creating logical volume alt_hd1
Creating logical volume alt_hd10opt
Creating logical volume alt_hd11admin
Creating logical volume alt_lg_dumplv
Creating logical volume alt_livedump
Creating /alt_inst/ file system.
Creating /alt_inst/admin file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/var file system.
Creating /alt_inst/var/adm/ras/livedump file system.
Generating a list of files
for backup and restore into the alternate file system...
Phase 1 complete.
+-----------------------------------------------------------------------------+
08-04-2025 18:54:19 Executing nimadm phase 2.
+-----------------------------------------------------------------------------+
Creating nimadm cache file systems on volume group nimadmvg.
Checking for initial required migration space.
Creating cache file system /aix1_alt/alt_inst
Creating cache file system /aix1_alt/alt_inst/admin
Creating cache file system /aix1_alt/alt_inst/home
Creating cache file system /aix1_alt/alt_inst/opt
Creating cache file system /aix1_alt/alt_inst/tmp
Creating cache file system /aix1_alt/alt_inst/usr
Creating cache file system /aix1_alt/alt_inst/var
Creating cache file system /aix1_alt/alt_inst/var/adm/ras/livedump
Phase 2 complete.
+-----------------------------------------------------------------------------+
08-04-2025 18:56:38 Executing nimadm phase 3.
+-----------------------------------------------------------------------------+
Syncing client data to cache ...
...etc...
+-----------------------------------------------------------------------------+
08-04-2025 18:59:37 Executing nimadm phase 6.
+-----------------------------------------------------------------------------+
...etc...
Installing and migrating software.
Filesets processed:  111 of 121  (Total time:  11 mins 23 secs).
installp:  APPLYING software for:
        bos.ecc_client.rte 7.3.3.1
. . . . . << Copyright notice for bos.ecc_client >> . . . . . . .
 Licensed Materials - Property of IBM
 5765CD300
   Copyright International Business Machines Corp. 2006, 2025.
 All rights reserved.
 US Government Users Restricted Rights - Use, duplication or disclosure
 restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for bos.ecc_client >>. . . .
Filesets processed:  112 of 121  (Total time:  11 mins 39 secs).
installp:  APPLYING software for:
        bos.cluster.rte 7.3.3.1
...etc...
install_all_updates: Checking for recommended maintenance level 7300-03.
install_all_updates: Executing /usr/bin/oslevel -rf, Result = 7300-03
install_all_updates: Verification completed.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
install_all_updates: Result = SUCCESS
Phase 6 complete.
+-----------------------------------------------------------------------------+
08-04-2025 19:14:03 Executing nimadm phase 7.
+-----------------------------------------------------------------------------+
nimadm: There is no user customization script specified for this phase.
Phase 7 complete.
...etc...
+-----------------------------------------------------------------------------+
08-04-2025 19:27:22 Executing nimadm phase 12.
+-----------------------------------------------------------------------------+
Cleaning up alt_disk_migration on the NIM master.
Cleaning up alt_disk_migration on client aix1.
Phase 12 complete.

When the nimadm update operation is finished, the client is left with a new altinst_rootvg disk (on hdisk1) that has been updated with the new SP. We can verify this, before rebooting, by waking up the alternate rootvg and running the oslevel command in a chroot environment. We then put the alternate rootvg to sleep again when we are done.

root@aix1 / # lspv
hdisk0          00f9c18f733ff013              rootvg          activehdisk1          00f9c18f12734635              altinst_rootvg
root@aix1 / # oslevel -s
7300-03-00-2446
root@aix1 / # alt_rootvg_op -W -d hdisk1
Waking up altinst_rootvg volume group ...
root@aix1 / # chroot /alt_inst /alt_inst/bin/ksh oslevel -s
7300-03-01-2520
root@aix1 / # alt_rootvg_op -S -d hdisk1
Putting volume group altinst_rootvg to sleep ...
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/home
forced unmount of /alt_inst/admin
forced unmount of /alt_inst/admin
forced unmount of /alt_inst
forced unmount of /alt_inst
Fixing LV control blocks...
Fixing file system superblocks...
root@aix1 / #

We observe that nimadm has already set the clients bootlist to the new alternate disk.

root@aix1 / # bootlist -m normal -o
hdisk1 blv=hd5 pathid=0

Simply rebooting the system (with shutdown -Fr) restarts it on the alternate rootvg. We can confirm the system is running SP1 with the oslevel command. And if we need to return to the previous SP level we can simply reboot from the old_rootvg disk (hdisk0).

root@aix1 / # oslevel -s
7300-03-01-2520
root@aix1 / # lspv
hdisk0          00f9c18f733ff013              old_rootvg
hdisk1          00f9c18f12734635              rootvg          active

NIM Resource Creation

To use this new feature you must first create the required AIX 7.3 TL3 SP1 LPP source and SPOT resources on your NIM server. At this time, it is necessary to create these resources using base level installation media (typically downloaded from the IBM ESS site). If you create what is known as mixed-level LPP source resource (which is common practice, where you have a mixed lpp_source, one that contains multiple levels of filesets, like 7.3.1.3 and 7.3.3.0, for example), you’ll find that soon after you initiate the nimadm operation, it will display “Cleaning up alt_disk_migration on the NIM master” and then exit, with a return code of 2.

root@nim1 / # nimadm -j nimadmvg -c aix1 -s spotAIX73TL3SP1 -l AIX73TL3SP1 -d hdisk2 -Y -A -U
Initializing the NIM master.
Initializing NIM client aix1.
Cleaning up alt_disk_migration on the NIM master.
root@nim1 /tmp # echo $?
2

This mixed LPP source causes the nimadm -U logic to receive multiple LPP_LEVEL entries, leading to a failure during version parsing and comparison. This behavior will likely change in the future. However, for now, ensure that your resources do not contain filesets with mixed levels. You can check your NIM LPP sources for evidence of this using the nim -o showres command. In the example output, below, there are mixed level filesets, which are inappropriate for use with nimadm -U.

# nim -o showres AIX73TL3SP1 | grep bos.rte.install
bos.rte.install        7.3.1.3                    SF N usr,root 
bos.rte.install        7.3.3.0                    SF N usr,root

Below is output from a NIM LPP source that does not contain mixed level filesets and is fine to use with nimadm -U.

# nim -o showres AIX73TL3SP1 | grep bos.rte.install
bos.rte.install      7.3.3.1                  SF N usr,root

Minimize Downtime

For many years the nimadm utility has offered several advantages over conventional migrations, primarily, allowing an AIX system to be migrated to a new version of AIX with minimal downtime and low risk. Because nimadm operations are all performed on a copy of the clients rootvg, there’s no outage required, which means your applications can remain active while you migrate. All that is required is that you reboot the system at a convenient time to restart it on the new version of AIX. Now those same advantages can apply when performing updates and not just AIX migrations. This is a very nice enhancement indeed.

Of course if you want to avoid a reboot entirely and install AIX updates without an outage, then you really should be using AIX Live Update. We can only dream that one day we’ll be able to use AIX Live Update for migrations also.

If you’re not familiar with NIM, AIX migrations or AIX Live Update, please be sure to check out some of the available training from IBM. See the references section for links to relevant courses.

References

nimadm command

Using NIM Alternate Disk Migration (NIMADM)

Migrating to AIX 7.2 with nimadm

AIX 7.3 TL3 SP1 and “rcmd” errors

Migrating to AIX 7.2 with Minimal Downtime (PDF)

Migrating to AIX 7.2 with Minimal Downtime (Video)

AIX Network Installation Management Concepts and Configuration

Mastering AIX migrations

Mastering AIX Live Update


Key Enterprises LLC is committed to ensuring digital accessibility for techchannel.com for people with disabilities. We are continually improving the user experience for everyone, and applying the relevant accessibility standards.