Friday 18 November 2016

How to upgrade TL and SP in AIX using alternate disk(alt_disk_copy)


Many method available to upgrade/patch AIX technology level(TL) and service pack(SP) to latest level.This is perfect method to update the AIX server using alternate disk, there is no impact to original rootvg whatever the upgrade you are performing that will goes into alternate disk.To restart the server you have to take downtime from customer or application/database team then you can say it will take minimum downtime. For upgrade/update/migration activities you must take mksysb backup, this backup will useful to restore AIX OS if incase any issues. This mksysb image you can restore by creating NIM resource like mksysb and SPOT .

I may suggest you mksysb backup is optional for alternate disk upgrade(alt_disk_copy) . If you face any issues during or after the upgrade its very easy to backout, just to change the bootlist and restart the system to old rootvg. You must install latest level of bos.alt_disk_install.rte and bos.alt_disk_install.boot_images filesets to current AIX OS, you do not install most cases AIX TL upgrade will fail.

Advantages :
1. Server up and running you can do the OS upgrade/Patching
2. Minimum downtime
3. Easy to backout/rollback to previous version.


Pre-Checks:


1. Verify current operating system version
   # oslevel -s

2. Check currently installed AIX TL and SP levels consistency, make sure no missed filesets for AIX technology level(ML) and service pack(SP)
   # instfix -i | grep ML
   # instfix -i | grep SP

3. Need to check if any filesets missed
   # lppchk -vm3

4. List the installed ifixes/emergency fixes.
   # emgr -l

5. To remove the ifixes/emergency fixes
   # emgr -l
   # emgr -rL <fix>

6. Commit all applied filesets installed on current AIX level
   # installp -s
   # installp -c all

Download the new packages from IBM Fix central(https://www-945.ibm.com/support/fixcentral/) , copy to destination server through ftp or winscp.
In this method mksysb backup not must to take, because upgrading is going on alternate disk. It wont impact to original rootvg

6. Install latest level packages of bos.alt_disk_install.rte and bos.alt_disk_install.boot_images
   # smit installp

Implementation Steps :
If rootvg mirrored follow the below steps, not ignore step 1

1. Reduce the disk from rootvg and use it for upgrade OS using alt_disk_copy
   # unmirrorvg rootvg hdisk5
   # reducevg -df rootvg hdisk5
   # chpv -c hdisk5
   # ipl_varyon -i (To check bootable devices)
   # bootlist -m normal -o
   # bosboot -ad /dev/hdisk0

2. Not mirrored get the new disk(equal or higher size of rootvg disk) from storage team.
   Run following command to take alt disk clone and upgrade to latest level.
   # alt_disk_copy -d <altdiskname> -b update_all -l <TL Location>

   # alt_disk_copy -d hdisk5 -b update_all -l /mnt/AIX_TL

   -d represents alternate disk name
   -b represents bundle
   -l represent location of the TL or SP packages.

Recommended : Execute the command in nohup, to avoid the network issues while doing activity

   # nohup alt_disk_copy -d hdisk5 -b update_all -l /mnt/AIX_TL > /tmp/altinst_log &

 To verify the output
   # tail -f /tmp/altinst_log

3. Verify the "altinst_rootvg"  created on hdisk5
   # lspv

Once step 2 completed, bootlist automatically set to target disk hdisk5 and reboot the server.

Post-Checks and Verification :

1. Change the bootlist, if not updated to target disk
   # bootlist -m normal hdisk5 hdisk0

2. Reboot the server, it should came up with new oslevel
   # shutdown -Fr
   # oslevel -s

3. Verify installed AIX OS ML(TL) and SP levels consistency, install if any missed
   # instfix -i | grep ML
   # instfix -i | grep SP
   # lppchk -vm3

4. If any filesets missed, check what all missed TL or SP
   # oslevel -rl <TL>
  Example : oslevel -rl 7100-04

  # oslevel -sl <SP>
  Example : oslevel -rl 71-04-011543


alt_disk_copy issues :
You got the below error while doing alt_disk_copy, must check the bos.alt_disk_install.rte and bos.alt_disk_install.boot_images filesets updated to latest level or not.
If not install or update it to latest version.

0301-150 bosboot: Invalid or no boot device specified!
usage:  bosboot {-a | -v} [-d device] [-p proto] [-k kernel] [-l lvdev]
                [-b file] [-M primary|standby|both] [-D|-I] [-LTq]










Thanks for reading this post, any queries please write a comment


7 comments:

  1. Very Good Posting for AIX Patching

    ReplyDelete
  2. Here I think u need to correct the procedure ..
    If you remove the Ifix from the server , how u will recover it ?
    It should remove from altdisk not rootvg disk ..
    For example :INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -r -L IV68547m4a
    INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -r -L IV65814m3b
    INUCLIENTS=1 chroot /alt_inst /usr/sbin/emgr -r -L IV59492s4c

    ReplyDelete
  3. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. http://desktopsnaptube.beep.com/

    ReplyDelete
  4. very nice and helpful blog .

    ReplyDelete
  5. Its great ! But a small correction .



    # oslevel -rl ===> oslevel -sl
    Example : oslevel -rl 71-04-011543

    ReplyDelete

Privacy Policy

  Privacy Policy for UNIX TECH INFO At UNIX TECH INFO, accessible from https://unixworld4admin.blogspot.com/, one of our main priorities is ...