When updating the OS, and applying multiple updates it may be pertinent to perform the OS upgrades via the NIM server. This will allow you to update the system (and apply additional updates) live. This is done by cloning the rootvg (Bare metal OS) to another DISK, and then performing all of the OS upgrades and procedures to that disk while NOT affecting the running system. For the sake of this tutorial, we will assume your main ROOTVG disk is called hdisk0, and your “alternate_rootvg” disk is hdisk1. They should be the same size.
This is the way it is supposed to happen anyways. For this scenario, I will be updating a scratch LPAR from 6100-09-05-1524 to 6100-09-08-1642.
To add the LPP_SOURCE, one will first create a directory to store the LPP files, and one will also “mount” the AIX media (DVD #1), and copy the files in as required.
# mkdir /export/lpp_source/lpp_aix6100-09-08
# loopmount -i /tmp/AIX_Base_Install_1_of_2__6100-09-08.2_012017.iso -o "-V cdrfs -o ro" -m /mnt
# nim -o define -t lpp_source -a server=master -a location=/export/lpp_source/lpp_aix6100-09-09 -a source=/mnt/ lpp_aix6100-09-08
The above steps will create the directory, and then copy the lpp_source of aix6100-09-08 into /export/lpp_source/lpp_aix6100-09-08
Once it is completed, you can verify with:
# nim -o check lpp_aix6100-09-08
On the client LPAR, we want to apply the OS update. However, there is a requirement to have the fileset installed first. Check to see if the required fileset is installed with:
lslpp -L |grep bos.alt
If it’s installed, you’ll get output similar to the following:
bos.alt_disk_install.boot_images
bos.alt_disk_install.rte 6.1.9.45 C F Alternate Disk Installation
If you don’t have the bos.alt_disk_install.rte fileset installed, then you will want to get the files from the Original AIX media, and the updated fileset for your current running system. For this example, we would want the bos.alt_disk_image.rte from AIX 6.1 TL0 SP0 media, and also the bos.alt_diskimage_6.1.9.45_u (from AIX 6.1 TL9 SP5).
Both packages could then be installed with:
installp -acXYd . bos.alt_disk_image
Next we’ll apply the OS update from the NIM server, using the alt-disk commands:
# nim -o alt_disk_install -a source=rootvg -a disk=hdisk1 -a fixes=update_all -a lpp_source=lpp_aix6100-09-08 -a installp_flags="-cNgXvY" -a force=yes
The process will start, and it can be monitored on the client with:
# tail -f /var/adm/ras/alt_disk_inst.log
Once the system has finished updating, you may wish to “wake-up” the alt_rootvg and check to ensure everything is up-to-date. There is a chance that some packages will be holding back your upgrade. In which case you may wish to remove or install the newer filesets.
## To Mount the alt_rootvg, and manipulate the structure ##
* alt_rootvg_op -Wd hdisk1
* INUCLIENTS=1 chroot /alt_inst /usr/bin/oslevel -s
### Determine OS Level in alt_rootvg
* INUCLIENTS=1 chroot /alt_inst /usr/sbin/instfix -icq | /usr/bin/grep :-:
## Determine missing packages preventing OSLEVEL from displaying correctly
Example output:
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/instfix -icq | /usr/bin/grep :-:
IV69902:devices.pciex.df1028e214105104.rte:6.1.9.100:6.1.9.0:-:LNCENTDD UNUSED PORTS LOGS LNCENT_PLINK_DOWN
IV72092:bos.cifs_fs.rte:6.1.9.200:6.1.9.45:-:CIFS_FS HANG OR CRASH DUE TO CORRUPT SMBNODE TREE
IV72472:bos.cifs_fs.rte:6.1.9.100:6.1.9.45:-:CIFS_FS CRASH IN SMBFS_FINDOPEN OR VNOP_HOLD
IV80334:bos.cifs_fs.rte:6.1.9.200:6.1.9.45:-:CIFS_FS CRASH DUE TO TREE CORRUPTION
61-09-061543_SP:bos.cifs_fs.rte:6.1.9.100:6.1.9.45:-:AIX 6100-09-06 Service Pack
61-09-061543_SP:openssh.base.client:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-06 Service Pack
61-09-061543_SP:openssh.base.server:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-06 Service Pack
61-09-061543_SP:openssh.license:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-06 Service Pack
61-09-061543_SP:openssh.man.en_US:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-06 Service Pack
61-09-071614_SP:bos.cifs_fs.rte:6.1.9.101:6.1.9.45:-:AIX 6100-09-07 Service Pack
61-09-071614_SP:openssh.base.client:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-07 Service Pack
61-09-071614_SP:openssh.base.server:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-07 Service Pack
61-09-071614_SP:openssh.license:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-07 Service Pack
61-09-071614_SP:openssh.man.en_US:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-07 Service Pack
IV86763:bos.cifs_fs.rte:6.1.9.200:6.1.9.45:-:CIFS CRASH DUE TO CORRUPT SMB_RQ CHAIN
61-09-081642_SP:bos.cifs_fs.rte:6.1.9.200:6.1.9.45:-:AIX 6100-09-08 Service Pack
61-09-081642_SP:openssh.base.client:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-08 Service Pack
61-09-081642_SP:openssh.base.server:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-08 Service Pack
61-09-081642_SP:openssh.license:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-08 Service Pack
61-09-081642_SP:openssh.man.en_US:6.0.0.6201:6.0.0.6103:-:AIX 6100-09-08 Service Pack
You will notice there are packages that need removal / addition.
First, let’s mount the AIX media (available as a NFS export from your NIM server).
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/mount nimserver01:/nim/aix /alt_inst/mnt
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/installp -ub devices.pciex.df1028e214105104.rte devices.pciex.df1028e214105104.diag
## Removal of FILESET
# INUCLIENTS=1 chroot /alt_inst /usr/sbin/installp -abcXYd /mnt/6100-09-08-base-files bos.cifs_fs.rte ## Install package, w/o bosboot ##
UPDATE: A previous version referred to an issue installing openssh. This was due to having the wrong VARIABLE name. It HAS to be “INUCLIENTS”.
#### UNMOUNT MEDIA ==> VERY IMPORTANT prior to putting alt_rootvg to sleep ##### Failure to do this step, will cause the alt_rootvg to be in an inconsistent state. Rebooting like this will cause corruption in the alt_rootvg (and possibly the regular rootvg) and the system will be unable to boot.
# umount /alt_inst/mnt
# alt_rootvg -S -t
## Put alt_rootvg back to sleep, and build the bosboot.