Friday, February 22, 2013

How to migrating to AIX 6.1 with nimadm?


How to migrating to AIX 6.1 with nimadm?


How to migrating to AIX 6.1 with nimadm?

Here I have provided the steps in simplest way in the Interview perspective. If you are familiar with AIX and NIM, you can understand the below steps very easily.

Ground work:

On NIM Master:

**Need Nim Master server with the 6.1 version --> #oslevel -s

** Master having alt_disk package installed  --> #lslpp -l bos.alt....'

** LPP and SPOT should be in high level (OS ver = 6.1) -->  #lsnim -c resources

** NIMADMVG should create on the NIM master server --> #lsvg -l nimadmvg

** Nim master should have the space -->  # df -gt

** Client needs to define with the master -->  #smitty nim_mkmac

** Take mksysb backup of the target client server --> "mksysb"

On NIM Client"


** Addtional disk needs to be there --> "lspv"

** Break the mirror to get the spare disk   #unmirrorvg rootvg hdisk1

**Clear the boot image on the disk   #chpv -c hdisk1

** RSH should be working --> #chsubserver -a -v shell -p tcp6 -r inetd
                                                #refresh -s inetd; cd / ; rm .rhosts;
                                                # vi .rhosts    (type + on the.rhosts file)
                                                # chmod 600 .rhosts


Implementation steps:

nimadm –j <nim volume group> -c <client name> -s <spot> -l <lpp_source> -d <disk of the client> -Y <accept>

Phase 1 Starting alt disk migration on the client
Phase 2 Creating nimadm cache file systems on volume group nimadmvg.
Phase 3 Syncing the nim client's data to cache filesystem.
Phase 4 Merging the system configuration files.
Phase 5 system configuration files are saved and the bos image is restored.
Phase 6 Migrating the system filesets to the new higher version.
Phase 7 Post migration has been checked.
Phase 8 Creating a boot image to client's alternate boot disk
Phase 9 Syncing cache data to client's alternate rootvg via rsh.
Phase 10 unmount and remove the cache filesystem on the nimadmvg
Phase 11 Boot list is set to the alt disk on the client.
Phase 12 Clean up the alt_disk_migration on nim master and nim client to end the migration.

** Reboot the server -->  shutdown -Fr 


Verfication:

** Once the system is up check the current OS level --> "oslevel -s"

** Check all the filesets are found --> instfix -i |grep -i ml

** Disable the RSH  --> "chsubserver -d -v shell -p tcp6 -r inetd"
                                          refresh -s inetd
                                          cd / ; rm .rhosts; ln -s /dev/null .rhosts


Post implementation:

# lspv | grep old_rootvg              --> Get the old_rootvg
# alt_rootvg_op -X old_rootvg   --> remove the alt vg
# extendvg –f rootvg hdisk0       --> Extend the disk to rootvg
# mirrorvg rootvg hdisk0             --> Mirror it back to the rootvg
# bosboot -ad /dev/hdisk0  /dev/hdisk1 --> create the boot image
# bootlist -m normal hdisk0 hdisk1  --> set the boot list
# bootlist -m normal -o   --> Confirm the boot sequence.

Advantage of nimadm method:

** Reduced downtime for the client.
** The migration is executed while the system is up and running as normal
** There is no disruption to any of the applications or services running on the client
** Quick recovery from migration failures. All changes are performed on the rootvg copy (altinst_rootvg).
** If there are any serious problems with the migration, the original rootvg is still available and the system has not been impacted.
** If a migration fails or terminates at any stage, nimadm is able to quickly recover from the event and clean up afterwards.