Thursday, December 22, 2016

How to solve current boot logical volume /dev/hd5, does not exist on /dev/hdisk# in aix?

How to solve current boot logical volume /dev/hd5, does not exist on /dev/hdisk# in aix?



Many cases we could receive this issue when we run mksysb command or run alt_disk copy or create/recreate the bosboot image on the disk.

Please follow the below procedure to fix the issue.


#cd /usr/bin
#cp mkszfile mkszfile.old
#vi mkszfile

search for the argument "-qv" and find the following line


BOOT_BLKS=`LC_MESSAGES=C ${bosboot} -qv | ${tail} -1l | ${awk} '{print $2 * 2}'` 


Add the  -d /dev/ipldevice. The line should look like this when finished


BOOT_BLKS=`LC_MESSAGES=C ${bosboot} -qvd /dev/ipldevice| ${tail} -1l | ${awk} '{print $2 * 2}'` 


then save it and run mksysb or alt_disk again.

or


change mkszfile to use  #bosboot -qvd /dev/ipldevice

****************************************************************************************************************************************



Another blv error

==============


If /dev/ipldevice vary with the boot disk, need to follow the below steps to correct it. We will do the first step for sure and it will end up with error as below, proceed with the next steps.

bosboot -ad /dev/ipldevice
0516-602 lslv: Logical volume name not entered.
0301-168 bosboot: The current boot logical volume, /dev/hd5,   does not exist on /dev/hdisk0.

Solution:
lsvg -p rootvg - hdisk0
lslv -m hd5 -->
hdisk0 on PV1 1st partition
savebase -v - successful

will remove/recreate hd5 – no need to worry it worked good

# rmlv hd5
# mklv -y hd5 -t boot -a e rootvg 1 hdisk0
# cd /dev
# rm ipldevice
# ln /dev/rhdisk0 /dev/ipldevice
# bosboot -ad /dev/ipldevice - same error

# bootinfo -B hdisk0 - 1
# ln /dev/rhd5 /dev/ipl_blv
# cd /dev -
same maj/min numbers
# bosboot -ad /dev/ipldevice

Now we got the same minor and major number for hdisk0

# ls -ld /dev/ipldevice
crw-------    2 root     system       20,  0 Oct 31 2019  ipldevice
# ls -ld /dev | grep -i "20,  0"
# ls -l /dev | grep "20,  0"
brw-------    1 root     system       20,  0 Mar 31 08:54 hdisk0
crw-------    2 root     system       20,  0 Oct 31 2019  ipldevice
crw-------    2 root     system       20,  0 Oct 31 2019  rhdisk0
#
alt_disk_install was able to proceed now

****************************************************************************************************************************

Another blv error

=============


0301-162 bosboot: savebase failed with /dev/hdisk0.

0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.


Solution
=======

Boot the sever into maintenance mode
Remove the corrupted blv - #rmlv –f hd5
recreate the new hd5 blv logical volume - # mklv -y hd5 -t boot -a e rootvg
create a bootimage - # bosboot -ad /dev/hdisk0
Shutdwon -Fr