Sunday, September 30, 2018

How to check the oslevel of altinst_rootvg in aix?

How to check the oslevel of altinst_rootvg in aix?


How to check the oslevel of the altaltinst_rootvg in aix?

Sometimes we will be in the situation to identify the oslevel / TL / SP of the altinst_rootvg to proceed further for our activity (next task), Using the below steps we can easily identify the os version of the altinst_rootvg in aix


Test2:/# oslevel -s
7100-01-04-1141
Test2:/# 

Test2:/# lspv
hdisk0        00d342e7131c6b47                  rootvg          active
hdisk1        00d342d637j21a59                  altinst_rootvg
Test2:/# 


Test2:/# alt_rootvg_op -W -d hdisk1
Waking up altinst_rootvg volume group ...

Test2:/# 


Now the altinst_rootvg is in Active state also alt filesystems are in mounted state on the server


Test2:/# lspv
hdisk0        00d342e7131c6b47                  rootvg          active
hdisk1        00d342d637j21a59                  altinst_rootvg  active
Test2:/# 


Test2:/# df
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4          524288    380024   28%     3091     3% /
/dev/hd2         3801088    396856   90%    34020     8% /usr
/dev/hd9var      2621440   2279336   14%     3560     2% /var
/dev/hd3          524288    499272    5%      105     1% /tmp
/dev/hd1          524288    507336    4%      102     1% /home
/proc                  -         -    -         -     -  /proc
/dev/hd10opt      524288    278872   47%     3370     6% /opt
/dev/alt_hd4      524288    365552   31%     3871     3% /alt_inst
/dev/alt_hd1      524288    507336    4%      104     1% /alt_inst/home
/dev/alt_hd10opt 1310720   562888   58%     5694     4% /alt_inst/opt
/dev/alt_hd3     524288    499120    5%      116     1% /alt_inst/tmp
/dev/alt_hd2     5636096   184120   97%   103336    15% /alt_inst/usr
/dev/alt_hd9var  2621440   1835656   30%   6632     3% /alt_inst/var

We need to start the chroot shell within the alternate rootvg to identify the OS level/TL/SP information.

Test2:/# chroot /alt_inst /usr/bin/ksh

Test2:/# oslevel -s
7100-01-01-1216
Test2:/# 
Test2:/# exit

you can return to the rootvg environment by exit from the alt shell.


Now it is really really important to put the cloned rootvg back to sleep.


Test2:/# alt_rootvg_op -S altinst_rootvg
Putting volume group altinst_rootvg to sleep ...
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
Fixing LV control blocks...
Fixing file system superblocks...
The bootlist command confirms that you will reboot using the alternate rootvg disk (hdisk1).

Test2:/# bootlist -m normal -o
hdisk1 blv=hd5 pathid=0
hdisk1 blv=hd5 pathid=1

Test2:/# lspv
hdisk0        00d342e7131c6b47                  rootvg          active
hdisk1        00d342d637j21a59                  altinst_rootvg
Test2:/# 

you can use the same steps to get the os level information from old_rootvg as well.