Upgrading from AIX 5.3 to AIX 6.1 using nimadm

It can be very usefull to have a minimum downtime when upgrading from AIX 5.3 to AIX 6.1. Using nimadm can be a really good method to do it. It seems that multibos can answer to this problem, but this is not the subject for this post. So let’s have a deeper look on nimadm.

In this post we’ll call :

  • nim_master/nim master : nim server used to perform migration.
  • nim_client/ nim client : nim client to upgrade from AIX5.3TL12 to AIX6.1TL06.

Prerequisites

Rsh configuration between nim server and and nim client

nimadm use rsh to transfer data from nim client to nim server before and after upgrade. I really don’t know why but theses backups are performed through rsh. I have to check if it can be done with ou beloved ssh

  • So, enable rsh connexion between nim master and nim client :
nim_client# chsubserver -a -v shell -p tcp6 -r inetd
nim_client# echo "nim_master root" >> /root/.rhosts
nim_client# chmod 600 .rhosts
  • Be sure rsh is fully working and test it :
nim_master# rsh nim_client hostname
nim_client

Nim server nimadmvg

Our nim server needs an nimadm volume group, we’ll call it nimadmvg. This volume group has be greater or equals than nim_client rootvg.

nim_master# mkvg -S -s 128M -y nimadmvg hdisk17 hdisk37 hdisk38 hdisk39
nim_master# lsvg -l nimadmvg
nimadmvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
nim_master# lsvg -p nimadmvg
nimadmvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk38 active 255 255 51..51..51..51..51
hdisk37 active 255 255 51..51..51..51..51
hdisk36 active 255 255 51..51..51..51..51
hdisk17 active 269 268 54..53..53..54..54

bos.alt_disk_install.rte fileset

To perform a nimadm migration, nim server, spot, and lpp_source needs bos.alt_disk_install.rte fileset. This fileset has to be in the exact same version on nim master, and in spot used for migration.

In our case we use a spot called spot_aix610TL06 and an lpp_source called lpp_aix610TL06, to migrate for AIX 5.3TL12 to AIX6.1TL06. We are going to check our bos.alt_disk_install.rte fileset on our nim and on our spot.

  • Let’s check on nim server :
nim_master# lslpp -l | grep -i bos.alt_disk_install.rte
bos.alt_disk_install.rte 6.1.6.1 COMMITTED Alternate Disk Installation
bos.alt_disk_install.rte 6.1.6.1 COMMITTED Alternate Disk Installation
  • Let’s check on spot_AIX610TL06 spot :
nim_master# nim -o showres 'spot_aix610TL06' | grep bos.alt_disk_install.rte
bos.alt_disk_install.rte 6.1.6.1 A F Alternate Disk Installation

Nim client free physical volumes for alt_inst_rootvg

Check that nim_client have enough free phyiscal volumes to cater it’s own rootvg for alt_inst_rootvg.

lpar#  lspv | grep -w rootvg | awk '{print $1}'
hdisk3
hdisk4
hdisk5

Running nimadm, it’s time to upgrade

Ok, we’re ready, all prerequisites are done, we are in strating blocks to begin our migration from AIX5.3TL12 to AIX6.1TL06.
Run nimadm command to start migration, use these arguments :

  1. -j : volume group used on nim_master.
  2. -c : nim_client hostname.
  3. -s : spot name.
  4. -l : lpp_source name.
  5. -d : disks used by nim_client for alt_inst_rootvg.
  6. -y : accept licences.

Here we go :

nimadm -j nimadmvg -c lpar-s spot_aix610TL06 -l lpp_aix610TL06 -d "hdisk3 hdisk4 hdisk5" -Y

nimadm is done in 12 steps, let’s have a look on each one :
All steps description are taken from http://www.ibm.com/developerworks/aix/library/au-migrate_nimadm/index.html

phase 1

“nim_master run alt_disk_install on nim client, alternate root volume group (altinst_rootvg) is created during this phase.”

+-----------------------------------------------------------------------------+
Executing nimadm phase 1.
+-----------------------------------------------------------------------------+
Cloning altinst_rootvg on client, Phase 1.
Client alt_disk_install command: alt_disk_copy -j -M 6.1 -P1 -d "hdisk3 hdisk4 hdisk5"
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5.
Creating logical volume alt_paging00.
Creating logical volume alt_tivolilv.
Creating logical volume alt_hd8.
Creating logical volume alt_hd4.
Creating logical volume alt_hd2.
Creating logical volume alt_hd9var.
Creating logical volume alt_hd3.
Creating logical volume alt_hd1.
Creating logical volume alt_hd10opt.
Creating logical volume alt_devdumphd3.
Creating logical volume alt_cdc.
Creating logical volume alt_ccm63lv.
Creating logical volume alt_adminlv.
Creating logical volume alt_sinagioslv.
Creating logical volume alt_sysloadlv.
Creating logical volume alt_samlv.
Creating logical volume alt_tempolv.
Creating logical volume alt_omnilv.
Creating logical volume alt_db2v9lv.
Creating logical volume alt_orascriptlv.
Creating logical volume alt_ora1020lv.
Creating logical volume alt_orabdumplv.
Creating logical volume alt_oratarlv.
Creating logical volume alt_oranetlv.
Creating logical volume alt_oraadumplv.
Creating logical volume alt_oracdumplv.
Creating logical volume alt_oraudumplv.
Creating logical volume alt_tinalv.
Creating logical volume alt_hd11admin.
Creating /alt_inst/ file system.
Creating /alt_inst/admin file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tempo file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/tools/list/admin file system.
Creating /alt_inst/tools/list/ccm63 file system.
Creating /alt_inst/tools/list/cdc file system.
Creating /alt_inst/tools/list/db2/V9.5FP8 file system.
Creating /alt_inst/tools/list/omnivision/collectnode file system.
Creating /alt_inst/tools/list/oracle/adump file system.
Creating /alt_inst/tools/list/oracle/bdump file system.
Creating /alt_inst/tools/list/oracle/cdump file system.
Creating /alt_inst/tools/list/oracle/network file system.
Creating /alt_inst/tools/list/oracle/product/10.2.0.4 file system.
Creating /alt_inst/tools/list/oracle/scripts file system.
Creating /alt_inst/tools/list/oracle/tar file system.
Creating /alt_inst/tools/list/oracle/udump file system.
Creating /alt_inst/tools/list/sam file system.
Creating /alt_inst/tools/list/sinagios file system.
Creating /alt_inst/tools/list/sysload file system.
Creating /alt_inst/tools/list/tina file system.
Creating /alt_inst/tools/list/tivoli file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/var file system.
Generating a list of files
for backup and restore into the alternate file system...
Phase 1 complete.

phase 2

“nim_master creates the cache file systems in the nimadmvg volume group. Some initial checks for the required migration disk space are performed.”

+-----------------------------------------------------------------------------+
Executing nimadm phase 2.
+-----------------------------------------------------------------------------+
Creating nimadm cache file systems on volume group nimadmvg.
Checking for initial required migration space.
Creating cache file system /lpar-s_alt/alt_inst
Creating cache file system /lpar-s_alt/alt_inst/admin
Creating cache file system /lpar-s_alt/alt_inst/home
Creating cache file system /lpar-s_alt/alt_inst/opt
Creating cache file system /lpar-s_alt/alt_inst/tempo
Creating cache file system /lpar-s_alt/alt_inst/tmp
Creating cache file system /lpar-s_alt/alt_inst/tools/list/admin
Creating cache file system /lpar-s_alt/alt_inst/tools/list/ccm63
Creating cache file system /lpar-s_alt/alt_inst/tools/list/cdc
Creating cache file system /lpar-s_alt/alt_inst/tools/list/db2/V9.5FP8
Creating cache file system /lpar-s_alt/alt_inst/tools/list/omnivision/collectnode
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/adump
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/bdump
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/cdump
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/network
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/product/10.2.0.4
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/scripts
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/tar
Creating cache file system /lpar-s_alt/alt_inst/tools/list/oracle/udump
Creating cache file system /lpar-s_alt/alt_inst/tools/list/sam
Creating cache file system /lpar-s_alt/alt_inst/tools/list/sinagios
Creating cache file system /lpar-s_alt/alt_inst/tools/list/sysload
Creating cache file system /lpar-s_alt/alt_inst/tools/list/tina
Creating cache file system /lpar-s_alt/alt_inst/tools/list/tivoli
Creating cache file system /lpar-s_alt/alt_inst/usr
Creating cache file system /lpar-s_alt/alt_inst/var

phase 3

“nim_master creates the cache file systems in the nimadmvg volume group.”

+-----------------------------------------------------------------------------+
Executing nimadm phase 3.
+-----------------------------------------------------------------------------+
Syncing client data to cache ...

phase 4

“If a pre-migration script resource has been specified, it is executed at this time.”

+-----------------------------------------------------------------------------+
Executing nimadm phase 4.
+-----------------------------------------------------------------------------+
nimadm: There is no user customization script specified for this phase.

phase 5

“System configuration files are saved. Initial migration space is calculated and appropriate file system expansions are made. The bos image is restored and the device database is merged (similar to a conventional migration). All of the migration merge methods are executed, and some miscellaneous processing takes place.”

+-----------------------------------------------------------------------------+
Executing nimadm phase 5.
+-----------------------------------------------------------------------------+
Saving system configuration files.
Checking for initial required migration space.
Setting up for base operating system restore.
/lpar-s_alt/alt_inst
Restoring base operating system.
Merging system configuration files.
Running migration merge method: ODM_merge Config_Rules.
Running migration merge method: ODM_merge SRCextmeth.
Running migration merge method: ODM_merge SRCsubsys.
Running migration merge method: ODM_merge SWservAt.
Running migration merge method: ODM_merge pse.conf.
Running migration merge method: ODM_merge vfs.
Running migration merge method: ODM_merge xtiso.conf.
Running migration merge method: ODM_merge PdAtXtd.
Running migration merge method: ODM_merge PdDv.
Running migration merge method: convert_errnotify.
Running migration merge method: passwd_mig.
Running migration merge method: login_mig.
Running migration merge method: user_mrg.
Running migration merge method: secur_mig.
Running migration merge method: RoleMerge.
Running migration merge method: methods_mig.
Running migration merge method: mkusr_mig.
Running migration merge method: group_mig.
Running migration merge method: ldapcfg_mig.
Running migration merge method: ldapmap_mig.
Running migration merge method: convert_errlog.
Running migration merge method: ODM_merge GAI.
Running migration merge method: ODM_merge PdAt.
Running migration merge method: merge_smit_db.
Running migration merge method: ODM_merge fix.
Running migration merge method: merge_swvpds.
Running migration merge method: SysckMerge.

phase 6

“all system filesets are migrated using installp. Any required RPM images are also installed during this phase.”

+-----------------------------------------------------------------------------+
Executing nimadm phase 6.
+-----------------------------------------------------------------------------+
Installing and migrating software.
Updating install utilities.
[..]
+-----------------------------------------------------------------------------+
Installing Software...
+-----------------------------------------------------------------------------+

installp: APPLYING software for:
bos.rte.mlslib 6.1.6.0

. . . . . << Copyright notice for bos >> . . . . . . .
Licensed Materials - Property of IBM

5765G6200
Copyright International Business Machines Corp. 1985, 2010.
Copyright AT&T 1984, 1985, 1986, 1987, 1988, 1989.
Copyright Regents of the University of California 1980, 1982, 1983, 1985, 1986, 1987, 1988, 1989.
Copyright BULL 1993, 2010.
Copyright Digi International Inc. 1988-1993.
Copyright Interactive Systems Corporation 1985, 1991.
Copyright ISQUARE, Inc. 1990.
Copyright Innovative Security Systems, Inc. 2001-2006.
Copyright Mentat Inc. 1990, 1991.
Copyright Open Software Foundation, Inc. 1989, 1994.
Copyright Sun Microsystems, Inc. 1984, 1985, 1986, 1987, 1988, 1991.

All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for bos >>. . . .

Filesets processed: 1 of 2 (Total time: 3 secs).

installp: APPLYING software for:
X11.compat.lib.X11R6_motif 6.1.6.0

. . . . . <>< ;; . . . . . . .
Licensed Materials - Property of IBM

5765G6200
Copyright International Business Machines Corp. 2007, 2010.
Copyright Massachusetts Institute of Technology, 1985, 1994.

All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for X11.compat >>. . . .

Finished processing all filesets. (Total time: 8 secs).
[..]

phase 7

"If a post-migration script resource has been specified, it is executed at this time."

+-----------------------------------------------------------------------------+
Executing nimadm phase 7.
+-----------------------------------------------------------------------------+
nimadm: There is no user customization script specified for this phase.

phase 8

"The bosboot command is run to create a client boot image, which is written to the client's alternate boot logical volume (alt_hd5)."

+-----------------------------------------------------------------------------+
Executing nimadm phase 8.
+-----------------------------------------------------------------------------+
Creating client boot image.
bosboot: Boot image is 45273 512 byte blocks.
Writing boot image to client's alternate boot disk hdisk3.

phase 9

"All the migrated data is now copied from the NIM master's local cache file and synced to the client's alternate rootvg via rsh."

+-----------------------------------------------------------------------------+
Executing nimadm phase 9.
+-----------------------------------------------------------------------------+
Adjusting client file system sizes ...
Adjusting size for /
Adjusting size for /admin
Adjusting size for /home
Adjusting size for /opt
Adjusting size for /tempo
Adjusting size for /tmp
Adjusting size for /tools/list/admin
Adjusting size for /tools/list/ccm63
Adjusting size for /tools/list/cdc
Adjusting size for /tools/list/db2/V9.5FP8
Adjusting size for /tools/list/omnivision/collectnode
Adjusting size for /tools/list/oracle/adump
Adjusting size for /tools/list/oracle/bdump
Adjusting size for /tools/list/oracle/cdump
Adjusting size for /tools/list/oracle/network
Adjusting size for /tools/list/oracle/product/10.2.0.4
Adjusting size for /tools/list/oracle/scripts
Adjusting size for /tools/list/oracle/tar
Adjusting size for /tools/list/oracle/udump
Adjusting size for /tools/list/sam
Adjusting size for /tools/list/sinagios
Adjusting size for /tools/list/sysload
Adjusting size for /tools/list/tina
Adjusting size for /tools/list/tivoli
Adjusting size for /usr
Adjusting size for /var
Syncing cache data to client ...

phase 10

"The NIM master cleans up and removes the local cache file systems."

+-----------------------------------------------------------------------------+
Executing nimadm phase 10.
+-----------------------------------------------------------------------------+
Unmounting client mounts on the NIM master.
forced unmount of /lpar-s_alt/alt_inst/var
forced unmount of /lpar-s_alt/alt_inst/usr
forced unmount of /lpar-s_alt/alt_inst/tools/list/tivoli
forced unmount of /lpar-s_alt/alt_inst/tools/list/tina
forced unmount of /lpar-s_alt/alt_inst/tools/list/sysload
forced unmount of /lpar-s_alt/alt_inst/tools/list/sinagios
forced unmount of /lpar-s_alt/alt_inst/tools/list/sam
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/udump
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/tar
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/scripts
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/product/10.2.0.4
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/network
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/cdump
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/bdump
forced unmount of /lpar-s_alt/alt_inst/tools/list/oracle/adump
forced unmount of /lpar-s_alt/alt_inst/tools/list/omnivision/collectnode
forced unmount of /lpar-s_alt/alt_inst/tools/list/db2/V9.5FP8
forced unmount of /lpar-s_alt/alt_inst/tools/list/cdc
forced unmount of /lpar-s_alt/alt_inst/tools/list/ccm63
forced unmount of /lpar-s_alt/alt_inst/tools/list/admin
forced unmount of /lpar-s_alt/alt_inst/tmp
forced unmount of /lpar-s_alt/alt_inst/tempo
forced unmount of /lpar-s_alt/alt_inst/opt
forced unmount of /lpar-s_alt/alt_inst/home
forced unmount of /lpar-s_alt/alt_inst/admin
forced unmount of /lpar-s_alt/alt_inst
Removing nimadm cache file systems.
Removing cache file system /lpar-s_alt/alt_inst
Removing cache file system /lpar-s_alt/alt_inst/admin
Removing cache file system /lpar-s_alt/alt_inst/home
Removing cache file system /lpar-s_alt/alt_inst/opt
Removing cache file system /lpar-s_alt/alt_inst/tempo
Removing cache file system /lpar-s_alt/alt_inst/tmp
Removing cache file system /lpar-s_alt/alt_inst/tools/list/admin
Removing cache file system /lpar-s_alt/alt_inst/tools/list/ccm63
Removing cache file system /lpar-s_alt/alt_inst/tools/list/cdc
Removing cache file system /lpar-s_alt/alt_inst/tools/list/db2/V9.5FP8
Removing cache file system /lpar-s_alt/alt_inst/tools/list/omnivision/collectnode
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/adump
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/bdump
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/cdump
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/network
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/product/10.2.0.4
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/scripts
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/tar
Removing cache file system /lpar-s_alt/alt_inst/tools/list/oracle/udump
Removing cache file system /lpar-s_alt/alt_inst/tools/list/sam
Removing cache file system /lpar-s_alt/alt_inst/tools/list/sinagios
Removing cache file system /lpar-s_alt/alt_inst/tools/list/sysload
Removing cache file system /lpar-s_alt/alt_inst/tools/list/tina
Removing cache file system /lpar-s_alt/alt_inst/tools/list/tivoli
Removing cache file system /lpar-s_alt/alt_inst/usr
Removing cache file system /lpar-s_alt/alt_inst/var

phase 11

"The alt_disk_install command is called again to make the final adjustments and put altinst_rootvg to sleep. The bootlist is set to the target disk."

+-----------------------------------------------------------------------------+
Executing nimadm phase 11.
+-----------------------------------------------------------------------------+
Cloning altinst_rootvg on client, Phase 3.
Client alt_disk_install command: alt_disk_copy -j -M 6.1 -P3 -d "hdisk3 hdisk4 hdisk5"
## Phase 3 ###################
Verifying altinst_rootvg...
Modifying ODM on cloned disk.
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tools/list/tivoli
forced unmount of /alt_inst/tools/list/tina
forced unmount of /alt_inst/tools/list/sysload
forced unmount of /alt_inst/tools/list/sinagios
forced unmount of /alt_inst/tools/list/sam
forced unmount of /alt_inst/tools/list/oracle/udump
forced unmount of /alt_inst/tools/list/oracle/tar
forced unmount of /alt_inst/tools/list/oracle/scripts
forced unmount of /alt_inst/tools/list/oracle/product/10.2.0.4
forced unmount of /alt_inst/tools/list/oracle/network
forced unmount of /alt_inst/tools/list/oracle/cdump
forced unmount of /alt_inst/tools/list/oracle/bdump
forced unmount of /alt_inst/tools/list/oracle/adump
forced unmount of /alt_inst/tools/list/omnivision/collectnode
forced unmount of /alt_inst/tools/list/db2/V9.5FP8
forced unmount of /alt_inst/tools/list/cdc
forced unmount of /alt_inst/tools/list/ccm63
forced unmount of /alt_inst/tools/list/admin
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/tempo
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/admin
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...
Bootlist is set to the boot disk: hdisk3 blv=hd5

phase 12

"Cleanup is executed to end the migration."

+-----------------------------------------------------------------------------+
Executing nimadm phase 12.
+-----------------------------------------------------------------------------+
Cleaning up alt_disk_migration on the NIM master.
Cleaning up alt_disk_migration on client lpar-s

Final steps

Check bootlist on nim_client

Check nim client boot list is set on alt_inst_rootvg before rebooting

nim_client# lspv
hdisk0 00cf55c68810289c rootvg
hdisk1 00cf55c6a65524a1 datavg active
hdisk2 00cf55c6a655251d datavg active
hdisk3 00cf55c6a6552594 altinst_rootvg active
hdisk4 00cf55c6a655264d altinst_rootvg active
hdisk5 00cf55c6a65526f0 altinst_rootvg active
nim_client# bootlist -o -m normal
hdisk3 blv=hd5 pathid=0
hdisk3 blv=hd5 pathid=1
hdisk3 blv=hd5 pathid=2
hdisk3 blv=hd5 pathid=3

Reboot oslevel

Reboot nim client and check AIX version with oslevel command :

nim_client# shutdown -Fr
nim_client# oslevel -s
6100-06-06-1140

Congratulation you have successfully migrated an AIX lpar from 5.3TL12 to 6.1TL06.

One thought on “Upgrading from AIX 5.3 to AIX 6.1 using nimadm

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>