dropdown menu

NIM - MACHINES

Machines

NIM CLIENT:

On NIM master clients should be defined as NIM objects (machines). The types of a NIM client can be:
    -standalone: it is not dependent on any NIM resources for functioning (this is used mostly).
    -diskless, dataless: these needs certain resouces (I have never seen clients with this type)

Settings/attributes of a NIM client can be cheked on NIM master: lsnim -l <client>

# lsnim -l aix31
aix31:
   class          = machines
   type           = standalone
   comments       = autosysb:
   connect        = shell
   platform       = chrp
   netboot_kernel = mp
   if1            = VLAN448_Admin_10_200_30_0 aix31 0 ent1
   ...

-----------------------------------------------------

Creating a NIM client:

1. checking communication between master and client:
    from master: rsh aix222 date (if problem update on client .rhosts, or firewall port opening, or with nimsh)
    from client: telnet aixnim1 1058

    (if nimsh used port 3901 is needed)

2. create nim client: smitty nim -> nim admin...
after giving hostname (aix222):

* NIM Machine Name                                   [aix222]         <--any name what nim will use
* Machine Type                                       [standalone]                                                                 
* Hardware Platform Type                             [chrp]                                                                        
  Kernel to use for Network Boot                     [mp]                                                                             
  Communication Protocol used by client              [shell]          <--we choose shell (it is rsh) (for nimsh other ports are needed)
  Primary Network Install Interface
*   Cable Type                                        tp              <--twisted pair (we choosed it) (bn is coaxial cable (we don't use it)
    Network Speed Setting                            [100]            <--checked interfaces speed: netstat -v     
    Network Duplex Setting                           [full]           <--same as above
*   NIM Network                                      [ent-Network1]
*     Network Type                                    ent
*     Ethernet Type                                   Standard
*     Subnetmask                                     [255.255.255.0]   <--set subnetmask
*     Default Gateway Used by Machine                [50.50.110.3]     <--set client default gateway
*     Default Gateway Used by Master                 [50.20.100.1]
*   Host Name                                         aix222

(If you created earlier a network for this new client (what is recommended), network settingswill be filled automatically.)

--------------------------
create a client with command: nim -o define -t standalone -a if1="net_10_1_1 lpar55 0 ent0" LPAR55

        -net_10_1_1        the name of the NIM network to which this interface connects
        -lpar55            hostname associated with the interface
        -0                 MAC address of the interface (if MAC address will not be set 0 can be used)
        -ent0              logical device name of the network adapter
        -LPAR55            the name of the resource to create (host will be referred via this name in NIM commands)
--------------------------

3. after that, create /etc/niminfo file

on client: niminit -a master=aixnim01 -a name=aix222

-----------------------------------------------------

NIM commands from a client:

niminit -a master=aixnim01 -a name=aix222 -a master_port=1058  rebuild /etc/niminfo form master (aixnim01) to client (aix22) using given port
nimclient -l -l <client>            you can retrieve data from nim master about the client (same as on master: lsnim -l <client>)
nimclient -l -L -t spot <client>    list availablre SPOT resources on the nim master
nimclient -l -p -s pull_ops         list the operations which may be initiated from this machine, enter:

-----------------------------------------------------

Running commands from NIM master on a client via nimsh

If you cannot reach a client (console/ssh/telnet does not work on a nim client), you can use nimsh to run commands on LPARs. (nimsh (port 3901) should be able to communicate to the client)

1. vi nim_script.ksh                        <--on the nim master create a file (script) with commands you would like to run on a nim client
   #!/usr/bin/ksh

   hostname
   oslevel -s
   ps -ef

2. nim -o define -t script -a server=master -a location=/root/nim_script.ksh nim_script    <--create a nim resource from that script

3. /usr/lpp/bos.sysmgt/nim/methods/m_cust -a script=nim_script lpar11             <--running this script (nim_script) on nim client (lpar11)
                                                                                  (it takes few seconds to show the output of those commands)

-----------------------------------------------------

Maintenance Boot of a NIM client:

A NIM client can be booted from NIM master into Maintenance Mode (for example to change root password, check files if normal boot does not work..)    
For this we need a spot with the correct level, then enable maintenance boot for the client:                                  

# nim -o maint_boot -a spot=<spot name> <client name>
(with smitty: smitty nim_mac_op --> select client --> maint_boot --> Select SPOT)


After boot into SMS --> Setup Remote IPL... configure Ip, ping test
Then, Select Install/Boot Device --> Network --> Choose Device --> Normal Boot...
(When TFTP/BOOTP completed in the menu we can choose: Access Root VG…then when we have a prompt passwd…and then sync;sync;sync; reboot.)

If you mount any rootvg filesystems (either automatically under Option 1 or by hand under Option 2 ) and change any files you must manually sync the data from filesystem buffer cache to disk. Normally the syncd daemon does this for you every 30 seconds, but no daemons are running in maintenance mode.

-----------------------------------------------------

No comments:

Post a Comment