Friday, 6 September 2013

AIX migration from version 5.3 to 6.1 using CDROM


AIX migration from version 5.3 to 6.1 using CDROM
Prerequisites:
1> Before going ahead an upgrading, do ensure that you have a full system backup(mksysb) incase of requirement for backout of upgrade.
2> Check for errors on system using the errpt -a and fix
3> Ensure that there is enough free disk space on the system for rootvg.
4> Check on what disk rootvg is installed on using the command lsvg -p rootvg
5> Run the command bootlist -m normal -o and ensure that the CDROM is listed before the hard disk. If not, change the boot order by running the command bootlist -m normal cd0 hdisk0
6> Run lppchk -v to check that all the currently installed software have all the required requisites.
7>Get the compatability support matrix concurrance from Database/Application(that runs on the server) before the migration
8>Take backup of important OS files,tunables and ensure its also applied after the upgrade.

Migration procedure:
– Put the AIX 6.1 media in the DVD drive and reboot using the command shutdown -Fr to boot from CD
----------------------------------------------------------------------
1 = SMS menu 5 = Default bootlist
8 = Open Firmware 6 = Stored bootlist
----------------------------------------------------------------------
– Ignore this screen. The installation process should continue automatically
----------------------------------------------------------------------
Please define the System Console
Type a 1 and press Enter to use this terminal as the system console
----------------------------------------------------------------------
– Type 1 and press enter
----------------------------------------------------------------------
1. Type 1 and press Enter to have English during install
>>>choice[1]:
----------------------------------------------------------------------
– Type 1 and press enter
----------------------------------------------------------------------
Welcome to Base Operating System Installation and Maintenance
Type the number of your choice and press Enter. Choice is indicated by >>>
>>>1. Start Install now with Default Settings
2. Change/show Installation Settings and Install
3. Start Maintenance Mode for System Recovery
4. Configure Network Disks (iSCSI)
88 Help?
99 Previous Menu
Choice[1]: 2
----------------------------------------------------------------------
– Type 2 and press enter
----------------------------------------------------------------------
Installation and Settings
Either type 0 and press Enter to install with current settings
or type the number of the setting you want to change and press Enter
1. System Settings:
Method of Installation ......................Migration
Disk where you want to Install ..............hdisk0
2. Primary Language Environment settings (AFTER Install):
Cultural Conventions ........................English (United States)
Language ....................................English (United States)
Keyboard ....................................English (United States)
Keyboard Type ...............................Default
3. Security Model...............................Default
4. More Options (Software install options)
>>> 0 Install with the current settings listed above
88 Help?
99 Previous Menu
>>> Choice[0]:
----------------------------------------------------------------------
– Change the method of installation to Migration
– Ensure that the correct disk at “Disk where you want to install”
– Modify the “Cultural Conventions”, “Language” and “Keyboard” to your liking
Type 4 and press enter
----------------------------------------------------------------------
Install Options
1. Enable System Backup to install any system....Yes
2. Import User Volume Groups.....................Yes
3. Remove Java 1.1.8 Software....................No
>>> 0 Install with the current settings listed above
88 Help?
99 Previous Menu
>>> Choice[0]:
----------------------------------------------------------------------
– Type 0 and press enter
----------------------------------------------------------------------
Migration Installation Summary
Disks: hdisk0
Cultural Convention: en_GB
Language: en_US
Keyboard: en_GB
Import User Volume Groups: Yes
Enable System Backup to install any system: Yes
Remove Java 1.1.8 Software: No
>>> 1 Continue with Install
88 Help?
99 Previous Menu
>>> Choice[1]:
----------------------------------------------------------------------
– Check the output and accept by typing 1 and pressing enter
----------------------------------------------------------------------
Migration menu preparation
Please wait
Approximate Elapsed time
% task complete (in minutes)
----------------------------------------------------------------------
----------------------------------------------------------------------
Migration Confirmation
Either type 0 and press Enter to continue the installation
or type the number of your choice and press Enter
1. List the saved Base System Configuration files which will not be merged into the system
These files are saved in /tmp/bos
2. List the filesets which will be removed and not replaced
3. List directories which will have all current contents removed
4. Reboot without migrating
Acceptance of license agreements is required before using system.
You will be prompted to accept after the system reboots
>>> 0 Continue with the migration
WARNING: Selected files, directories and filesets (installable options)
from the Base System will be removed.
Choose 2 or 3 for more information
88 Help?
99 Previous Menu
>>> Choice[0]:
----------------------------------------------------------------------
– Type 0 and press enter to start the upgrade process
----------------------------------------------------------------------
Saving system configuration files in /tmp/bos
Removing obsolete filesets, directories and files
Installing Base Operating System
Please wait
Approximate Elapsed time
% task complete (in minutes)
----------------------------------------------------------------------
– The installation will continue and and will finally present the login screen
– Login and check the AIX version installed by typing the command oslevel -s




AIX-ADDING/DELETING A STATIC ROUTE USING COMMAND LINE



chdev -l inet0 -a route=net,-netmask,<your-mask-here>,-static,<net address here>,<Gateway here>    ==>To add route
chdev -l inet0 -a delroute=net,-netmask,<your-mask-here>,-static,<net address here>,<Gateway here> ==>To del route


(a)For example to create a static route for destination 10.0.0 through 192.168.0.1

#chdev -l inet0 -a route=net,-netmask,255.255.255.0,-static, 10.0.0.0, 192.168.0.1

(b)For example to remove a static route for destination 10.0.0 through 192.168.0.1

#chdev -l inet0 -a delroute=net,-netmask,255.255.255.0,-static, 10.0.0.0, 192.168.0.1

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).