AIX Nim
id : aoynta7gai
category : computer
blog : unix
created : 07/30/10 - 09:06:16

Nim commands
Listing
  • List all nim object
# lsnim


  • Information about an object :
# lsnim -l <object>


Deleting
  • Delete a machine
# nim -o remove <machine>


  • Reset object state
# nim -Fo reset <object>


  • Deallocte object :
# nim -o deallocate -a subclass=all <object>


Modifying
  • Change an attribute (if smit stuck it)
# nim -o change -a <attribue>="<value>" <object>


Fileset
  • Create a .toc file in a directort
# inutoc .


Define a machine
  • All operation are performed on nim master
  • Using smit :
# smit nim

    • Step 1 :
  Configure the NIM Environment
  Perform NIM Software Installation and Maintenance Tasks
  Perform NIM Administration Tasks <--
  Create IPL ROM Emulation Media
  NIM POWER5 Tools
  Thin Server Maintenance

    • Step 2 :
  Manage Networks
  Manage Machines <--
  Manage Control Objects
  Manage Resources
  Manage Groups
  Backup/Restore the NIM Database
  Configure NIM Environment Options
  Rebuild the niminfo File on the Master
  Change the Master's Primary Interface
  Manage Alternate Master Environment
  Unconfigure NIM

    • Step 3 :
  List All Machines
  Define a Machine <--
  Change/Show Characteristics of a Machine
  Specify New Master for Client Machine
  Remove a Machine
  Manage Network Install Interfaces
  Manage Network Install Resource Allocation
  Perform Operations on Machines
  Query Remote Machine
  Manage Secondary Adapter Definition Files

    • Step 4 :
* Host Name of Machine                               [<machine_name>]
    (Primary Network Install Interface)

    • Step 5 :
  tok     = token ring network
  ent     = ethernet network <--
  fddi    = FDDI network
  generic = generic network (no network boot capability)
  atm     = ATM network
  ent6    = IPv6 ethernet network

    • Step 6
                                                        [Entry Fields]
* NIM Machine Name                                   [<machine_name>]
* Machine Type                                       [standalone]
* Hardware Platform Type                             [chrp]
  Kernel to use for Network Boot                     [64]
  Communication Protocol used by client              [shell]
  Primary Network Install Interface
*   Cable Type                                        bnc
    Network Speed Setting                            [1000]
    Network Duplex Setting                           [full]
*   NIM Network                                      [ent-Network1]
*     Network Type                                    ent
*     Ethernet Type                                   Standard 
*     Subnetmask                                     [255.255.255.0]
*     Default Gateway Used by Machine                [10.240.70.254]
*     Default Gateway Used by Master                 [10.240.70.254]
*   Host Name                                         quadbcbs1
    Network Adapter Hardware Address                 [0]
    Network Adapter Logical Device Name              []
  IPL ROM Emulation Device                           []
  CPU Id                                             []
  Machine Group                                      []

  Managing System Information
    WPAR Options
      Managing System                                []
    -OR-
    LPAR Options
      Identity                                       []
      Management Source                              []

  Comments                                           []


Define a mksysb ressource
  • All operation are performed on nim master
  • Using smit :
# smit nim

    • Step 1 :
  Configure the NIM Environment
  Perform NIM Software Installation and Maintenance Tasks
  Perform NIM Administration Tasks <--
  Create IPL ROM Emulation Media
  NIM POWER5 Tools
  Thin Server Maintenance

    • Step 2 :
  Manage Networks
  Manage Machines
  Manage Control Objects
  Manage Resources <--
  Manage Groups
  Backup/Restore the NIM Database
  Configure NIM Environment Options
  Rebuild the niminfo File on the Master
  Change the Master's Primary Interface
  Manage Alternate Master Environment
  Unconfigure NIM

    • Step 3 :
  List All Network Install Resources
  Define a Resource <--
  Change/Show Characteristics of a Resource
  Show the Contents of a Resource
  Remove a Resource
  Perform Operations on Resources
  Verify Resources

    • Step 4 :
  exclude_files   = files to be excluded when creating a mksysb or savev
  lpp_source      = source device for optional product images            
  installp_bundle = an installp bundle file                             
  fix_bundle      = fix (keyword) input file for the cust or fix_query o 
  image_data      = config file used during base system installation     
  script          = an executable file which is executed on a client     
  resolv_conf     = configuration file for name-server information       
  root            = parent directory for client / (root) directories     
  paging          = parent directory for client paging files             
  devexports      = device handling file used during wpar installation   
  savewpar        = a workload partition backup image                    
  secattrs        = security privileges file used during wpar installati 
  wpar_spec       = general specification file used during wpar installa 
  dump            = parent directory for client dump files               
  home            = parent directory for client /home directories        
  shared_home     = /home directory shared by clients                    
  tmp             = parent directory for client /tmp directories         
  vg_data         = config file used during volume group restoration     
  savevg          = a savevg image                                       
  adapter_def     = directory containing secondary adapter definition fi 
  linux_source    = resource containing Linux installation images        
  fb_script       = an executable script added to /etc/firstboot and run 
  log             = parent directory for client /var/adm/ras directories 
  spot            = Shared Product Object Tree - equivalent to /usr file 
  bosinst_data    = config file used during base system installation     
  mksysb          = a mksysb image <--
  file_res        = a directory of file(s) for transfer                  
  shared_root     = / directory shared by diskless clients 

    • Step 5 :
                                                      [Entry Fields]
* Resource Name                                      [mksysb-quadbcbs1]
* Resource Type                                       mksysb
* Server of Resource                                 [master]
* Location of Resource                               [/app/list/nim/mksysb/quadbcbs1]
  NFS Client Security Method                         []
  NFS Version Access                                 []
  Comments                                           []

  Source for Replication                             []
                  -OR-
  System Backup Image Creation Options:
    CREATE system backup image?                       no
    NIM CLIENT to backup                             []
    PREVIEW only?                                     no
    IGNORE space requirements?                        no
    EXPAND /tmp if needed?                            no
    Create MAP files?                                 no
    Backup extended attributes?                       yes
    Number of BLOCKS to write in a single output     []
     (leave blank to use system default)
    Use local EXCLUDE file?                           no
     (specify no to include all files in backup)
                  -OR-
    EXCLUDE_FILES resource                           []
     (leave blank to include all files in backup)
    Backup encrypted files?                           yes
    Backup DMAPI filesystem files?                    yes


  • Using command line :
#  nim -o define -t mksysb -a server=master -a location=<path_of_mksysb> <mksysb_basname>


Create a machine object with command line
# nim -o define -t <type> -a platform="<platform>" -a netboot_kernel=<netboo_kernel> -a if1="<if>" -a cable_type1="<cable_type>" -a connect="<connect>" -a net_settings1="<net_settings>" <machine_name>

    • Type : standalone, mksysb ...
    • platform : chrp ....
    • netboot_kernel : 32,64
    • if :
    • cable_type : bnc, N/A ....
    • connect : nimsh, shell
    • net_settings1 = <10|100|1000>
#  nim -o bos_inst -a source=mksysb -a spot=spot_vios21 -a accept_licenses=yes -a mksysb=vios21_mksysb -a bosinst_data=bosinst_vios21 infvio6f1


Corrupted client
  • On a nim client, if /etc/niminfo is corrupted :
    • Verify routes to nim server :
# traceroute <nimserver>

    • Check (and stop if started) nimsh service :
# lssrc -s nimsh
# stopsrc -s nimsh

    • Delete /etc/niminfo :
# rm /etc/niminfo

    • Run a nim init :
# niminit -a name=<hostname> -a pif_name=<interface> -a master=<nimserver> -a master_port=1058 -a connect=nimsh

    • Recheck /etc/niminfo :
# cat /etc/niminfo