The AIX migration tool, nimadm, now supports the nimsh protocol. That’s right; you no longer need to configure rsh on your NIM clients in order to use nimadm to migrate AIX to a newer version. So, rsh is finally dead. Long live nimsh!
I tested this new functionality in my lab environment. The following AIX versions and levels were installed:
NIM Master: 7100-02-01-1245 + IV46746m2c (Allow NIMADM with NIMSH and NIM CACHE)*
NIM Client: 6100-08-01-1245
*Note: You’ll need ifix IV46746m2c installed in order for this to work. Without it, the nimadm operation will fail. I installed the ifix on the NIM Master only.
root@nim1[/tmp] # emgr -e IV46746m2c.130826.epkg.Z
root@nim1[/tmp] # emgr -l
ID STATE LABEL INSTALL TIME UPDATED BY ABSTRACT
=== ===== ========== ================= ========== ======================================
1
S IV46746m2c 08/27/13
12:39:55
Allow NIMADM with NIMSH and NIM CACHE
The NIM client was installed with AIX 6.1 TL8 SP1. A spare disk was available for the migration. The nimsh subsystem was active.
root@aix61[/] # oslevel -s
6100-08-01-1245
root@aix61[/] # lspv
hdisk0 00c8e424e56b6006 rootvg active
hdisk1 00f6050a2cd79ef8 None
root@aix61[/] # lssrc -s nimsh
Subsystem
Group
PID Status
nimsh
nimclient
3539094 active
The
NIM master was installed with AIX 7.1 TL2 SP1. The NIM client definition
specified nimsh as the connection protocol. The NIM master was able to
communicate with the NIM client using nimsh (and not rsh/shell).
root@nim1[/] # oslevel -s
7100-02-01-1245
root@nim1[/] # lsnim -l aix61
aix61:
class = machines
type = standalone
connect = nimsh
platform = chrp
netboot_kernel = 64
if1 = network1 aix61 0
cable_type1 = N/A
Cstate = ready for a NIM operation
prev_state = ready for a NIM operation
Mstate = currently running
cpuid = 00C8E4245C00
Cstate_result = reset
root@nim1[/] # nim -o showlog aix61
BEGIN:Thu Mar 24 01:29:36 2011:032401293611
Command line is:
/usr/sbin/installp -u -e /var/adm/ras/nim.installp -b -f \
/tmp/.workdir.3014756.2686976_1/.genlib.installp.list.2686976
+-----------------------------------------------------------------------------+
Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
done
…etc…
Installation Summary
--------------------
Name
Level
Part
Event Result
-------------------------------------------------------------------------------
bos.sysmgt.nim.master
6.1.0.0
USR
DEINSTALL SUCCESS
END:Thu Mar 24 01:29:49 2011:032401294911
The rsh (shell) subsystem was disabled on the NIM client i.e. there was no .rhosts file in /, the shell/rshd service was commented out in /etc/inetd.conf. This prevented the NIM master from connecting to the NIM client using rsh.
root@aix61[/] # ls -ltr .rhosts
ls: 0653-341 The file .rhosts does not exist.
root@aix61[/] # grep rshd /etc/inetd.conf
#shell stream tcp6 nowait root /usr/sbin/rshd rshd
root@nim1[/] # rsh aix61 date
aix61: A remote host refused an attempted connect operation.
I migrated the NIM client from 6.1 TL8 SP1 to 7.1 TL2 SP1, using nimadm.
root@nim1[/] # nimadm -j nimvg -c aix61 -s aix71spot -l aix71 -d hdisk1 -Y
Initializing the NIM master.
Initializing NIM client aix61.
Verifying alt_disk_migration eligibility.
Initializing log: /var/adm/ras/alt_mig/aix61_alt_mig.log
Starting Alternate Disk Migration.
+-----------------------------------------------------------------------------+
Executing nimadm phase 1.
+-----------------------------------------------------------------------------+
Cloning altinst_rootvg on client, Phase 1.
Client alt_disk_install command: alt_disk_copy -j -M 7.1 -P1 -d "hdisk1"
Calling mkszfile to create new /image.data file.
Checking disk sizes.
LOGICAL_VOLUME= hd11admin
FS_LV= /dev/hd11admin
Creating cloned rootvg volume group and associated logical volumes.
...etc...
Generating a list of files
for backup and restore into the alternate file system...
Phase 1 complete.
+-----------------------------------------------------------------------------+
Executing nimadm phase 2.
+-----------------------------------------------------------------------------+
Creating nimadm cache file systems on volume group nimvg.
Checking for initial required migration space.
Creating cache file system /aix61_alt/alt_inst
...etc...
+-----------------------------------------------------------------------------+
Executing nimadm phase 3.
+-----------------------------------------------------------------------------+
Syncing client data to cache ...
+-----------------------------------------------------------------------------+
Executing nimadm phase 4.
+-----------------------------------------------------------------------------+
nimadm: There is no user customization script specified for this phase.
+-----------------------------------------------------------------------------+
Executing nimadm phase 5.
+-----------------------------------------------------------------------------+
Saving system configuration files.
Checking for initial required migration space.
Setting up for base operating system restore.
/aix61_alt/alt_inst
Restoring base operating system.
Merging system configuration files.
...etc...
+-----------------------------------------------------------------------------+
Executing nimadm phase 6.
+-----------------------------------------------------------------------------+
Installing and migrating software.
Updating install utilities.
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...
...etc...
install_all_updates: Checking for recommended maintenance level 7100-02.
install_all_updates: Executing /usr/bin/oslevel -rf, Result = 7100-02
install_all_updates: Verification completed.
install_all_updates: Log file is /var/adm/ras/install_all_updates.log
install_all_updates: Result = SUCCESS
Known Recommended Maintenance Levels
------------------------------------
Restoring device ODM database.
+-----------------------------------------------------------------------------+
Executing nimadm phase 7.
+-----------------------------------------------------------------------------+
nimadm: There is no user customization script specified for this phase.
+-----------------------------------------------------------------------------+
Executing nimadm phase 8.
+-----------------------------------------------------------------------------+
Creating client boot image.
bosboot: Boot image is 53248 512 byte blocks.
Writing boot image to client's alternate boot disk hdisk1.
+-----------------------------------------------------------------------------+
Executing nimadm phase 9.
+-----------------------------------------------------------------------------+
Adjusting client file system sizes ...
Adjusting size for /
...etc...
+-----------------------------------------------------------------------------+
Executing nimadm phase 10.
+-----------------------------------------------------------------------------+
Unmounting client mounts on the NIM master.
forced unmount of /aix61_alt/alt_inst/var
...etc...
Removing cache file system /aix61_alt/alt_inst/var
+-----------------------------------------------------------------------------+
Executing nimadm phase 11.
+-----------------------------------------------------------------------------+
Cloning altinst_rootvg on client, Phase 3.
Client alt_disk_install command: alt_disk_copy -j -M 7.1 -P3 -d "hdisk1"
## Phase 3 ###################
Verifying altinst_rootvg...
Modifying ODM on cloned disk.
forced unmount of /alt_inst/var
...etc...
Bootlist is set to the boot disk: hdisk1 blv=hd5
+-----------------------------------------------------------------------------+
Executing nimadm phase 12.
+-----------------------------------------------------------------------------+
Cleaning up alt_disk_migration on the NIM master.
Cleaning up alt_disk_migration on client aix61.
Once nimadm finished, I restarted the NIM client on its alternate rootvg disk. The client restarted and came up on AIX 7.1 TL2 SP1 as planned.
root@aix61[/] # lspv
hdisk0 00c8e424e56b6006 rootvg active
hdisk1 00f6050a2cd79ef8 altinst_rootvg active
root@aix61[/] # oslevel -s
6100-08-01-1245
root@aix61[/] # lspv
hdisk0 00c8e424e56b6006 rootvg active
hdisk1 00f6050a2cd79ef8 altinst_rootvg
root@aix61[/] # shutdown -Fr
root@aix61[/] # lspv
hdisk0 00c8e424e56b6006 old_rootvg
hdisk1 00f6050a2cd79ef8 rootvg active
root@aix61[/] # oslevel -s
7100-02-01-1245
Overall, this was not very different from any other nimadm
operation. The only things you need to check are that you have the
correct AIX levels+ifix installed and the NIM master can communicate
with the NIM client over nimsh.
The nimadm
log file, on the NIM master, is still in the usual location and can be
referenced should things go wrong. On the NIM client, you can view the /var/adm/ras/nimsh.log file for an audit trail of all nimsh communication between the NIM master and client. For example:
root@aix61[/] # tail –f /var/adm/ras/nimsh.log
Mon Aug 26 23:50:25 2013 success: we got 1st write query is 0
Mon Aug 26 23:50:25 2013 success: we got 2nd write local id is 00C8E4244C00
Mon Aug 26 23:50:25 2013 success: we got 3rd write remote id is 00F604884C00
Mon Aug 26 23:50:25 2013 success: we got 4th write command is cd /alt_inst/var && /usr/sbin/restore -xqf /alt_inst/tmp/alt_mig.tmpbackup.6291574 > /dev/null || > /alt_inst/alt_disk_mig_rfail.6291574
Mon Aug 26 23:50:25 2013 passing OpenSSL setting of 0
Mon Aug 26 23:50:25 2013 authenticated client using standard host methods
Mon Aug 26 23:50:25 2013 sending ack to client
Mon Aug 26 23:50:25 2013 setting descriptors to include 2nd port
Mon Aug 26 23:50:25 2013 command to exec __ cd /alt_inst/var && /usr/sbin/restore -xqf /alt_inst/tmp/alt_mig.tmpbackup.6291574 > /dev/null || > /alt_inst/alt_disk_mig_rfail.6291574
Mon Aug 26 23:50:26 2013 file descriptor is 5
Mon Aug 26 23:50:26 2013 file descriptor is : 5
Mon Aug 26 23:50:26 2013 family is : 24 (AF_INET6)
Mon Aug 26 23:50:26 2013 source port is : 1023
Mon Aug 26 23:50:26 2013 source addr is : ::ffff:172.29.154.111
Mon Aug 26 23:50:26 2013 source hostname is: nim1 (FQDN)
Mon Aug 26 23:50:26 2013 source hostname is: nim1 (node-only)
Mon Aug 26 23:50:26 2013 getting 2nd port
There is an ifix available for this feature for the following AIX TL/SP levels:
7100-02-03
7100-02-02
6100-08-03
6100-08-02
1/ For 6100-08-XX (any TL8)
EFIX_LABEL=IV46170m2a
Index: 16855
Epkg Name: IV46170m2a.130826.epkg.Z
+--------+
Requisites
+--------+
bos.sysmgt.nim.client 6.1.8.0 6.1.9.0
bos.alt_disk_install.rte 6.1.8.0 6.1.9.0
2/ For 7100-02-XX (any TL2)
EFIX_LABEL=IV46746m2c
ifix Index: 16856
Epkg Name: IV46746m2c.130826.epkg.Z
+--------+
Requisites
+--------+
bos.sysmgt.nim.client 7.1.2.0 7.1.3.0
bos.alt_disk_install.rte 7.1.2.0 7.1.3.0