nim

35
AIX Network Install Manager When we replaced our old hardware platform with IBM AIX RS/6000 systems, a main concern was controlling how our new systems would be installed. With the old platform, we ran into several instances where the software (moving from our development group to QA and into production) was not the same, which caused numerous build breaks. We chose the AIX Network Installation Management (NIM) setup, because we needed to ensure consistent, standard OS installations between systems within our four separate data centers. Our company also has a security rule that doesn't allow any one machine access to all networks within our organization. Our four separate data centers have four separate networks with no connection between them, and each network is segmented into either inside or outside the firewall. NIM Resources NIM allows you to customize installations and maintain clients on the network from a centralized location (the NIM master) or the NIM client itself. The master contains the NIM database and can serve resources. Resources in NIM are files or directories containing data that NIM will use to install, customize, and maintain NIM clients. A NIM client is any machine configured and defined in the NIM database. Some key NIM resources used in our setup are: Licensed Program Product Source Directory (lpp_source): This directory contains backup file format (BFF) images, which AIX installp uses to load software. One way to understand the role of the lpp_source directory in a BOS installation is to compare it to all the installation images needed to support any configuration (specifically different device configurations) along with a base core set of software (called simages) that are on the BASE installation CDs. We created a base 433 lpp_source, multiple lpp_sources containing different maintenance levels, and separate lpp_sources for our 32- bit and 64-bit third-party application software.

Upload: muhammad-adeel

Post on 02-Jun-2015

166 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: Nim

AIX Network Install Manager

When we replaced our old hardware platform with IBM AIX RS/6000 systems, a main concern was controlling how our new systems would be installed. With the old platform, we ran into several instances where the software (moving from our development group to QA and into production) was not the same, which caused numerous build breaks. We chose the AIX Network Installation Management (NIM) setup, because we needed to ensure consistent, standard OS installations between systems within our four separate data centers. Our company also has a security rule that doesn't allow any one machine access to all networks within our organization. Our four separate data centers have four separate networks with no connection between them, and each network is segmented into either inside or outside the firewall.

NIM Resources

NIM allows you to customize installations and maintain clients on the network from a centralized location (the NIM master) or the NIM client itself. The master contains the NIM database and can serve resources. Resources in NIM are files or directories containing data that NIM will use to install, customize, and maintain NIM clients. A NIM client is any machine configured and defined in the NIM database. Some key NIM resources used in our setup are:

Licensed Program Product Source Directory (lpp_source): This directory contains backup file format (BFF) images, which AIX installp uses to load software. One way to understand the role of the lpp_source directory in a BOS installation is to compare it to all the installation images needed to support any configuration (specifically different device configurations) along with a base core set of software (called simages) that are on the BASE installation CDs. We created a base 433 lpp_source, multiple lpp_sources containing different maintenance levels, and separate lpp_sources for our 32-bit and 64-bit third-party application software.

Shared Product Object Tree (SPOT): This directory is created from an lpp_source and is equivalent in content to a /usr file-system on AIX. The purpose of a SPOT in a NIM installation is similar to the boot images and BOS installation scripts (bi_main, rc.boot, and rc.bosinst) on volume 1 of the BASE install CD. The SPOT must contain support for all boot environments (platform, network type, kernel type). We created several different SPOTs for the different data centers and maintenance levels we use to support our systems.

bosinst_data: This data file contains information that drives the BOS install (e.g., prompt vs. no-prompt, which disk to install the OS on, and the type of installation (Overwrite, Preservation, or Migration) to name a few). First, we created separate bosinst_data resources for each machine type (S80, H70, B50, M80, P680, and 43P). Then, by specifying two disks to target in our bosinst_data resource and specifying copies in the image_data resource, we could set up mirroring during the initial load.

Page 2: Nim

image_data: This data file contains information about the characteristics of the OS being installed. For example, it includes the size of file systems, whether or not to mirror, and whether or not to disk stripe. We created separate image_data resources for each machine type (S80, H70, B50, M80, P680 and 43P).

Script: This is a customization file the systems administrator can create, which executes near the end of the BOS installation. You can execute multiple NIM script resources during a BOS installation. If you need to control the order of execution, I recommend putting it all in one large script. We created one NIM script to set up the OS environment and hardware parameters, configure certain system files, set up security, install third-party software, create and set up dump devices, customize paging space to correspond to the system RAM, and help create a complete inventory by machine type and serial number. I've included a copy of this script at the end of this article (Listing 1). All listings for this article are available from the Sys Admin Web site: http://www.sysadminmag.com/code/

Installp_bundles: This data file contains a customized list of additional software to install after the base AIX software is loaded. If you have different configurations that you need to duplicate on a repeatable basis, this resource is very useful. In our environment, we have different OS software requirements for development, QA, and production above the minimal AIX software needed to support different hardware systems. The easiest way to facilitate and maintain these different requirements, which need to be consistent, is to use installp_bundles.

mksysb: This is a backup archive file that contains a system image of rootvg. Because of our network security restrictions (no one machine could be connected to all the networks within our organization), we used mksysb and savevg tapes to replicate the NIM master to the other data centers. If we had one machine connected to the different data centers, we could have used NIM to replicate and update the NIM masters in the different data centers by BOS-installing a NIM mksysb resource and using a NIM script to restore the other volume group data.

mac_group: This is a logical grouping of machine types (standalone, diskless, or dataless) that enables the systems administrator to target one or more machines with a single command or NIM operation. We did not use this feature, but we could have taken advantage of this by grouping all like systems and like configurations to install to more than one machine at a time.

Page 3: Nim

NIM configuration under AIX5.2

Scenario: Setup NIM master server in AIX5.2 Setup NIM client for AIX5.1 installation.

Steps:

1. Install OS in NIM master server2. Install bos.sysmgt.nim fileset in NIM master for NIM operations3. Configure NIM master server. Load AIX5.1 image as part of configuring

NIM master.4. Configure NIM client in the NIM master server.5. Configure Remote IPL parameters in client6. Test connectivity from client to NIM server using SMS ping7. Boot the client system-using network by getting in to SMS mode8. Initiate the Push installation from the NIM master server

NIM configuration:

1. Installing AIX 5.2 OS in NIM master server.

2. Install bos.sysmgt.nim filesets, which is needed for NIM master.

3. Configure NM master server

Make sure to put AIX 5.1 1 of 6 CD in the CDROM drive in NIM master server

#Smitty nim_config_env

Page 4: Nim

Lpp_source name for AIX51 image

Page 5: Nim

Notice two new filesystems are created

/export/lpp_source – for lpp_sources /export/spot – meant for SPOT

hm2axpp91:/>df -kFilesystem 1024-blocks Free %Used Iused %Iused Mounted on/dev/hd4 65536 52120 21% 1432 5% //dev/hd2 1179648 448272 62% 20250 7% /usr/dev/hd9var 65536 56888 14% 463 3% /var/dev/hd3 2883584 1745988 40% 4687 1% /tmp/dev/hd1 65536 63404 4% 21 1% /home/proc - - - - - /proc/dev/hd10opt 131072 63504 52% 397 2% /opt/dev/usrapps 327680 220464 33% 1031 2% /usr/apps/dev/lv00 655360 35404 95% 227 1% /export/lpp_source/dev/lv01 393216 54884 87% 10949 12% /export/spot

4. Adding a standalone NIM client to the NIM master.

#smitty nim_mkmac

Page 6: Nim
Page 7: Nim

Make sure to create the network for 10.176.3.0

MAC of the client is not needed

Page 8: Nim

5.Configure Remote IPL in the client system

Boot the system in SMS mode. (If LPAR set it to boot in SMS mode.)

Page 9: Nim
Page 10: Nim

6. Test connectivity from client to NIM server using SMS ping

Perform PING from SMS menu to make sure client is able to communicate to NIM Server using the IP address information provided earlier in STEP 5.

Go to Remote IPL option and select do PING test.

Page 11: Nim
Page 12: Nim
Page 13: Nim

7. Boot the NIM client system using network from SMS mode as follows

Page 14: Nim
Page 15: Nim
Page 16: Nim
Page 17: Nim

While the above message appears at the client side

9. Initiate the push installation from the NIM master server

From MASTER run the following

#Smitty nim_bosinst

Select the client name created in step 4

Page 18: Nim

Select the install type

Select lpp_source name, which has aix5.1 image

Page 19: Nim

Leave rest in default

Installation starts automatically.

Page 20: Nim
Page 21: Nim

Additional NIM information:

1) If any clients connected in other network than master. Need to create networks for that client subnet.

#smitty nim_net

Page 22: Nim

2) To create a AIX5.1 image in lpp_source by name aix51

#smitty nim_mkres

Page 23: Nim

3) To dump the image CDROM to a HDD file.

#Smity bffcreate

Procee multiple volume – yes …to dump all OS cds to a single file.

4) To communicate NIM clients connected in different network than the NIM master ..need to create NIM default route for both the networks(NIM master network and NIM client network ).

#smitty nim_routing

Make sure to put the image in diff dir than lpp_source.

Page 24: Nim

5) To Install a spefic fileset from the master on the client

#Smitty nim_inst_all

Network1 is 10.176.3.0 network10.176.3.1 is default network for 10.176.3.0

Page 25: Nim
Page 26: Nim

6) To take mksysb using NIM

Configure NIM client at client side#smitty niminit

Page 27: Nim

#smitty nim_mkmac – to configure client in NIM master

Page 28: Nim

leave rest in default

#smitty nim_mkres

select “mksysb” type

Page 29: Nim

Leave rest in default

To restore mksysb backup to client:

To restore the mksysb for NIM client follow all the procedures to boot the NIM client from SMS mode ..

From the master

Page 30: Nim
Page 31: Nim
Page 32: Nim

Leave rest in default……

Mksysb restore on client requires SPOT .No SPOT gets created during mksysb.Hene we need to either create new SPOT use other SPOT of the same version of OS in MASTER

Page 33: Nim

Errors:

To view client status and information

hm2axpp91:/usr/lpp/bos.sysmgt/nim/methods>lsnim -l hm2axws51

hm2axws51: class = machines type = standalone locked = 25484 platform = chrp netboot_kernel = mp if1 = network1 hm2axws51 0 ent0 cable_type1 = bnc Cstate = BOS installation has been enabled prev_state = not running Mstate = in the process of booting boot = boot mksysb = hm2axws51mksysb nim_script = nim_script spot = aix51_spot cpuid = 0023F9DA4C00 control = master

Page 34: Nim

2) we got this error while initiating mksysb installation from NIM master to client hm2axws51

0042-135 nim: unable to perform the requested operation because "hm2axws51" is currently controlled by the machine "hm2axws51". It may be necessary to deallocate resources from the target before performing the intended operation.

hm2axpp91:/usr/lpp/bos.sysmgt/nim/methods>./m_chattr -a control=master hm2axws51

hm2axpp91:/>nim -o deallocate -a subclass=all hm2axws51

This resolve the above error