Migrating to AIX 7.1 with nimadm.Last year I wrote an article on using nimadm to migrate to AIX 6.1. The procedures outlined how to migrate a live system with nimadm and a spare disk. Another method that I have found to be extremely useful is the migration of mksysb images from one version of AIX to another using (you guessed it) nimadm. In the following example I migrated an AIX 6.1 mksysb image to AIX 7.1 and then used that image to install a new LPAR via NIM. The source LPAR was running AIX 6.1 TL6 SP3. I took a mksysb of this system to my NIM master. # oslevel -s 6100-06-03-1048 #
The NIM mksysb resource was named cg-aix61
root@nim1 / # lsnim -t mksysb vio1-mksysb resources mksysb cg-aix61 resources mksysb
root@nim1 / # lsnim -l cg-aix61 cg-aix61: class = resources type = mksysb arch = power Rstate = ready for use prev_state = unavailable for use
location =
/exp version = 6 release = 1 mod = 6 oslevel_r = 6100-06 alloc_count = 0 server = master creation_date = Thu Jan 6 10:00:22 2011 source_image = cg root@nim1 / #
To migrate the mksysb image from AIX 6.1 to AIX 7.1, I ran the following nimadm command:
root@nim1 / # nimadm -T cg-aix61 -O /exp
The flags indicate the following:
-T specifies the existing AIX 6.1 NIM mksysb resource. -O specifies the output location for the migrated mksysb resource. -s indicates the AIX 7.1 NIM SPOT resource for the migration. -l indicates the AIX 7.1 NIM lpp_source resource for the migration. -j identifies the volume group that will be used on the NIM master to create file systems. -Y Agrees to required software license agreements for software to be installed. -N specifies the name of the new AIX 7.1 NIM mksysb resource to be created after migration.
Before running this
command I made sure that I had installed the bos.
0042-001 nim: processing error encountered on "master":
/usr/bin/lslpp: Fileset bos.
0505-204 nimadm:
SPOT spotaix7tl0sp2 does not have bos. 0505-205 nimadm:
The level of bos. spotaix7tl0sp2 (0.0.0.0) does not match the NIM master's level (7.1.0.2). Cleaning up alt_disk_migration on the NIM master.
I also had an AIX 7.1 lpp_source and SPOT ready and waiting on my NIM master.
root@nim1 / # lsnim -t lpp_source aix61tl6sp3 resources lpp_source openssh resources lpp_source aix7tl0sp2 resources lpp_source
root@nim1 / # lsnim -t spot vio1-spot resources spot spotaix61tl6sp3 resources spot spotaix7tl0sp2 resources spot
OK, back to my nimadm operation. Upon initiating the migration I saw the following output on my screen (click here for a copy of the complete log file):
root@nim1 / # nimadm -T cg-aix61 -O /exp Initializing the NIM master. Verifying alt_disk_migration eligibility. Initializing log:
/var Starting Alternate Disk Migration.
+--- Executing nimadm phase 1. +--- Processing target mksysb resource cg-aix61. Restoring /image.data from mksysb image.
+--- Executing nimadm phase 2. +--- Creating nimadm cache file systems on volume group nimadmvg. Checking for initial required migration space. Creating cache file system
/cg- Creating cache file system
/cg- Creating cache file system
/cg- Creating cache file system
/cg- Creating cache file system
/cg- Creating cache file system
/cg- Creating cache file system
/cg- Creating cache file system
/cg-
+--- Executing nimadm phase 3. +--- Syncing mksysb data to cache ...
.....etc......
+--- Executing nimadm phase 8. +--- Creating client boot image. bosboot: Boot image is 45709 512 byte blocks.
+--- 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 /tmp Adjusting size for /usr Adjusting size for /var Adjusting size for /var Backing up cache data to mksysb file
/exp
+--- Executing nimadm phase 10. +--- Unmounting client mounts on the NIM master. forced unmount of
/cg- forced unmount of
/cg- forced unmount of
/cg- forced unmount of
/cg- forced unmount of
/cg- forced unmount of
/cg- forced unmount of
/cg- forced unmount of /cg- Removing nimadm cache file systems. Removing cache file system
/cg- Removing cache file system
/cg- Removing cache file system
/cg- Removing cache file system
/cg- Removing cache file system
/cg- Removing cache file system
/cg- Removing cache file system /cg- Removing cache file system
/cg-
+--- Executing nimadm phase 11. +--- Defining NIM mksysb resource ... New NIMmksysb resource name is cg-aix71
+--- Executing nimadm phase 12. +--- Cleaning up alt_disk_migration on the NIM master. root@nim1 / #
For a description of all the phases in a nimadm operation, I suggest you refer to my previous nimadm article or the AIX infocenter (links below).
Once the migration had completed, I found a new mksysb file in /export/mksysb (as expected). The file was named cg-aix71. And a new NIM mksysb resource was now available.
root@nim1 / # ls -ltr /export/mksysb/ total 30793928 drwxr-xr-x 2 root system 256 Dec 21 10:40 lost+found -rw-r--r-- 1 root system 4893952000 Dec 21 14:42 vio1-mksysb -rw-r--r-- 1 root system 2323097600 Jan 06 10:00 cg-aix61 -rw-r--r-- 1 root system 1967411200 Jan 06 11:00 cg-aix71
root@nim1 / # lsnim -t mksysb vio1-mksysb resources mksysb cg-aix61 resources mksysb cg1-mksysb resources mksysb cg-aix71 resources mksysb
root@nim1 / # lsnim -l cg-aix71 cg-aix71: class = resources type = mksysb comments = Created by nimadm on Thu Jan 6 11:00:51 EETDT 2011 Rstate = ready for use prev_state = unavailable for use
location =
/exp version = 7 release = 1 mod = 0 oslevel_r = 7100-00 alloc_count = 0 server = master creation_date = Thu Jan 6 11:00:54 2011
During the migration I noticed the following file systems were mounted on the NIM master.
root@nim1 / # df Filesystem 512-blocks Free %Used Iused %Iused Mounted on /dev/hd4 1572864 1149640 27% 10471 8% / /dev/hd2 5242880 1597696 70% 42812 19% /usr /dev/hd9var 1048576 250456 77% 8260 23% /var /dev/hd3 8912896 8287752 8% 111 1% /tmp /dev/hd1 524288 523520 1% 5 1% /home /dev/hd11admin 524288 523488 1% 5 1% /admin /pro /dev/hd10opt 1048576 664176 37% 7262 9% /opt /dev/livedump 524288
523552 1% 4
1% /var /dev/tftpbootlv 524288 419656 20% 10 1% /tftpboot /dev/exportlv 524288 523408 1% 13 1% /export /dev/lppsrclv 25690112 4383632 83% 3114 1% /export/lppsource /dev/spotlv 8912896 4848464 46% 43450 8% /export/spot /dev/mksysblv 38273024 11315200 71% 9 1% /export/mksysb /dev/lv00 425984 412432
4% 25 1% /cg- /dev/lv01 65536 63376
4% 18 1% /cg- /dev/lv02 65536 63384
4% 17 1% /cg- /dev/lv03 557056 414720
26% 201 1% /cg- /dev/lv04 294912 285184
4% 21 1% /cg- /dev/lv05 4653056 4506904
4% 17 1% /cg- /dev/lv06 720896 698160
4% 20 1% /cg- /dev/lv07 65536 63384
4% 17 1% /cg-
And in my nimadmvg volume group, there were several new logical volumes.
root@nim1 / # lsvg -l nimadmvg nimadmvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT loglv02 jfslog 1 1 1 open/syncd N/A lv00 jfs 13
13 1 open/syncd /cg- lv01 jfs 2
2 1 open/syncd /cg- lv02 jfs 2
2 1 open/syncd /cg- lv03 jfs 17
17 1 open/syncd /cg- lv04 jfs 9
9 1 open/syncd /cg- lv05 jfs 142
142 1 open/syncd /cg- lv06 jfs 22
22 1 open/syncd /cg- lv07 jfs 2
2 1 open/syncd
/cg- root@nim1 / #
These file systems were used to extract the mksysb locally on the NIM master and then migrate the image to AIX 7.1. I noticed the restbyname process consuming some CPU during the restore process.
Topas
Monitor for host Thu Jan
6 10:15:38 2011 Inte CPU User% Kern% Wait% Idle% Physc Entc% Reads 454 Rawin 0 Total 6.1 22.0 8.2 63.7 0.09 47.04 Writes 1168 Ttyout 578 Network BPS I-Pkts O-Pkts B-In B-Out Execs 0 Namei 521 Total 7.74K 5.50 1.50 5.74K 2.00K Runqueue 0 Dirblk 97
Disk
Busy% BPS TPS
B-Read B-Wr Total 0.0 5.21M 383.0 2.02M 3.19M PAGING Real,MB 2048 FileSystem BPS TPS B-Read B-Writ Steals 1118 % Noncomp 32 Total 2.03M 85.50 2.03M 0 PgspIn 0 % Client 19 Name PID CPU% PgSp Owner PageIn 517 PAGING SPACE restbyna 15532232 16.4 1.21M root PageOut 816 Size,MB 512 vmmd 458766 5.5 1.19M root Sios 969 % Used 3 lrud
262152 1.5 512K roo syncd 2097296 1.1 592K root NFS (calls/sec) topas 16973864 0.5 1.98M root SerV2 0 WPAR Activ 0 xmgc
851994 0.5 448K root nimesis 12320772 0.3 2.41M root SerV3 0 Press: "h"-help getty 7798832 0.1 580K root CliV3 0 "q"-quit xmtopas 8847610 0.1 816K root nfsd 5111964 0.1 4.75M root xmtopasa 6947052 0.1 916K root gil 1441836 0.0 960K root java 4784136 0.0 57.5M pconsole java 8716308 0.0 70.7M root rpc.lock 6029528 0.0 1.19M root clcomd 6160578 0.0 1.69M root pilegc 786456 0.0 640K root aixmibd 3997882 0.0 1.24M root netm 1376298 0.0 448K root topasrec 8454202 0.0 1.01M root
root@nim1 / # ps -ef | grep rest root 15270132 3342336 1 10:15:55 pts/1 0:00 grep rest root
15532232 10747910 37 10:14:02 pts/0
0:02 restbyname -x -q -f /exp root@nim1 / #
I didn’t encounter any issues with my nimadm operation but if I had I could have reviewed the nimadm log file located in /var/adm/ras:
root@nim1 /var total 856 -rw-r--r--
1 root system 435009 Jan 06 11:00 cg-a
If you ever encounter problems with nimadm, I highly recommend that you re-run the operation with the –V and –D flags. This will enable verbose output, as well as debugging information which can assist you greatly in determining the root cause of your issue.
I was able to use the new, migrated, AIX 7.1 mksysb image to install a new LPAR.
AIX Version 7 Copyright IBM Corporation, 1982, 2010. login: root root's Password: **** * * * Welcome
to AIX Version 7.1 * * * Please see the README file in /usr/lpp/bos for information pertinent to * * this
release of the AIX Operating Syst * * **** Last login: Thu Jan 6 13:21:04 EETDT 2011 on /dev/vty0
# oslevel -s 7100-00-02-1041 #
You’ve gotta love NIM! Take a look at the nimadm documentation for more information:
By the way, if you are interested in migrating from AIX 4.3 to AIX 7.1, then you’ll need to consider the mksysb migration method. I’ve not done this myself (i.e. 4.3 to 7.1 migration) but the feedback I received from the AIX development team indicates that it does work as expected.
“... you had expressed some interest
in mksysb migration. Since we were not aware of anyone having attempted
it with 7.1. I went ahead and created a 4.3.3.75 system and created a
mksysb and then used that mksysb in conjunction with nim and successfully
installed another system using the 4.3 mksysb and 7.1 nim resources to perform
a mksysb migration to 7.1. I just followed the steps as noted in the
Installation guide for mksysb migration. “ Refer to the following document for further information on mksysb migration with NIM.
NIM from A to Z in AIX 5L Redbook.http |
Hi molaka, please send me the output from the nimadm command. cgibson@au1.ibm.com
Hi,
am
doing OS migration from 6.1 to 7.1 while migrating the OS even its not
getting error output to do troubleshoot, it was stacking before starting
phase 1.
my nim master is in 7.2 client is in 6.1.
Powerhaguy, did you try with a shorter hdisk name? If it's like for LV names, maybe you can't have more than 11 characters in the name?
I
learned a nugget of what NOT to do. I renamed my clients hdisk I was
using for the migration to, nimupgradedisk. Evidently nimadm does not
like non hdisk names. It died in phase 8 with..
bosboot: Boot image is 53248 512 byte blocks.
0505-158 nimadm: WARNING, unexpected result from the awk_print command.
0505-184 nimadm: Error writing client boot image.
Cleaning up alt_disk_migration on the NIM master.
Unmounting client mounts on the NIM master.
I
renamed it back to hdisk## and it worked fine. Sad but true. I share,
well not only to share, but when I run into this again I'll be able to
find this resolution. :)
.
Thank you for taking the time to share your experience POWERHAguy. Your desire to collaborate and share with the POWER community is the reason why you're an IBM Champion! I appreciate it and I'm sure other readers of my blog do as well. I'll be sure to add this tip to my NIMADM presentation.
As it is urgent kindly let me know that if We requires to place the pre , post migration scripts which will help to remove and add latest sddpcm package. How it can be achieved via nimadm mksysb migration method?
In the same place: ------The best way to migrate------ Migrate Two AIX6.1 TL6 with internal, 3 Vg's disks without Vioserver without FC available (Power520-8203) TO new server (Power550-8204) with Vioserver STG V7000 without TAPE / The idea is to use another way with same version AIX6.1 TL6.
I did a migration using the mksysb of AIX 5.2 to 6.1 and it worked fine.
Chris AKA Nimadm Guru, I see the below after migration, it is not an error but why default to 1969? lslpp -h bos.rte Fileset Level Action Status Date Time ---------------------------------------------------------------------------- Path: /usr/lib/objrepos bos.rte 6.1.4.0 COMMIT COMPLETE 12/31/69 18:00:00
If you've ended up upgraded to newer AIX, and are SAN boot from SDDPCM, there is hope: * Stop/quiesce what you can, unmount filesystems, vary off volume groups. * vi /usr/lpp/devices.sddpcm.53/deinstl/devices.sddpcm.53.rte.pre_d * Add "exit 0" as the first line after the shebang. * ZZ * installp -ug devices.sddpcm.53 * installp -acXYgd /export/lpp_source/sddpcm devices.fcp.disk.ibm.mpio.rte devices.sddpcm.71.rte * lspv | grep rootvg | cut -f 1 -d \ | xargs -n1 bosboot -ad * shutdown -Fr now This worked for me at 2.6.0.3 on several different systems.
Rani, No. As with all things NIM, the NIM master must be at or above the level being installed/migrated.