Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Friday 22 November 2013

NIM

NIM environment is a logical group of machines, and multiple NIM environments can share the same TCP/IP network. However, one machine can be part of only one NIM environment a time, and there can be only one active NIMmaster per environment.
The machines (or clients) can be standalone systems, LPARs, diskless, and dataless clients (also known as “thin clients”). The machines can be controlled by one (or more) Hardware Service Console (better known as a Hardware Management Console, or HMC), or be standalone machines without a HMC.
Your first task is to determine which machine or LPAR will be the NIM master.
Next, you must decide which machines will serve the NIM resources.
There are three basic machine roles in a NIM environment: the master, the client (NIM “machine”), and the resource server. The resource server can be either the NIM master or a standalone machine (a system that has its own local copy of the AIX operating system).

NIM Environment
Master
Master refers the machine where you set up and maintain your NIM environment. You can also initiate installations from here (push mode). It is the key piece of the NIM environment. NIM master is only used to run administrative tasks.
Client
The NIM client can be the target for NIM master-initiated operations such as installation, updates, and so forth (push mode). Also, a client can initiate its own installation or update (pull mode). A NIM client automatically becomes a resource server when it holds NIM resources.
Resource server
Any machine (the master or a standalone client) can be configured by the master as a server for a particular software resource. In most environments, the master is also resource server.
Push and pull modes
The push mode operation is initiated from the master. The pull mode operation is initiated from the client. The very first time a client is installed, only the pull mode can be used. Note the following points:
  • · In order for the push mode to be successful, the client must have a miNIMum AIX image already installed and TCP/IP configured.
  • · To use the pull mode, you need access to the clients’ SMS menu. For this you either need a console attached to the machine, or for HMC-managed systems, you need access to the HMC.
NIM database
The NIM database is stored in the AIX Object Data Management (ODM) repository on the NIM master and is divided into four classes: machines, networks, resources, groups.
Machines class
If NIM master is setup and running then lsNIM command extract the content of NIM database.
To extract info of a particular class use lNIM –c classname.
Networks class
The network is what allows the machines in a NIM environment to communicate which each other. If the network is a simple local area network (LAN), the definition of the network object is simplified. The purpose of the network object is to depict the network topology used by the NIM environment. Each modification made on the physical network must be reflected to the NIM database.
Example:
# lsNIM -c networks
NET_EN1 networks ent
Nstate=Network state
The Nstate field determines whether the network object is in use. If the Nstate value displayed is different from ready for a NIM operation, you cannot perform any operation on this object.
Resources class
NIM resource is a pointer to a file or a directory located on a Resource Server. NIM Master is the default Resource Server. e. g. The bosinst_data resource points to a file that contains information used to perform the installation process without requiring any manual intervention. The basic characteristics of a resource are the NIMname, the location (the location of the file or directory), and the resource server hosting the resource.
To list the resources: lsNIM –c resource
To list characterisitics of a resource: lsNIM –l resource_name
Rstate=resource state
Rstate values: ready for use / verification is being performed / customization is being performed / unavailable for use
The Rstate shown determines whether the object is currently in use or not. If the Rstate is
not ready, it cannot be used and a warning message will appear on the console.
Groups class
group is a collection of either machines or resources. Only two types are available:
  • · res_group, for grouping a set of resources
  • · mac_group, for grouping a set of machines
Important Resource types:
Spot
SPOT, or Shared Product Object Tree, is a directory of code (installed filesets) that is used during client booting procedure. It is equivalent in content to the code that resides in the /usr file system on a system running AIX 5L (binary objects – executables and libraries, header files and shell scripts). This resource (directory) replaces the content of the basic ramdisk image available on installation CDs.
The installation is performed over a network, and there are no AIX CDs available. Device drivers, the BOS install program, and other necessary code needed to perform a base operating system installation
are found inside the SPOT. During the installation, the client machine NFS mounts this resource in order to access the code needed for the installation process.
The SPOT also contains the code needed to generate the boot images (kernels, which will be stored in the /tftpboot directory) that the client uses until it can manage to NFS-mount the SPOT directory.
By running the lsNIM -t spot command, you can the list the different available SPOT resources.
lpp_source
An lpp_source is a directory similar to AIX install CDs. It contains AIX Licensed Program Products (LLPs) in Backup File Format (BFF) format and RPM Package Manager (RPM) filesets that you can install.
By running the lsNIM -t lpp_source command, you can the list the different available lpp resources.
mksysb
This resource is a file containing the image of the root volume group (generated with the AIX mksysb command) of a machine. It is used to restore a machine, or to install it from scratch (also known as “cloning” a client).
By running the lsNIM -t mksysb command, you can the list the different available mksysb resources
bosinst_data
The bosinst_data resource is a flat ASCII file similar to the bosinst.data. This resource comes in handy for both push or pull installation of multiple machines at the same time.
By running the lsNIM -t bosinst_data command, you can the list the different available bosinst_data resources.
script
The script resource is a file. After the BOS installation is finished on your client, you can perform customization such as file system resizing, additional user creation, and so forth.
boot
The “boot” resource created a /tftpboot directory to hold all of your boot images.
AIX Installation using NIM:
To start a machine installation, only two resources are mandatory: the LPP source (lpp_source), and the Shared Product Object Tree (SPOT). However, to avoid using manual intervention during the installation process, additional resources providing information for the AIX_install process can be used (like bosinst_data, image_data, and script).
Install NIM Master:
# smit NIMconfig
OR
NIMconfig -a netname=master_net -a pif_name=en0 -a netboot_kernel=mp -a cable_type=tp -a client_reg=yes
This will add NIMesis and NIMd subsystems and start NIMesis subsystem.
NIM Commands
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 ) 
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 inst_resource 
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 
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

No comments:

Post a Comment