Anyone familiar with AIX, will know of NIM (the network install manager). Nim works on a server / client relationship. You configure one nim master in an environment, then setup your client lpars as ‘nim clients’. The advantages of using nim are numerous, here are just a few:
- Install a specific version of AIX and tailor it to your needs. Then create a “golden image”. This golden image can then be used to install AIX on one (or more) LPARs simultaneously.
- Create bare-metal OS backups of an AIX lpar as a “mksysb”. In case of disaster, this mksysb can be restored in typically 20 minutes. The nim master can be configured to make regular backups of your AIX infrastructure on a schedule.
- Apply OS installs, ML upgrades, install efixes etc to one or many nim clients in parallel (thus saving time).
- Perform AIX migrations to alternate boot disks. This saves time, as the system is upgraded to the alternate disk. Downtime is only required for rebooting the server. Upon reboot, the system will boot from the alternate disk. If issues arise, it can be remedied by rebooting from the initial boot disk
When setting up the NIM server, it should be noted that the NIM server should always be the most up-to-date AIX system in your environment. The NIM environment consists of a nim server, nim clients, shared product object trees (spots), licensed program product (lpps) at a minimum. Typically one configures a large physical volume to store all of the NIM data in.
Nim Server Configuration
Have a large physical volume (200+GB) for nim. Create a volume group for nim. Usually something like nimvg, as a jfs2 file system. Special consideration should also be made for NIM. As NIM should be configured for NFS, bootp (or dhcp), and tftp. The NIM communication itself will also require special ports opened for proper communication. This link gives a good breakdown of NIM, and most importantly the ports that will require special firewall rules for.
For the NIM server, install the following BOS filesets from the original AIX media. The specific filesets required to be installed are:
- bos.sysmgt.nim.master
- bos.sysmgt.nim.spot
- bos.sysmgt.nim.client
Here are the steps one could run to configure a NIM server:
Insert the AIX media (volume 1) in the CD/DVDROM physical device. That optical device should be “owned” by the NIM Server partition. If this is a virtualized LPAR, you’ll want to have the AIX media image file (iso) associated to the LPAR. If it’s a physical device, the NIM server should have ownership of the CD/DVD-ROM . Alternatively, if it’s a mounted filesystem (such as from a NFS export), you could perform a loopmount on the ISO image file. This can be accomplished with:
# mkdir /test
# loopmount -i <nfs_mounted_directory_path_to_iso_file> -m <mount_iso_to_this_directory> -o "-V -o rw"
Now that the AIX media is available, you’ll want to install the AIX filesets required to setup a NIM Server.
# installp -agXd /test/installp/ppc bos.sysmgt.nim.master bos.sysmgt.nim.spot bos.sysmgt.nim.client
Next, configure the nim environment by adding in the default network to use: (it’ll take default network infromation from the specified network interface en0)
# nimconfig -a netname=network1 -a pif_name=en0 -a cable_type=tp -a platform=chrp -a netboot_kernel=mp
Configure Storage
Next, the storage can be configured. It’s common practice to put all of the nim stuff “outside” of the rootvg, as you don’t want to try and back all of that up by default when doing a mksys backup. Thus, with an additional PV added (physical or virtual) add a VG, then setup one (or more) LVs/FSs for it.
To determine what PVs are currently available, run the command: lspv
Next, create a scalable VG, using 256MB PP size, and a VG name of nimvg:
# mkvg -S -y 'nimvg' -s '256' hdisk1
Next, create one filesystem for nim to use. More can be added if so desired.
# mkdir /nim && crfs -v jfs2 -g nimvg -a size=150G -m /nim -A yes -p rw -t no
Mount the filesystem: mount /nim
Create the basic nim resources
lpp_source is used for storing the copied installation images. As the AIX media is currently mounted, one would create the resource, and copy the pertinent files to that directory. In the case here, /nim is a mounted filesystem, and the various pieces will be sub-directories underneath /nim. Of course, one could always setup seperate file systems for these if so desired.
# mkdir /nim/lpp_source
# nim -o define -t lpp_source -a source=/test
-a server=master -a location=/nim/lpp_source/aix_7200-05-02 aix_7200-05-02_lpp_source
Once you start the process, you’ll notice it starts to copy files into the /nim/lpp_source_aix_7200-05-02 directory. Once successful, you should receive text similar to:
Now checking for missing install images...
All required install images have been found. This lpp_source is now ready.
Next a spot has to be created.
# mkdir /nim/spot
# nim -o define -t spot -a source=aix_7200-05-02_lpp_source -a server=master -a location=/nim/spot 7200-05-02_spot
Now that you have the one basic network resource and the basics installed, you can move on to adding in client definitions, additional networks (if required), etc.
Create nim client definition
When adding a nim client the MAC hardware address from the LPARs ethernet interface is required, as well as an IP address. Usually the FQDN and IP address are added to DNS in advance. However, the system can be configured w/o DNS. One has to create a manual hosts entry on the nim master if going this route. For an LPAR that already has an OS installed on it, it can be gathered in a few different ways from the command-line. One such way would be to run the netstat command: netstat -i | grep -v lo0
In the case that a new LPAR was created, and no OS is installed. The LPAR is activated, enter the SMS menus and select “Setup Remote IPL (Initial Program Load)”. It will list the location code of the ethernet interface, and it’s MAC address.
Add a nimclient defintion from the nim master: nim -o define -t standalone -a platform=chrp -a if1="network1 FQDN MAC" -a cable_type1=tp -a netboot_kernel=mp -a connect=nimsh nimclient
Replace “network1” if you named the network differently in the nim master. FQDN is the fully qualified domain name to use for this client, and replace MAC with the actual mac address of the nim client you are adding (discovered from the SMS setup remote IPL screen).
To install an OS to a nimclient in this manner, a mksysb image should be available to use. More on that later.