Monday, April 14, 2014

Network Installation Manager (NIM) -- Part 1 Introduction & Concepts

Introduction

       NIM (Network Installation Manager) is a IBM AIX  Service used for remote unattended installation similar to the Sun/Oracle Jumpstart and RedHat Kickstart or PXE without DVD/CD used to install AIX in many servers at a time in an Infra. Now, the installation of VIO and Linux can also be performed using NIM. Apart from installation, upgradation and maintainig AIX softwares/filesets the management activities like backup and restore of mksysb can be performed via NIM. By using NIM Master to store mksysb can reduce usage of tape device and time duration.

Activities performed by NIM
        1) New Installation (Pull method)
        2) TL/SP upgradation
        3) OS Migration/Upgradation
        4) mksysb backup/restore
        5) Provide boot CD image for maintenance activities
        6) Centralized repository for Filesets
        7) Used to restore missed files in the mksysb backup

Components of NIM
     The following are the important components involved in NIM installation, confiugration and managment.
   1. Master (NIM Master)
   As named NIM Master server is the repository of all the softwares, OS images, mksysb backup which serves the same to its clients for the corresponding operations.
   2. Client (NIM Client)
    Systems which are managed by NIM Master server for the operations like installation, backup and restoration 
   3. Resources (NIM Resources)
    This can be a single file or up to a whole filesystem that is used to provide some sort of information to, or perform an operation on a NIM client. Resources are allocated to NIM clients using NFS and can be allocated to multiple clients at the same time. The NIM resources are lpp_source,SPOT,mksysb,bosinst_data and image_data
   4. Resource Server 
     Server where resources are available. NIM client can also act as Resource Server. But in most cases NIM Master server will be the resource server. Briefly discuss types of  resources in consecutive sections.
   5. NIMSH Daemon (NIM Service Handler)
     For environments where the standard "rsh" protocol are not enough secure, at the time "nimsh". Using the port nos 3901 and 3902
   6. Allocate/Allocation :
      This process is what allows your NIM client to access resources in NIM. The master uses NFS to perform the allocation process. Resources can be allocated to one or more NIM clients at the same time

NIM RESOURCES

a) lpp_source
           It is just a directory which acts as source of installation which contains the following
                     *  OS image cd/dvd
                     *  filesets/packages
                     *  TL/SP updates
            These type of resources can be used for all NIM clients.
b) SPOT (Shared Processor Object Tree)
           It is similar to boot cd, we can boot the nimclient using the SPOT. It contains the "/usr" part i.e., kernel, filesets, device drivers and BOS install programs.
           There are 2 types of SPOT i) lppspot and ii) mksysbspot and these types of SPOT are specific to particular NIM client or can be used  for all NIM clients.
c) mksysb
         In general, rootvg backup is the mksysb backup which may be specific to particular NIM client.
         Important advantages are quick restoration of crashed OS and can create customized (hardened) mksysb backup of particular which could be installed/resotred in other servers to avoid fresh installation and performing hardening.
d) bosinst_data
       Customized Installation Procedure (bosinst.data) which is used in non-interactive installation, mainly POST installation changes.
e) image_data
        image.data (rootvg architecture) layout of LV,VG,PP information and its architecture.



Daemons Required
  a) bootp protocol (BOOTPD)
   This is the initial communication made between NIM master and client during network boot. 
  b) Trivial File Transfer Protocol (TFTPD)
  It is used to transfer lppsource,SPOT and other resources from NIM server to NIM client during the NIM client booting.
Check the services are running, 
#lssrc -ls inetd
bootps    /usr/sbin/bootpd   bootpd /etc/bootptab     active
tftp         /usr/sbin/tftpd        tftpd -n                    active
#grep bootps /etc/services
bootps                  67/tcp          # Bootstrap Protocol Server
bootps                  67/udp        # Bootstrap Protocol Server
#grep tftp /etc/services
tftp                    69/udp          # Trivial File Transfer
tftp                    69/tcp          # Trivial File Transfer
If the above services are not enabled, start the same.
#chubserver -v bootp -p udp -a 
#chubserver -v tftpd  -p udp -a
#refresh -s inetd
   Also, ensure NFS group related services are  also enabled.
#startsrc -g nfs

Important Directories and Files
   a) /tftpboot
     When we create SPOT, kernel is copied into /tftpboot directory . All kernles of NIM clients are in the direcotry
root@aixnim1: /etc # ls -l /tftpboot
lrwxrwxrwx    1 root     system           34 Dec 19 18:36 aix21.domain.com -> /tftpboot/spot_5200-08.chrp.mp.ent
-rw-r--r--    1 root     system         1276 Dec 19 18:36 aix21.domain.com.info
-rw-r--r--    1 root     system      9379964 Dec  8 15:31 spot_5200-08.chrp.64.ent
-rw-r--r--    1 root     system      9260943 Dec  8 15:31 spot_5200-08.chrp.mp.ent
   b) /etc/bootptab
      File which authenticate nim client for remote boot up for nim operations like bos installation, restoration & maintenance boot. Based on the NIM operation, nim client info update and once the NIM operation completed, entry also removed automatically from this file.
      In simple words, authenticates NIM client for remote boot up.
#tail /etc/bootptab
aix21.domain.com:bf=/tftpboot/aix21.domain.com:ip=10.200.50.56:ht=ethernet:sa=50.20.100.48:gw=10.200.
50.1:sm=255.255.255.0:
The fields are separated with colon (:) and attributes are separated with equal sign (=):
    first field  - NIM client name
           bf       - boot file name
           ip       - NIM client IP address
           ht       - hardware type
          sa       - TFTP server address for the boot file
          gw      - gateway used by client to reach the server
          sm      - subnet mask for the nim client
  c) /etc/niminfo
       The file always exists on the NIM master and client. contains information about who is master and client, port no, protocol informations.
        This is automatically generated when master was created and client was registered to master. This file was not manually edited. If any corrupted, want to be removed and recreated.
 1)Rebuild on Master
        #nimconfig -r
 2)Rebuild on Client
        #nimint -a master=<MASTER_HOSTNAME> -a name=<CLIENT_NIM_NAME>

Filesets Required
   bos.sysmgt.nim.master
   bos.sysmgt.nim.spot

Useful NIM Basics Link
http://www.youtube.com/watch?v=UBbhoSUnCwE

No comments:

Post a Comment