Showing posts with label IBM AIX - NIM. Show all posts
Showing posts with label IBM AIX - NIM. Show all posts

Saturday, December 15, 2012

IBM AIX - OS Upgrade nimadm 12 phases

IBM AIX - OS Upgrade nimadm 12 phases!!

The nimadm utility offers several advantages over a conventional migration. Following are the advantages of nimadm over other migration methods:

Reduced downtime for the client: The migration can execute while the system is up and running as normal. There is no disruption to any of the applications or services running on the client. Therefore, the upgrade can be done at a anytime time. Once upgrade complete we need take a downtime from the client and scheduled a reboot in order to restart the system at the later level of AIX.


Flexibility: The nimadm process is very flexible and it can be customized using some of the optional NIM customization resources, such as image_data, bosinst_data, pre/post_migration scripts, exclude_files, and so on.


Quick recovery from migration failures: All changes are performed on the copied rootvg (altinst_rootvg). If there are any problems with the migration, the original rootvg is still available and the system has not been impacted. If a migration fails or terminates at any stage, nimadm is able to quickly recover from the event and clean up afterwards. There is little for the administrator to do except determine why the migration failed, rectify the situation, and attempt the nimadm process again. If the migration completed but issues are discovered after the reboot, then the administrator can back out easily by booting from the original rootvg disk.
The nimadm command performs a migration in 12 phases. All migration activity is logged on the NIM master in the /var/adm/ras/alt_mig directory. It is useful to have knowledge of each phase before performing a migration. After starting the alt_disk process from NIM master we output as below, these are pre ALT_DISK steps


0513-029 The biod Subsystem is already active.
Multiple instances are not supported.
0513-059 The nfsd Subsystem has been started. Subsystem PID is 3780796.
0513-059 The rpc.mountd Subsystem has been started. Subsystem PID is 1237104.
0513-059 The nfsrgyd Subsystem has been started. Subsystem PID is 3477732.
0513-059 The gssd Subsystem has been started. Subsystem PID is 3743752.
0513-029 The rpc.lockd Subsystem is already active.
Multiple instances are not supported.
0513-029 The rpc.statd Subsystem is already active.
Multiple instances are not supported.
starting upgrade now
Initializing the NIM master.
Initializing NIM client webmanual01.
Verifying alt_disk_migration eligibility.
Initializing log: /var/adm/ras/alt_mig/webmanual01_alt_mig.log
Starting Alternate Disk Migration.

Explanation of Phase 1 : After starting nfsd , rpc.mountd , gssd , nfsrgyd,rpc.lockd, rpc.statd process in the pre ALT_DISK , the master issues the alt_disk_install command to the client, which makes a copy of the clients rootvg to the target disks. In this phase, the alternate root volume group (altinst_rootvg) is created.

+-----------------------------------------------------------------------------+
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 "hdisk0"
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_hd6
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_lg_dumplv
Creating logical volume alt_lv_admin
Creating logical volume alt_lv_sw
Creating logical volume alt_lg_crmhome
Creating logical volume alt_lv_crmhome
Creating logical volume alt_paging00
Creating logical volume alt_hd11admin
Creating /alt_inst/ file system.
Creating /alt_inst/admin file system.
Creating /alt_inst/adminOLD file system.
Creating /alt_inst/crmhome file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/software file system.
Creating /alt_inst/tmp 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.

Explanation of Phase 2 : The 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 nimvg.
Checking for initial required migration space.
Creating cache file system /webmanual01_alt/alt_inst
Creating cache file system /webmanual01_alt/alt_inst/admin
Creating cache file system /webmanual01_alt/alt_inst/adminOLD
Creating cache file system /webmanual01_alt/alt_inst/crmhome
Creating cache file system /webmanual01_alt/alt_inst/home
Creating cache file system /webmanual01_alt/alt_inst/opt
Creating cache file system /webmanual01_alt/alt_inst/sw
Creating cache file system /webmanual01_alt/alt_inst/tmp
Creating cache file system /webmanual01_alt/alt_inst/usr
Creating cache file system /webmanual01_alt/alt_inst/var

Explanation of Phase 3 : The NIM master copies the NIM client’s data to the cache file systems in nimvg. This data copy is done by either rsh or nimsh.

+-----------------------------------------------------------------------------+
Executing nimadm phase 3.
+-----------------------------------------------------------------------------+
Syncing client data to cache ...
cannot access ./tmp/alt_lock: A file or directory in the path name does not exist.
Explanation of 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.

Explanation of 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. 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.
/webmanual01_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.

Explanation of 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.
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.

Mandatory Fileset Updates
-------------------------
(being installed automatically due to their importance)
bos.rte.install 6.1.6.15 # LPP Install Commands

<< End of Success Section >>

+-----------------------------------------------------------------------------+
BUILDDATE Verification ...
+-----------------------------------------------------------------------------+
Verifying build dates...done
FILESET STATISTICS
------------------
1 Selected to be installed, of which:
1 Passed pre-installation verification
----
1 Total to be installed

+-----------------------------------------------------------------------------+
Installing Software...
+-----------------------------------------------------------------------------+

installp: APPLYING software for:
bos.rte.install 6.1.6.15

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

[LOTS OF OUTPUT]

Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
lwi.runtime 6.1.6.15 USR APPLY SUCCESS
lwi.runtime 6.1.6.15 ROOT APPLY SUCCESS
X11.compat.lib.X11R6_motif 6.1.6.15 USR APPLY SUCCESS
Java5.sdk 5.0.0.395 USR APPLY SUCCESS
Java5.sdk 5.0.0.395 ROOT APPLY SUCCESS
Java5.sdk 5.0.0.395 USR COMMIT SUCCESS
Java5.sdk 5.0.0.395 ROOT COMMIT SUCCESS
lwi.runtime 6.1.6.15 USR COMMIT SUCCESS
lwi.runtime 6.1.6.15 ROOT COMMIT SUCCESS
X11.compat.lib.X11R6_motif 6.1.6.15 USR COMMIT SUCCESS 

install_all_updates: Generating list of updatable rpm packages.
install_all_updates: No updatable rpm packages found.

install_all_updates: Checking for recommended maintenance level 6100-06.
install_all_updates: Executing /usr/bin/oslevel -rf, Result = 6100-06
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.

Explanation of 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.

Explanation of 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 47136 512 byte blocks.
Writing boot image to client's alternate boot disk hdisk0.

Explanation of 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.

+-----------------------------------------------------------------------------+
Executing nimadm phase 9.
+-----------------------------------------------------------------------------+
Adjusting client file system sizes ...
Adjusting size for /
Adjusting size for /admin
Adjusting size for /adminOLD
Adjusting size for /crmhome
Adjusting size for /home
Adjusting size for /opt
Adjusting size for /sw
Adjusting size for /tmp
Adjusting size for /usr
Expanding /alt_inst/usr client filesystem.
Filesystem size changed to 12058624
Adjusting size for /var
Syncing cache data to client ...

Explanation of 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 /webmanual01_alt/alt_inst/var
forced unmount of /webmanual01_alt/alt_inst/usr
forced unmount of /webmanual01_alt/alt_inst/tmp
forced unmount of /webmanual01_alt/alt_inst/sw
forced unmount of /webmanual01_alt/alt_inst/opt
forced unmount of /webmanual01_alt/alt_inst/home
forced unmount of /webmanual01_alt/alt_inst/crmhome
forced unmount of /webmanual01_alt/alt_inst/adminOLD
forced unmount of /webmanual01_alt/alt_inst/admin
forced unmount of /webmanual01_alt/alt_inst
Removing nimadm cache file systems.
Removing cache file system /webmanual01_alt/alt_inst
Removing cache file system /webmanual01_alt/alt_inst/admin
Removing cache file system /webmanual01_alt/alt_inst/admin
Removing cache file system /webmanual01_alt/alt_inst/crmhome
Removing cache file system /webmanual01_alt/alt_inst/home
Removing cache file system /webmanual01_alt/alt_inst/opt
Removing cache file system /webmanual01_alt/alt_inst/sw
Removing cache file system /webmanual01_alt/alt_inst/tmp
Removing cache file system /webmanual01_alt/alt_inst/usr
Removing cache file system /webmanual01_alt/alt_inst/var

Explanation of 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 "hdisk0"
## 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/tmp
forced unmount of /alt_inst/sw
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/crmhome
forced unmount of /alt_inst/admin
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: hdisk0 blv=hd5

Explanation of 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 webmanual01.
Please review log to verify success
Initializing the NIM master.
Initializing NIM client webmanual01.
Verifying alt_disk_migration eligibility.
Initializing log: /var/adm/ras/alt_mig/webmanual01_alt_mig.log
Starting Alternate Disk Migration.
After the migration is complete, login to client and confirm bootlist is set to the altinst_rootvg disk.
# lspv | grep rootvg
Hdisk1 0000273ac30fdcfc rootvg active
hdisk0 000273ac30fdd6e altinst_rootvg active

# bootlist -m normal -o
Hdisk0 blv=hd5

Wednesday, October 3, 2012

IBM AIX - NIM Made Easy - A complete Overview!!

Master: It refers the machine where you setup and maintain your NIM environment

Client: It can be target for NIM Master-operations. Such as installation, updation.

NIM Classes: Machines, Network, Resources, Groups

Group: Collection of machines or resources

Resources : lpp_source, SPOT, mksysb, bosinst_data, script, image_data, installp_bundle

lsnim – extract the contents in nim master

lsnim –c machines   Shows the machine names

lsnim –l 

/etc/bootptab: This file is used by the bootpd daemon. With no operations this file empty. This file gets updated automatically by the NIM master when a NIM operation is executed that requires the client machine to boot from a NIM SPOT.

/etc/exports: Any sort of installation, boot, mksysb savevg etc operation requires the use of NFS. This file will be updated with which locations are NFS exported from the master to the client and the permissions associated with those exports.

/etc/hosts: It gives a relationship between a system’s hostname and an IP address. If your IP address does not match up to the correct hostname your installation fails.

/etc/niminfo: This file should always exist on the NIM master. This file is built when you first initialize the NIM environment. This is required to run nim commands and perform nim operations. If the /etc/niminfo file accidentally deleted you can rebuild the file.

/tftpboot: The main purpose of this directory is to hold the boot images that are created by nim when a boot or installation is initiated. This directory also holds informational files about the clients that are having a boot or installation operation performed.

SPOT: Shared product object tree.Its a directory of code(installed filesets). That is used during client booting procedure. This content equals to /usr file system(Binaries, executables and libraries, header files and shell scripts).
boot images can exist in the /tftpboot directory. kernels will be stored in /tftpboot directory.

lsnim -t spot -> list the different available spots
To find oslevel -r output by lsnim -l . If the SPOT and mksysb are not at the same level, installation will only work if the SPOT is at higher level than the mksysb.

lpp_source: Similar to AIX install CD’s. It contains AIX licensed program products(LPPs) in Backup File Format.
Lpp_source with attribute simages=yes means create a SPOT, and to install the AIX operating system.
Lpp_source with attribute simages=no means can not be used to install base AIX operating system.

lpp_source types: lsnim -t lpp_source

Mksysb:this resource is a file containing the image of the root volume group of machine.
It is used to restore a machine.

Defining MKSYSB resource:Nim –o define –t mksysb –a source= -a server=master –a location= resource name.
Lsnim –t mksyb

bosinst_data: bosinst_data resource is a flat ascii file, like bosinst.data used for restoring system backup images from tape or CD/DVD. this resource is for Push/pull installation of multiple machines at the same time.

script: contains all the commands to perform customization. such as file system resizing, additional user creation ..

To start a nim environment
  1. Select a machine to be the master
  2. Install AIX for the master
  3. install NIM file sets : bos.sysmgt.nim.master, bos.sysmgt.nim.spot
  4. Configure the selected machine as a NIM Master using smitty nimconfig  Mention Network name, Interface : nimconfig –a netname=net_10_1_1 –a pif_name=en0 –a netboot_kernel=mp –a cable_type=tp –a client_reg=no
  5. When machine added to NIM environment, the /etc/niminfo file is created.
  6. To rebuild the NIM master /etc/niminfo file, use the nimconfig –r command
  7. To rebuild and recover NIM client /etc/niminfo file use the niminit command. Ex: niminit –a master= -a name=
  8. Create file systems for nim   The lpp_source and SPOT resources are directories and the related filesystems must be created.
  9. Define basic resources(lpp_source, SPOT)  smitty nim_mkres
  10. Define the client (smitty nim_mkmac)
  11. Start the client installation(smitty nim_task_inst)
  12. Verify the /etc/bootptab
  13. Verify the boot files created or not in the /bootptab
NIM Daemons: nimesis, nimd, bootpd, tftpd
NIM Master uses the bootpd and tftpd
The bootpd daemon will also use the /etc/bootptab file when a NIM client is configured to be booted from the NIM master.
The tftpd daemon uses the /etc/tftpaccess.ctl file to determine which directory hierarchy is allowed to share.
/var/adm/ras directory contains the nim master log files.
/usr/ad/ras/nimlog file contains information about failed NIM operations.
Alog command to view the nim logs: alog –f /usr/adm/ras/nimlog -o

Estimation of minimum disk requirements: lpp_source   6GB, SPOT 2GB, mksysb 40GB
File System Hierarchy:
/tftpboot: This is used for NIM master boot images(Kernels) and info files for the NIM clients.
/export/lpp_source: Used for storing versions of AIX base level filesets in specific directories
/export/spot: Used for storing non /usr
/export/images: This is used for storing system backup images. Images can be created by NIM mksysb.
/export/mksysb: This directory for the mksysb image files to install on clients-approx 1.5GB per image.
/export/res: for bosinst_data, image_data and scripts.
/export/53 contains lppsource_53TL6 and spot_53TL6
NIM server size depends upon how many versions of AIX filesets, TLs, PTFs, Service Packs
Filesets for NIM Master.: bos.net.tcp.server, bos.net.nfs.server, bos.sysmgt.nim.master, bos.sysmgt.nim.spot.

Master config: smitty nim configure NIM environment advanced configuration Initialize nim master only. ( give details like network name and interface)

Making the lppsource:
  • Copy software from CD or DVD into /export/53 file system Smitty bffcreate  ( give input device, software package to copy , directory for storing sw package)
  • Define it as a NIM resource: smitty nim configure the NIM environment  Advanced configuration  Create basic installation resources  create a new LPP_source ( give resource server, LPP_source name, LPP_source directory)
Making the SPOT: smitty NIM  configure the NIM environment  Advanced configuration   Create Basic installation resources   Create a New Spot ( give Resource server, input device, SPOT name and SPOT directory.

NIM Configuration:
Define Client Machine: smitty nim   perform nim administration tasks  manage machines  define a machine(NIM machine name, machine type(standalone), hardware platform type(chrp), kernel to use for network boot(mp), cable type(tp)

Display NIM network objects: lsnim –l –c networks

The Basic NIM installation resources:
1) one nim lpp_source and one SPOT
2) for mksysb installation mksysb resource and SPOT

Define lpp_source: nim –o define –t lpp_source –a server=master –a location=/export/lpp_source/lpp5300 –a source=/dev/cd0 lpp5300

Creating a NIM lpp_source from a directory  Nim –o define –t lpp_source –a server=master –a location=/export/lpp_source/lpp5300 lpp5300

Removing NIM lpp_source: nim –o remove lpp5300

Check a NIM lpp_source: nim –Fo check lpp5304

Creating a NIM spot: nim –o define –t spot –a server=master –a location=/export/spot –a source=lpp5300 –a installp_flags=-aQg spot5300

Listing Filesets in a SPOT: nim –o lslpp –a filesets=all –a lslpp_flags=La spot6100-01
Nim –o lslpp spot6100-01
Listing fixes in a SPOT: nim –o fix_query spot6100-01
TL of a SPOT: lsnim –l spot6100-01|grep oslevel

Listing Client Filesets: nim –o lslpp –a filesets=all –a lslpp_flags=-La client.

Removing the NIM spot   nim –o remove spot5300

Checking the SPOT nim –o check spot5300

Resetting the NIM spot   nim –Fo check spot5300

Create a nim client  nim –o define –t standalone –a if1=”net_10_1_1 lpar55 0 ent0” LPAR55

Define NIM machines using smit nim_mkmac

Removing NIM client Definition: nim –o remove LPAR55

Installing NIM Clients:
Base Operating System Installation
System Clone installation
Automated customization after a generic BOS install.

BOS install through NIM:
  • Nim –o allocate –a spot=spot5304 –a lpp_source=lpp5304 LPAR55
  • Initiate the install: nim –o bos_inst –a source=spot5304 –a installp_flags=agX –a accept_licenses=yes LPAR55
  • If the installation is unsuccessful, you need to reallocate the resources
  • Reset and deallocate NIM resources: Nim –Fo reset LPAR55, Nim –Fo deallocate –a subclass=all LPAR55
  • View the progress of installation: Nim –o showlog –a log_type=boot LPAR55
Using SMIT to install standalone client: smitty nim_bosinst  select a target for the operation  select the installation type   select the lpp_source  select the spot
After Initial program load   SMS Menu  setup remote IPL interpartition logical LAN  Select IP parameters(Client IP, Server IP, Gateway, Subnetmask) Ping Test Execute Ping Test  Select Boot Option  Select install/Boot Device(Network)  Select normal boot mode

Steps to migrate the NIM master to AIX 5L V5.3
  1. Unmount all NFS mounts
  2. Document the AIX and NIM master configuration(snap –ac, lsnim)
  3. Perform NIM database backup   smitty nim_backup_db  Backup the NIM database
  4. Perform a mksysb of the NIM Master
  5. insert Aix 5l v5.3 CD volume 1 into the CD drive
Creating mksysb from NIM client:
Nim –o define –t mksysb –a server=master –a source=lpar5 –a mk_image=yes –a location=/export/images/mksysb.lpar5 mksysb_lpar5

Backup the VIO server:
Backupios –file /home/padmin/viobackup/VIO.mksysb –mksysb

Restoring the VIO server:
Defining mksysb resource: smitty nim_mkres(select mksysb)  Define Spot resource: smitty nim_mkres(select spot)  perform the BOS installation

NIM Commands
nimconfig -a pif_name=en0 -a netname=net1 To initialise the NIM master with network name net1
nimconfig -r  To rebuild /etc/niminfo file which contains the variables for NIM
nim -o define -t lpp_source -a source=/dev/cd0 -a server=master –a location=/export/lpp_source/lpp_source1 lpp_source1  To define lpp_source1 image in /export/lpp_source/lpp_source directory from source cd0
nim -o define -t mksysb -a server=master -a location=/resources/mksysb.image mksysb1  To define mksysb resource mksysb1, from source /resources/mksysb.image on master
nim -o remove inst_resource  To remove the resource
nim –o showres lpp_source6100 Listing contents of the lpp_source.
Nim –o showres –a instfix_flags=T lppsource_61_01
nim -o check lpp_source1  To check the status of lpp_source lpp_source1
nim -o allocate -a spot=spot1 -a lpp_source=lpp_source1 node1  To allocate the resources spot1 and lpp_source1 to the client node1
nim -o bos_inst node1  To initialise NIM for the BOS installation on node1 with the allocated resources
nim -o dkls_init dcmds  To initialize the machine dcmds as diskless operation
nim -o dtls_init dcmds To initialize the machine dcmds for dataless operation
nim -o cust dcmds To initialize the machine dcmds for customize operation
nim -o diag dcmds To initialize the machine dcmds for diag operation
nim -o maint dcmds To initialize the machine dcmds for maintenance operation
nim -o define -t standalone -a platform=rspc -a if1=”net1 dcmds xxxxx” -a cable_type1=bnc dcmds To define the machine dcmds as standalone with platform as rspc and network as net1 with cable
type bnc and mac address xxxxx
nim -o unconfig master To unconfigure nim master master
nim -o allocate -a spot=spot1 dcmds To allocate the resource spot1 from machine dcmds
nim -o deallocate -a spot=spot1 dcmds To de allocate the resource spot1 from machine dcmds
nim -o remove dcmds To remove machine dcmds after removing all resources associated to it
nim -o reboot dcmds To reboot ther client dcmds
nim -o define -t lpp_source -a location=/software/lpp1 -a server=master -a source=/dev/cd0 lpp1 To define lppsource lpp1 on master at /software/lpp1 directory from source device /dev/cd0
lsnim  To list the nim resources
lsnim -l dcmds  To list the detailed info about the object dcmds
lsnim -O dcmds  To list the operation dcmds object can support
lsnim -c resources dcmds  To list the resources allocated to the machine dcmds
nimclient  The client version of nim command (User can obtain same results of nim in server )

NIM Master Configuration:
Nim Installation:
File sets required for NIM installation:
  • bos.sysmgt.nim.master
  • bos.sysmgt.nim.client
  • bos.sysmgt.nim.spot
Put volume 1 of your media installp –acgXd /dev/cd0 bos.sysmgt.nim OR use smit install_all

Initial Setup: smit nim_config_env

Initializing the NIM master: nimconfig –a pif_name=en0 –a master_port=1058 –a netname=master_net –a cable_type=bnc
Or smitty nimconfig.
Lsnim –l master   you will see information about NIM master
Lsnim –l |more  The boot resource created a /tftpboot directory to hold all of your boot images. All NIM clients that are on the same subnet as this master will be assigned to master_net network.

Set up first lpp_source resource: Create file system called /export/nim/lpp_source.
Nim –o define –t lpp_source –a location=/export/nim/lpp_source/53_05 –a server=master –a comments=’5300-05 lpp_source’ –a multi_volume=yes –a source=/dev/cd0 –a packages=all 5305_lpp
Or
Smit nim_mkres  select lpp_source
If you wish to add other volumes you can use
A) bffcreate the volumes into the lpp_source
B) Use NIM to add the volumes smitty nim_res_op select lpp_source select update give target lpp_source and source
Lsnim –l 5305_lpp
Rstate: If this is not set to ‘ready for use’ then you cannot use this resource. Running a check on the lpp_source will allow you to clear this up. Nim –o check

Set up first SPOT resource: create file system called /export/nim/spot.
Nim –o define –t spot –a server=master –a source=5305_lpp –a location=/export/nim/spot –a auto_expand=yes –a comments=’5300-05 spot’ 5305_spot
OR
Smitty nim_mkres select SPOT.
Lsnim –l 5305_spot

Unconfiguring NIM master: nim –o unconfigure master.

Installing software on a client: smitty nim (or smit nim_inst_latest) Perform NIM software installation and Maintenance tasks Install and update software Install Software select the client and the lpp_source.

Updating client software to a latest level: smitty nim(or nim_update_all) perform nim software installation and maintenance tasks install and update software update installed software to latest level select the client then select the lpp_source.

Alternate Disk Install for new TLs: smitty nim(or nim_alt_clone) Perform NIM software installation and Maintenance tasks  Alternate Disk Installation  Clone the rootvg to an alternate disk ( select taget machine and disk)

Alternate disk install for a new release: smit nim(or nimadm_migrate) Perform NIM software installation and Maintenance tasks Alternate disk installation  NIM alternate disk migration perform nim alternate disk migration( select client, disk name, LPP source and SPOT name)

Performing Installs from the client: smit nim(or nim_client_inst)   install and upgrade software.

RTE installation:
  • Requires lpp_source and spot
  • Default is to install the BOS.autoi bundle
  • Define the client on the NIM master
  • Prepare the NIM master to supply RTE install resources to the client
  • Initiate the installation from the client
Defining the client: smit nim_mkmac (give hostname) enter give machine type standalone, hardware platform type chrp, communication protocol need by client nimsh, cable type N/A.

Client on a new network: smit nim_mkmac  give hostname and enter. Type of network attached to network install interface  ent(Ethernet network) enter. Give NIM network network2 and subnetmask 255.255.255.0, default gateway used by machine and master.

Setting up the master to install: smit nim_bosinst select target machine select the installation type (rte) select the lpp_source select the SPOT install the base OS on standalone clients.

Checking the NIM master: lsnim –l client, tail –l /etc/bootptab(bf field in /etc/bootptab specifies the boot file that will
be transferred to the client using TFTP after the client contacts the master using BOOTP) , ls –l /tftpboot(Actually a symbolic link) , showmont –e ( shows exported files)

Typical Install Sequence:
  • Client initates BOOTP request to NIM server.
  • NIM server responds with information about the boot file (bootptab file)
  • Client initates TFTP of boot file from NIM server.
  • Client runs boot file
  • Client NFS mounts SPOT and lpp_source
  • Install Operating system
Accessing SMS: Open HMC  select LPAR  Activate  select profile (default) click on open a terminal window Advanced select boot mode SMS  ok   select remote IPL  select the adapter select internet protocol version (IPv4) select network service(BOOTP) Setting IP parameters( select client IP, server IP, gateway, subnet mask) setting the bootlist(select install/boot device select network  select network service(BOOTP) select the normal boot mode)   setting the boot(are you sure you want to exit SMS(yes). 

Monitoring progress on the master: lsnim –l client ( info   prompting_for_data_at_console)

Installation: Main BOS installation menu ( select install now with default settings)
To view the bosinst log   nim –o showlog –a log_type=bosinst client.
Listing valid operations for an object type: lsnim –Pot master
Listing valid operations for an object: lsnim –O client
Rebuilding the /etc/niminfo file: nimconfig –r
Niminit -a name=client –a master=master
Backing up the NIM database: smitty nim_backup_db (default value is /etc/objrepos/nimdb.backup)
Restore the previously created backup: smitty nim_restore_db
NIM Log files:
/var/adm/ras/nimlog
/var/adm/ras/nim.installp
/var/adm/ras/nimsh.log
/var/adm/ras/bosinstlog
/var/adm/ras/nim.setup
High availability ( Alternate NIM master)
/etc/niminfo: Lists the active NIM master, and a list of valid alternate masters.
Configure alternate NIM master: smit niminit_altmstr
Synchronizing NIM database: smit nim_altmstr ( select synchronize alternate master’s NIM DB)

Pages