AIX Patching
Upgrading AIX 5.3 using alt_disk_install
Assumptions
1. The rootvg volume group is mirrored across hdisk0 and hdisk1
2. "bos.alt_disk_install" and "bos.alt_disk_install.boot_images " are installed
3. The dump device is hd7
Commands (Assumptions)
- lsvg -l rootvg
- lslpp -al " bos.alt_disk_install " or lslpp –l | grep –I bos.alt_disk_install
- sysdumpdev –l
note: To designate logical volume hd7 as the primary dump device, enter: sysdumpdev – P /dev/hd7
Performing mksysb and pre-installation tasks:
Mount nimserver in a temporary mount point and take mksysb
1. Create an mksysb image and copy it to <NIM SERVER>:/mksysb_images
Steps:
a) Mkdir mnt-tma in host server and now follow steps....
b)mount nim1.srv.uk.deuba.com:/usr/sys/inst.images/SOURCE /mnt-tma
2. Remove Relicore packages, if already installed on the system
3. Check the current AIX level:
# oslevel -s | tee -a /tmp/oslevel.txt
# lslpp -l | tee -a /tmp/lslpp.txt
And Copy the above two files to a remote server for safekeeping.
4. Check the kernel mode (TL11 requires a 64-bit kernel):
# bootinfo –K and see if it’s 64
5. If the TL version to be updated is prior to AIX 5.3 TL10 and above or AIX 6.1 TL3 and above, make sure all interim fixes (ifix) have been removed from the system.
# emgr –l
To remove an ifix:
# emgr –r –L <ifix Label>
6. Check if all filesets are applied and are valid:
# instfix –i | grep ML
# lppchk –v
7. Check filesets in APPLIED state and commit them:
# installp -s
# installp -c all <== Commit applied filesets (optional)
# installp -s
0503-459 installp: No filesets were found in the Software
Vital Product Database in the APPLIED state.
8. Stop all applications and databases .
9.Set the auto-varyon flag of all non-rootvg volume groups to no:
# chvg -a n <vgname>
10.Check last boot device:
Bootinfo –b
11.Create boot image on hdisk0 and hdisk1
Bosboot –ad /dev/hdisk0
Bosboot –ad /dev/hdisk1
12.Check bootlist
Bootlist –m normal –o
13.Change Boot device if its required:
Bootlist –m normal hdisk0 hdisk1
14.Reboot the server to ensure the system comes up without any problem:
# touch /tmp/allowshutdown
# shutdown –Fr
Break the rootvg mirrors
1. Check that rootvg is mirrored across 2 disks (dump area may not be mirrored):
# lsvg -p rootvg
# lsvg -l rootvg
2. Unmirror rootvg:
# unmirrorvg rootvg hdisk1 <= Don't remove the mirror OS was booted from
3. Remove the boot block from hdisk1 (optional, but it is safer):
# chpv -c hdisk1
4. Reconfigure hdisk0 as the only boot device:
# bosboot -a -d /dev/hdisk0
# bootlist -m normal hdisk0
# bootlist -m normal –
5.Display the dump devices:
# sysdumpdev -l
6.Record the size of the dump device so that it can be recreated later:
# lslv hd7 > /tmp/sysdump.save
7.Remove the dump device:
# sysdumpdev -P -p /dev/sysdumpnull
# rmlv hd7
8.Compare the "LP" and "PV" is the same for each logical device:
# lsvg -l rootvg
9.If any logical volumes are still mirrored (i.e. LPs and PVs columns are not the same), reduce the number of copies to 1:
#lslv –l lv1
# rmlvcopy <lvname> 1 hdisk1
10.Make sure hdisk1 contains no LV:
# lspv -l hdisk1
11.Remove hdisk1 from rootvg :
# reducevg rootvg hdisk1
12.Make a backup of rootvg on hdisk1:
# alt_disk_install -C -P all -B hdisk1 - OR –
# alt_disk_copy -P "all" -B -d "hdisk1"
Note: "-B" disallows the setting of bootlist to hdisk1 at the end of cloning
Perform OS update:
1. location of update media:
/net/NIM SERVER/export/lpp_source/53/lpp-5300-11-2/installp/ppc
2.Install LPP install commands for TL11:
# cd <location of update media>
# installp -agX -d . bos.rte.install
3.Run a preview of update to the desired TL level:
# cd <location of update media>
# /usr/lib/instl/sm_inst installp_cmd -apgXY -d . -f '_update_all' \
| tee -a /tmp/preview.out
4. Install the updates to APPLIED state:
# cd <location of update media>
# /usr/lib/instl/sm_inst installp_cmd -agXY -d . -f '_update_all' \
| tee -a /tmp/update.out
5. Check the new TL level:
# lppcheck -v
# oslevel -s
6.If the output does not show the correct OS level 5300-11-02-1007, determine which filesets didn’t get updated:
# oslevel -rl 5300-11
Note: You may need to run installp again to update these filesets to the correct OS level
7. Set hdisk0 (or the disk with the active rootvg) to first in the bootlist:
# bootlist -m normal hdisk0
# bootlist -m normal –o
8. Reboot the server:
# touch /tmp/allowshutdown
# shutdown -Fr now
Validate after OS update is complete
1. Check that the system is booted from the correct image:
# bosboot -b
2. Check that all patches were installed:
#oslevel -s
# lppchk -v
3.Set the auto-varyon flag on all non-rootvg volume groups to yes:
# varyonvg <vgname>
# chvg -a y <vgname>
4.Contact other support groups for application/database validation
Mirror rootvg if OS update is successful
1. Clean up the alt_disk_install:
# alt_disk_install -X altinst_rootvg - OR -
# alt_rootvg_op -X altinst_rootvg
2. Add hdisk1 back to rootvg:
# extendvg -f rootvg hdisk1
3. Mirror rootvg in the background:
# mirrorvg -S rootvg hdisk1
4. Check periodically if mirrorvg is complete:
# lsvg -l rootvg
5. Mirror any logical volumes that were not mirrored:
# mklvcopy -k <lvname> 2 hdisk1
6. Recreate the dump device:
# mklv -y hd7 -t sysdump rootvg xx hdisk0
7. Change the dump device to the original configuration:
# sysdumpdev -P -p /dev/hd7
8. Configure hdisk0 and hdisk1 as the boot devices:
# bosboot -a -d /dev/hdisk0
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o