Thursday, 29 August 2013

How to check if AIX fileset requires reboot or not

Go the location where the fileset is copied and run below command and see the last second column(Q -->Quiescent  column )and if u find b/B->bosboot (reboot required) and
apart from that others dont require reboot.

root@host::/export/lpp_source/AIX71/lppsource_71-01-04/installp/ppc> installp -l -d  .|grep -i  bos.rte.boot
  bos.rte.boot                7.1.1.15                   S  b usr,root ->This requires reboot as it has "b"


Other values of Q -->Quiescent  column

 Y indicates that running processes can be affected by the installation of this fileset.
 N indicates that running processes are not affected by the installation of this fileset.
 B indicates bosboot and quiescent.
 b indicates bosboot and not quiescent.

How to fix the file /usr/lib/boot/unix_64 of 0 bytes

Issue :File - /usr/lib/boot/unix_64  becomes 0 bytes

Probable causes for above Issue:
1>Filesystem Full.
2>Abnormal IO issues on rootvg hdisk which results in panic system halt/reboot.
3>Sometimes even while software upgradation.

Option 1> Restore the file from good mksysb backup.
Procedure:
cd /tmp
restore -xqvf /storage/mksysb.aix530.052013 ./usr/lib/boot/unix_64
mv /tmp/usr/lib/boot/unix_64 /usr/lib/boot/unix_64
ln -s /usr/lib/boot/unix_64 /unix
ln -s /usr/lib/boot/unix_64 /usr/lib/boot/unix
Run a bosboot and confirm successful creation of BLV.

Option 2> Restore the file from Media(CD/DVD) or from a NIM resource(LPP source) of same software level.
Procedure:
cd /tmp
restore -qxvf /mnt/lppsource_53-12-01/bos.mp64 ./usr/lib/boot/unix_64
mv /tmp/usr/lib/boot/unix_64 /usr/lib/boot/unix_64
ln -s /usr/lib/boot/unix_64 /unix
ln -s /usr/lib/boot/unix_64 /usr/lib/boot/unix
Run a bosboot and confirm successful creation of BLV.


Option 3> Copy the kernel file from another machine.
Procedure:
If you have another machine running the 64-bit kernel and at the same level of AIX oslevel.
Then copy the kernel file (/usr/lib/boot/unix_64) from another machine and follow remaining below steps.
ln -s /usr/lib/boot/unix_64 /unix
ln -s /usr/lib/boot/unix_64 /usr/lib/boot/unix
Run a bosboot and confirm successful creation of BLV.
In the past instances this has proved to work fine without any problems.

Note : Recommended method and Best practice is to use option 1 or 2 and during worstcase scenarios option 3 can be used.

HMC Scanner(How to use )- Complete hardware information of managedsystem/lpar in few minutes

HMC Scanner is a Java program that uses SSH to connect to an HMC or SDMC or FSM or IVM (IVM is experimental), downloads the system configuration and produces a single Excel spreadsheet that contains the configuration of servers and LPARs.

##################################################################################################################
Procedure:

1>Download latest HMCScanner from below link
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power+Systems/page/HMC+Scanner

2>Copy the HMCScanner zip file to server which can connect to the HMC's
 Unzip the downloaded file and run the hmcScanner.bat or hmcScanner.ksh script

=========================
syntax:
root@host>ksh -x hmcScanner.ksh hostname userid -p <passwd> -stats
An XLS file will get created.
=========================
#################################################################################################################


Advantages:
1>Data can be used incase of managedsystem or lpar rebuild incase of any disaster.
2>Good handy report of virtual devices(FC/Ethernet/VSCSI) on the VIO environment
3>Performance reports(stats) can also be collected.
4>Complete Hardware Information of Managedsystem/Lpar in very short time

*Refer to the link above for the limitations on using HMCScanner.

How to fix corrupted boot logical volume(BLV) in AIX


Problem:
If a boot logical volume is corrupted (for example, bad blocks on a disk might cause a corrupted BLV), a machine will not boot after shutdown.

Solution:
(a)IF hd5 exists
Boot your machine in maintenance mode, from a CD or tape or NIM.
Access your rootvg & start shell before mounting filesystem.Run bosboot on your rootvg hdisk (bosboot -ad /dev/hdisk0).
#sync;sync;sync
Reboot the server (shutdown -Fr).

(b)IF hd5 doesnt exist
Boot your machine in maintenance mode, from a CD or tape or NIM.
Access your rootvg & start shell before mounting filesystem.
Create a new hd5 logical volume in rootvg (mklv -y hd5 -t boot -a e rootvg 1).
Run the bosboot command (bosboot -ad /dev/hdisk0).
#sync;sync;sync
Reboot the server (shutdown -Fr).