Saturday, March 16, 2019

How to migrate a aix server from AIX 6.1 to 7.1 easily?

How to migrate a aix server from AIX 6.1 to 7.1 easily?




There are different ways to migrate your system from one AIX version to another AIX version:


Migration by using NIM / CD-DVD / mksysb / alternate disk migration.


Sometimes you will be in a position to migrate a NIM master from AIX 6.1 to AIX 7.1.
It is difficult to migrate a nim server using another nim server as you facing some difficulties. 


Sometimes your server sitting in beyond the firewall (DMZ) area, you could not able to enable rsh/ssh/ping to the server from outside, at that time the above method will help you to migrate it easily.


The below steps are really really easy to perform the aix migration from AIX 6.1 to AIX 7.1 which does not required much requirements to meet.


Take a mksysb of the target server
server1# mksysb -ieX /backup/server1_aix61.mksysb



SCP the mksysb over to your NIM master and define it as a NIM mksysb resource
server1# scp /backup/server1_aix61.mksysb root@nimserver:/backupfs/.



Make sure you got the lpp_source and SPOT from the base AIX ISO images at the level you want to upgrade the system to. If not please create it.

nimserver# lsnim -l aix71_TL05_SP02_spot
nimserver# lsnim -l aix71_TL05_SP02_lppsource



Create the mksysb resource using the mksysb taken on the lpar mksysb

nimserver# nim -o define -t 'mksysb' -a server=master -a location=/backupfs/server1_aix61.mksysb server1_AIX61_mksysb



Use the 'nimadm' command to migrate the existing mksysb to a new + upgraded mksysb image with the following command

nimadm -s <spot> -l <lpp_source> -j <volume group for cache> -Y -T <old_mksysb_resource> -O <new mksysb resource file pathname> -N <new_mksysb_resource>

nimserver# nimadm -s aix71_TL05_SP02_spot -l aix71_TL05_SP02_lppsource -j nimadmvg -Y -T server1_AIX61_mksysb -O /backupfs/server1_7.1_mksysb -N server1_AIX71_mksysb




once that completes you would take the new mksysb file that was created and upgraded and scp it back to the lpar it was taken from

server1# scp /backupfs/server1_7.1_mksysb root@server1:/backup/



Install the "bos.alt_disk_install.rte" and "bos.alt_disk_install.boot_images" fileset to that system at the same TL/SP level as the level you upgraded that mksysb to

server1# mount nimserver:/aix71_TL05_SP02_lppsource  /mnt    -> where we hold the AIX 7.1 package

server1# smitty installp  -> install the "bos.alt_disk_install.rte" and "bos.alt_disk_install.boot_images"
(or)
          server1# installp -acgXYd .  bos.alt_disk_install.rte bos.alt_disk_install.boot_images

server1# alt_disk_mksysb -m -k  /backup/server1_7.1_mksysb -d hdisk2

Note: -k specifies that mksysb devices be kept (formally the ALT_KEEP_MDEV variables) This option is to having the customized network related settings to be cloned with mksysb from the old image to new image. 

If you are not using the "-k" option, there might be the chance to losing your network connectivity after the reboot.
           


Boot up from the upgraded disk

Server1# bootlist -m normal -o hdisk2


For the first reboot, it will take long time to reboot as the server booted from the pugraded OS. Please patience.  Once the server rebooted, please check the OS version and other post checks.

Server1# oslevel -s; lppchk -vm3; instfix -i|egrep -i 'tl|sp'; oslevel -rl7100-05

Server1# oslevel -s
7100.05.02.1134



see your server successfully migrated to AIX 7.1