
This .How-To. illustrates how to use NIM alternate disk installation feature in xCAT cluster.
NIM is an AIX tool that enables a cluster administrator to centrally manage the installation and configuration of AIX and optional software on machines within a networked environment. NIM allows you to install an AIX Operating System on a NIM client's alternate disk for system update, migration or maintenance. Because the client system is running during installation, less time is required than for a normal installation.
For example, in xCAT cluster, if you want to do software maintenance or AIX OS migration for service nodes or compute nodes, to reduce the maintenance window, you can use the AIX alternate disk installation/migration feature.
This document assumes you are somewhat familiar with NIM. For more information about NIM, see the IBM AIX Installation Guide and Reference. (http://www-03.ibm.com/servers/aix/library/index.html)
Before starting this process it is assumed you have completed the following.
To support NIM alternate disk installation feature, you need to install bos.alt_disk_install fileset on the target NIM client first. This fileset can either be installed during the initial installation of the NIM client via specified in the installp_bundle file, or be installed via updatenode command if the OS is ready installed.
For example:
If you want to install bos.alt_disk_install fileset via updatenode command. You can add bos.alt_disk_install fileset name in your installlp_bundle file, and make sure this installp_bundle is specified in the xCAT osimage definition which is used by your target node. Then run updatenode for your target node. For more information about updatenode command, please see the man page of updatenode.
We support 3 scenarios for the alternate disk installation.
To install the mksysb image onto the NIM client.s alternate disks, you need to create the mksysb image first. xCAT mknimimage command can help you to achieve it.
For example:
To create a new mksysb osimage definition via mknimimage command, you must specify either the "-n" or the "-b" option. The "-n" option can be used to create a mksysb image from an existing NIM client machine. The "-b" option can be used to specify an existing mksysb backup file.
mknimimage -m mksysb -n node1 newsysb spot=myspot bosinst_data=mybdata
This command will use node1 to create a mksysb backup image and use that to define a NIM mksysb resource newsysb. The osimage definition will contain the name of the mksysb resource as well as the spot and bosinst_data resource.
OR
mknimimage -m mksysb -b /tmp/backups/mysysbimage newsysb spot=myspot bosinst_data=mybdata
This command defines a NIM mksysb resource using the existing mksysbimage.
After the new mksysb image is created, you can use the NIM alt_disk_install feature to install this mksysb image into the alternate disks.
The command line syntax for the alt_disk_install mksysb operation is as follows:
nim -o alt_disk_install -a source=mksysb -a mksysb=mksysb_resource -a disk=target_disk(s) -a attribute=Value.... TargetName |TargetNames
For example:
nim -o alt_disk_install -a source=mksysb -a mksysb=newsysb -a disk=hdisk2 -a set_bootlist=yes node1
This command creates altinst_rootvg based on hard disk hdisk2, using mksysb image newsysb, and set the bootlist to hdisk2 automatically.
Note: if the NIM master is configured on the xCAT Service Nodes, you can use xCAT xdsh to execute nim commands.
Note: The target of an alt_disk_install operation can be a standalone NIM client or a group of standalone NIM clients. You can use xCAT xcat2nim command to create the corresponding NIM groups which can be used in the NIM commands above.
For more information about the NIM alt_disk_install usage, please see AIX documentation - Using the NIM alt_disk_install operation.
NIM supports cloning the rootvg to a NIM client's alternate disks and applying updates if needed. So before the rootvg alt_disk_install, you need to add additional installation resources (filesets, rpms, efixes) to the lpp_source used by the NIM client.
The command line syntax for the alt_disk_install rootvg clone operation is as follows:
nim -o alt_disk_install -a source=rootvg -a disk=target_disk(s) -a attribute=Value.... TargetName |TargetNames
The optional attributes that can be specified only for the alt_disk_install rootvg clone operation are exclude_files, filesets, fixes, fix_bundle, installp_bundle, installp_flags. For more information about the NIM alt_disk_install usage, please see AIX documentation - Using the NIM alt_disk_install operation.
For example:
To clone the rootvg to the alternate disk hdisk2 on node1 and update the filesets listed in the installpbundle mybundle1, you can use the command below:
nim -o alt_disk_install -a source=rootvg -a disk=hdisk2 node1
If you want to keep a record in xCAT DB for the alt_disk_install rootvg operation, we recommend you create a copy of the current osimage on the management node, add the updates to the lpp_srouce and create the installp_bundles etc. This way you can have an osimage that corresponds to the one on the alternate disk.
You can display the alternate disk installation status while the installation is progressing, enter the following command on the master:
lsnim -a info -a Cstate <ClientName>
OR
lsnim -l <ClientName>
OR
Check the log file **/var/adm/ras/alt_disk_inst.log** on target NIM client.
The nimadm (Network Install Manager Alternate Disk Migration) command is a utility that allows the system administrator to do the following:
The nimadm command uses NIM resources to perform these functions. Compared with the mksysb alt_disk_install operation and the rootvg alt_dsik_install operation, the alternate disk migration installation has some specific requirements.
For information on the conventional migration installation method, see AIX documentation - Migrating AIX.
Before performing an alternate disk migration installation, you are required to agree to all software license agreements for software to be installed. You can do this by specifying the -Y flag as an argument to the alternate disk migration command or setting the ADM_ACCEPT_LICENSES environment variable to yes.
Please note that in this documentation, we only give an example of how to use nimadm to create a copy of rootvg to a free disk (or disks) and simultaneously migrate it to a new version or release level of AIX. For complete coverage of nimadm command, please refer to AIX documentation - Commands Reference
To execute nimadm migration to the target NIM client, you must create the NIM resources needed by this migration first. For example, if you want to do migration from AIX 6.1 to AIX 7.1, you need to create the lpp_source and SPOT for AIX 7.1. xCAT mknimimage command can help you to achieve this.
mknimimage -s /AIX/instimages 71image
After the lpp_source and SPOT are available, to do alternate disk migration to the target NIM client aix1, using NIM SPOT resource 71spot1, NIM lpp_source resource 71lpp1, and target disks hdisk1 & hdisk2. Note that the -Y flag agrees to all required software license agreements for software to be installed, type the following:
nimadm -c aix1 -s 71image -l 71image_lpp_source -d "hdisk1 hdisk2" .Y
Note: There are some optional flags for nimadm command to customarize the migration installation, such as [ -a PreMigrationScript ], [ -b installp_bundle], [ -z PostMigrationScript], [ -e exclude_files], etc. Please refer to the man page of nimadm for details.
This operation, indicated with the "-C" flag, is designed to clean up after a failed migration that for some reason did not perform a cleanup it self. It can also be used to clear a previous migration in order to perform a new migration.
For example:
To execute nimadm cleanup on client aix1, using NIM SPOT resource spot1, type the following:
nimadm -C -c aix1 -s spot1
After a migration completes, the nimadm command can be used to "wake-up" the migrated altinst_rootvg or the original rootvg (if booted from the migrated disk). The nimadm wake-up (-W flag) performs an alt_disk_install wake-up, NFS exports the /alt_inst file systems, and mounts them on the NIM master. The nimadm sleep function (-S flag) reverses the wake-up by unmounting the NIM master mounts, unexporting the /alt_inst file systems, and executing the alt_disk_install sleep function on the client.
After the alt_disk_install is completed, you can choose to boot the target NIM client with the alternate disk or the original disk.
By default, the attribute of .set_bootlist. is set to yes, this means it will boot from the newly installed alternate disk after the target NIM client is rebooted, so if you want to keep the original bootlist setting, you can:
Specify the attribute of .**set_bootlist**. to **no** in .nim .o alt_disk_install. command
OR
xdsh <ClientName> "bootlist -m normal hdisk0"
To reboot the target NIM client:
xdsh <ClientName> "shutdown .Fr &"
Note: After you rebooted the client with the alternate disk, we recommend you to update xCAT node definition for "provmethod" and "profile" attribute, so that you can know which osimage is running on your nodes from xCAT perspective. For example, if 71image is the new AIX image installed on your alternate disk of node1, after you rebooted the node with the alternate disk, you are recommended to update the node definition as below:
chdef -t node node1 profile=71image provmethod=71image
The alternate disk installation/migration operation itself documented in this documentation is the feature of AIX NIM, not xCAT. The AIX OS installed on the alternate disk (or disks) might not be managed by the xCAT DB, so we recommend you to update the .usercomment. attribute for the target node once it.s using the alternate disk (or disks) to keep a record of any changes that were made. For example, to record which osimage is on which disks, or any other changes that can not be covered by xCAT osimage or node definition.
For the latest information about AIX support, please visit AIX Information Center
Wiki: XCAT_2.6_Release_Notes
Wiki: XCAT_AIX_Cluster_Overview_and_Mgmt_Node
Wiki: XCAT_Documentation