Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday, 10 December 2013

How to upgrade the TL level using an alternate disk method.



root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    rootvg          active
hdisk1          000a738829e828ce                    None           
root@nimserver(/)#

root@nimserver(/)# oslevel -s
5300-04-00
root@nimserver(/)#

Now copy the entire disk (hdisk0) to hdisk1 (It take ~ 30 Min)

root@nimserver(/)# alt_disk_install -C hdisk1
+-----------------------------------------------------------------------------+
ATTENTION: calling new module /usr/sbin/alt_disk_copy. Please see the alt_disk_copy man page
and documentation for more details.
Executing command: {/usr/sbin/alt_disk_copy -d "hdisk1"}
+-----------------------------------------------------------------------------+
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
Creating logical volume alt_hd6
Creating logical volume alt_hd8
Creating 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_fslv00
Creating /alt_inst/ file system.
Creating /alt_inst/backupnim 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.
Generating a list of files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the
alternate file system...
Modifying ODM on cloned disk.
Building boot image on cloned disk.
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/backupnim
forced unmount of /alt_inst
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...
Bootlist is set to the boot disk: hdisk1
root@nimserver(/)#

root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    rootvg          active
hdisk1          000a738829e828ce                    altinst_rootvg 
root@nimserver(/)#

root@nimserver(/)# bootlist -m normal -o hdisk1
hdisk1 blv=hd5
root@nimserver(/)#

root@nimserver(/)# shutdown -Fr now

root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    old_rootvg     
hdisk1          000a738829e828ce                    rootvg          active
root@nimserver(/)#

Now upgrade the Oslevel from 5300-04 to 5300-12-05-1140
root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    old_rootvg     
hdisk1          000a738829e828ce                    rootvg          active
root@nimserver(/)#

I have already downloaded the technology level & service pack 5300-12-05-1140
root@nimserver(/backupnim/5300-12)# inutoc .   
root@nimserver(/backupnim/5300-12)# smitty update_all
root@nimserver(/)# oslevel -s
5300-09-08-1036
root@nimserver(/)# cd /backupnim/5300-12/
root@nimserver(/backupnim/5300-12)# inutoc .
root@nimserver(/backupnim/5300-12)# smitty update_all
So technology level is upgraded to
root@nimserver(/backupnim/5300-12)# oslevel -s
5300-12-05-1140
root@nimserver(/backupnim/5300-12)#
root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    old_rootvg     
hdisk1          000a738829e828ce                    rootvg          active
root@nimserver(/)#

My current bootlist is
root@nimserver(/)# bootlist -m normal -o
hdisk1 blv=hd5
root@nimserver(/)#

Now some reason, I have to revert back the whole process and I wants to go back to my old oslevel/technology level (5300-04) which is still on hdisk0. Set the boolist back to hdisk0 and reboot the lpar.
root@nimserver(/)# bosboot -ad /dev/hdisk0
0301-168 bosboot: The current boot logical volume, /dev/hd5,
        does not exist on /dev/hdisk0.
root@nimserver(/)#

root@nimserver(/)# bootlist -m normal -o hdisk0
hdisk0 blv=hd5
root@nimserver(/)#

root@nimserver(/)# shutdown -Fr now
root@nimserver(/)# ipl_varyon -i
PVNAME          BOOT DEVICE     PVID                                    VOLUME GROUP ID
hdisk0          YES             000a738834162dc40000000000000000        000a73880000d600
hdisk1          YES             000a738829e828ce0000000000000000        000a73880000d600
root@nimserver(/)#

root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    rootvg          active
hdisk1          000a738829e828ce                    altinst_rootvg 
root@nimserver(/)#

root@nimserver(/)# oslevel -s
5300-04-00
root@nimserver(/)#



Remove the alternate rootvg
root@nimserver(/)# exportvg altinst_rootvg

root@nimserver(/)# lspv
hdisk0          000a738834162dc4                    rootvg          active
hdisk1          000a738829e828ce                    None           
root@nimserver(/)#

Use the following two commands, if you wants to put the hdisk1 into mirror with rootvg.
root@nimserver(/)# extendvg rootvg hdisk1
root@nimserver(/)# mirrorvg rootvg hdisk1

No comments:

Post a Comment