13
NIM Setup Nutshell 19-April-2006 Check for Updates Doug Ranz; [email protected] NIM Absolutes: The NIM Master must always be at the highest AIX & TL (formerly MLs) of any of its clients. Do not use dots or special characters in any of the NIM panels (aside from the IPaddr fields). Hostname resolution between the NIM Master and NIM Clients must be reliable and must resolve short names and long names in both directions. The vast majority of NIM “problems” are TCP/NIS/DNS/routing configuration problems. If you’re having problems; please, verify your network config. MKSYSB backs-up only rootvg. This may be a good-thing or a bad-thing depending upon your planning and expectations. To fold non-rootVGs into a mksysb, checkout the command “savevg”. Prepare the NIM Master server: Install the NIM server with AIX V5.3 OS and whatever LPPs are desired. Install the optional NIM software bundles: bos.net.tcp.server bos.net.nfs.server bos.sysmgt.nim.master bos.sysmgt.nim.spot Install latest AIX maintenance (I used TL4 & SP1) Edit: /etc/netsvc.conf (append to the end of the file) hosts=local,bind Edit: /etc/environment (append to the end of the file) YPBIND_MAXWAIT=30 Edit: /etc/hosts (NIM must be able to resolve the hostnames of the NIM Master & Clients.) 192.168.1.100 aix53.comcast.net aix53 # NIM Master 192.168.1.200 target.comcast.net target # NIM Client Configure TCP/IP tunables: # no –p –o rfc1323=1 # no –p –o tcp_recvspace=65536 # no –p –o tcp_sendspace=65536 # no –p –o ipignoreredirects=1 # no –p –o tcp_pmtu_discover=0 # no –p –o udp_pmtu_discover=0

NIM_nutshell

Embed Size (px)

Citation preview

Page 1: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

NIM Absolutes:

The NIM Master must always be at the highest AIX & TL (formerly MLs) of any of its clients.

Do not use dots or special characters in any of the NIM panels (aside from

the IPaddr fields).

Hostname resolution between the NIM Master and NIM Clients must be reliable and must resolve short names and long names in both directions. The vast majority of NIM “problems” are TCP/NIS/DNS/routing configuration problems. If you’re having problems; please, verify your network config.

MKSYSB backs-up only rootvg. This may be a good-thing or a bad-thing

depending upon your planning and expectations. To fold non-rootVGs into a mksysb, checkout the command “savevg”.

Prepare the NIM Master server:

Install the NIM server with AIX V5.3 OS and whatever LPPs are desired. Install the optional NIM software bundles: bos.net.tcp.server bos.net.nfs.server bos.sysmgt.nim.master bos.sysmgt.nim.spot Install latest AIX maintenance (I used TL4 & SP1) Edit: /etc/netsvc.conf (append to the end of the file) hosts=local,bind Edit: /etc/environment (append to the end of the file) YPBIND_MAXWAIT=30

Edit: /etc/hosts (NIM must be able to resolve the hostnames of the NIM Master & Clients.)

192.168.1.100 aix53.comcast.net aix53 # NIM Master 192.168.1.200 target.comcast.net target # NIM Client Configure TCP/IP tunables:

# no –p –o rfc1323=1 # no –p –o tcp_recvspace=65536 # no –p –o tcp_sendspace=65536 # no –p –o ipignoreredirects=1 # no –p –o tcp_pmtu_discover=0 # no –p –o udp_pmtu_discover=0

Page 2: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Configure the file/filesystem limits:

# ulimit –a < --- display current limits # ulimit -f unlimited < --- set max filesize to unlimited # ulimit -d unlimited < --- set max data area to unlimited

Create (JFS2) Filesystems for NIM Resources:

# smitty fs (creating new VG is for NIM is encouraged)

> Add / Change / Show / Delete File System

> Add an Enhanced JFS /export/aix53ml4sp1 /export/mksysb /export/res Hints: The lppsource directory(s) will be ~5GB for each set of AIX BOS installp images. Each SPOT (created from the installp images in

the lppsource directory) will be ~600MB. Each mksysb image will be ~1.5GB

# mount /export/aix53ml4sp1 # cd /export/aix53ml4sp1 # mkdir lppsource # mkdir spot

# mount /export/mksysb # mount /export/res

NIM Master – Initial Configuration : # smitty nim

> Configure the NIM Environment > Advanced Configuration > Initialize NIM Master Only Network Name [install_network] Hint: No dots or special chars in the network name Primary Network Install Interface [en0] Allow Machines to Register Themselves as Clients? [yes] Alternate port Numbers for Network Communications (reserved values will be used if left blank) Client Registration [] Client Communications []

Page 3: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Making the LPPSOURCE: # smitty bffcreate

INPUT device / directory for software [/dev/cd0] SOFTWARE packages to copy [all] DIRECTORY for storing software packages [/export/aix53ml4sp1/lppsource] DIRECTORY for temp storage during copy [/tmp] EXTEND file systems if space needed? [yes] Process multiple volumes? [yes]

If you have copied [all] the software packages, you probably have many items that you do not need. If so, now is the time to delete the unwanted images. # cd /export/aix53ml4sp1/lppsource/installp/ppc # rm *OpenGL* # rm *PEX* etc … other good candidates are many of the foreign language filesets. # inutoc .

# smitty nim

> Configure the NIM Environment > Advanced Configuration > Create Basic Installation Resources > Create a New LPP_SOURCE Only

Resource SERVER [master] Input device for installation images [] (specify the device on the resource server) LPP_SOURCE Name [lppsource_aix53ml4sp1] LPP_SOURCE Directory [/export/aix53ml4sp1/lppsource] Architecture of Resource [] Create new filesystem for LPP_SOURCE? [no] Filesystem SIZE (MB) [] (if populated, blank this field) VOLUME GROUP for new filesystem [] (if populated, blank this field) Remove all newly added NIM definitions [no] And filesystems if any part of this Operation fails?

Page 4: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Create a SPOT: (Used by the NIM Client to do a network boot) # smitty nim

> Configure the NIM Environment > Advanced Configuration > Create Basic Installation Resources > Create a New SPOT Only

Resource SERVER [master] Input device for installation images [lppsource_aix53ml4sp1]

Hint: Use PF4 to list & pick (specify the device on the resource server) SPOT Name [spot_aix53ml4sp1] SPOT Directory [/export/aix53ml4sp1] Create new filesystem for SPOT? [no] Filesystem SIZE (MB) [] (if populated, blank this field) VOLUME GROUP for new filesystem [] (if populated, blank this field) Remove all newly added NIM definitions [no] And filesystems if any part of this operation fails?

Page 5: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Create A MKSYSB Image Of The System To Be Cloned: For new installations, I clone the NIM Master Itself. While this may seem odd, it saves me the time of having to build a gold client from CDs. This may (not?) be appropriate for you specific circumstances. If there are files and/or filesystems in rootvg that you do not want captured in the mksysb image; edit the file /etc/exclude.rootvg

For sites that are getting their first AIX system, I use the NIM Master itself to create the “gold” mksysb image. Of course; I don’t want all the clones to have all the NIM-stuff, so my /etc/exclude.rootvg file typically contains: # cat /etc/exclude.rootvg /export/mksysb /export/aix53ml4sp1 /export/res /smit.log /smit.script It is a good idea to clean-out the various logfiles before creating a mksysb: # errclear 0 # cd /var/adm/ras # >nim.script # >suma.log # >bootlog # >nimlog # >conslog # >nimsh.log # >bosinstlog # >devinst.log # >nim.installp Set autorestart to true & cpuguard to enable: # chdev –l sys0 –a autorestart=true –a cpuguard=enable

Page 6: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

# smitty nim

> Perform NIM Administration Tasks > Manage Resources

> Define a Resource <Scroll down> <Select> mksysb <Enter>

Resource Name: [gold_aix53ml4sp1] Resource Type: [mksysb] Server of Resource: [master] Location of Resource: [/export/mksysb/gold_aix53ml4sp1] Comments: [] Source for Replication -OR- System Backup Image Creation Options: CREATE system backup image? [yes] NIM CLIENT to backup [master] PREVIEW only? no

IGNORE space requirements? no EXPAND /tmp if needed? [yes] Create MAP files? no Backup extended attributes? yes Number of BLOCKS to write in [] Use local EXCLUDE file? [yes] (uses: /etc/exclude.rootvg)

-OR- EXCLUDE FILES resource []

This step is likely to fail (it’s okay) because there is not (yet) enough free space in the /export/mksysb filesystem. Really; it’s okay if it fails … because the error message will tell you the amount of space that is needed in /export/mksysb Simply open another window on the NIM Master and use smitty fs to expand the size of /export/mksysb. Once the filesystem is expanded, close this window. Return to the prior window (the one with the “Failed” message); press F3 to backup one panel … and press <Enter> to re-execute the panel.

Page 7: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

On the NIM Master: Defining the Client Systems (or LPARs) # smitty nim

> Perform NIM Administration Tasks > Manage Machines > Define a Machine NIM Machine Name [target] Machine Type [standalone] Hardware Platform Type [chrp] Kernel to use for Network Boot [mp] Primary Network Install Interface Cable Type [tp] NIM Network [install_network]

Host Name [target] Network Adapter Hardware Address [] (must specify IP params if

Master & client are on different subnets.)

Network Adapter Logical Device Name [ent0] IPL ROM Emulation Device [] CPU Id [] Machine Group [] Comments []

On the NIM Master: Prepare for Client Install You must unexport any of the NIM directory structure you have exported by hand # showmount -e # smitty nim_bosinst

> Select the correct NIM Client: > target and press <Enter> > Select the type of install: > mksysb and press <Enter> > Select the mksysb image to be installed on the client:

> gold_aix53ml4sp1 and press <Enter>

> Select the SPOT that the client will use to network-boot. > spot_aix53ml4sp1 (continued on next page)

Page 8: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Installation Target [target] Installation Type [mksysb] SPOT [spot_aix53ml4sp1] LPP_SOURCE [lppsource_aix53ml4sp1] MKSYSB [gold_aix53ml4sp1] BOSINST_DATA to use during installation [] IMAGE_DATA to use during installation [] RESOLV_CONF to use for network configuration [] Customization SCRIPT to run after installation [] Customization FB Script to run at first reboot []

ACCEPT new license agreements? [yes] Remain NIM client after install? [yes] PRESERVE NIM definitions for resources on [yes] This target?

FORCE PUSH the installation? [no] Initiate reboot and installation now? [no] Set bootlist for installation at the [no] next reboot? Additional BUNDLES to install [] -OR- Additional FILESETS to install []

(bundles will be ignored)

installp Flags COMMIT software updates? [yes] SAVE replaced files? [no] AUTOMATICALLY install requisite software? [yes]

EXTEND filesystems if space needed? [yes] OVERWITE same or newer versions? [no] VERIFY install and check file sizes? [no] ACCEPT new license agreements? [yes] (AIX V5 & higher machines & resources)

Preview new LICENSE agreements? [no] Group controls (only valid for group targets): Number of concurrent operations []

Time limit (hours) [] Schedule a Job [no] YEAR [] MONTH [] DAY (1-31) [] HOUR (0-59) []

Page 9: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Check the Status of the NIM Master and NIM Client # lsnim -l target target: class = machines type = standalone connect = shell platform = chrp netboot_kernel = mp if1 = install_network target 0 cable_type1 = tp Cstate = BOS installation has been enabled prev_state = ready for a NIM operation Mstate = not running Boot = boot lpp_source = lppsource_aix53ml4sp1 mksysb = gold_aix53ml4sp1 nim_script = nim_script spot = spot_aix53ml4sp1 control = master # lsnim -l lppsource_aix53ml4sp1 lppsource_aix53ml4sp1: class = resources type = lpp_source arch = power Rstate = ready for use prev_state = unavailable for use location = /export/aix53ml4sp1/lppsource simages = yes alloc_count = 1 server = master If you have a system enabled for installation and need to back out: # nim –o reset –aforce=yes NIMClientHostName # nim –Fo deallocate –asubclass=all NIMClientHostName # nim –o change –a cupid=”” NIMClientHostName

Page 10: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

On the NIM Client: Network Boot Start the system (or LPAR) to boot to the SMS prompt. Select: Setup Remote IPL (Initial Program Load) Select: The installation network interface Select: Enter the IP Parameters Configure the NIM server & NIM client IPaddrs. Select: Adapter Configuration

Configure the adapter to be used for installation. I have a bias against auto-negotiation and prefer to explicitly define my link-layer config. Others have reported difficulty when using 1000/Full. If it does not work for you; try 100/Full. It is typically okay to disable Spanning Tree unless you are installing across a complex WAN.

Select: Ping Test Select: Execute Ping Test (Hint: Notice the “1” towards the bottom of the screen).

You must successfully complete this step. Back-out <Esc> to the Main Menu Select: Boot Options Select: Install/Boot Device Select: Network Select: The network interface you will you to boot Select: Normal Boot Select: Yes; you are sure that you want to exit System Management Services You will see the (SMS) “IBM IBM IBM IBM” logo screen race by and the system will begin broadcasting BOOTP requests. The typical network boot/install kernel is ~12MB … Once the network boot/install kernel is running; proceed to answer the AIX installation dialogs as you would when performing a regular installation from CDs.

Page 11: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Push & Install Maintenance (.BFFs) From the NIM Master to NIM Clients Copy the PTFs from the CD into the lppsource directory: I’m assuming that I’ve got my fixes on a generic ISO9660 CD … # mount –v cdrfs –oro /dev/cd0 /mnt # cd /export/aix53ml4sp1/lppsource/installp/ppc # cp /mnt/*.bff . # inutoc . Remember! The NIM Master must be at the highest AIX PTF level of all the clients;

therefore, we must first update our NIM Master. # smitty install

> Install and Update Software > Update Installed Software to Latest Level (Update All) INPUT device / directory for software [.] I assume that you know how-to apply PTFs to AIX …

# smitty nim

> Perform NIM Software Installation and Maintenance Tasks > Install and Update Software > Update Installed Software to Latest Level (Update All) Select: The client that you wish to update and press <Enter> Select: The LPPSOURCE to be updated: lppsource_aix53ml4sp1

and press <Enter> Change: ACCEPT new license agreements? [yes]

# smitty nim

> Perform NIM Software Installation and Maintenance Tasks > Install and Update Software > Update Installed Software to Latest Level (Update All) Select: The client that you wish to update and press <Enter> Select: The SPOT to be updated: spot_aix53ml4sp1

and press <Enter>

Select: The LPPSOURCE that contains the install images: lppsource_aix53ml4sp1 and press <Enter>

Change: ACCEPT new license agreements? [yes]

Page 12: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Pulling a mksysb to the NIM Master from a NIM Client It is very wise to re-create the mksysb of the client (that is storerd on the NIM Master). Otherwise; if you ever need to re-install the client, you won’t have a mksysb of the client. # smitty nim

> Perform NIM Administration Tasks > Manage Resources > Define a Resource Select: mksysb and press <Enter> Resource Name [mksysb_of_target] Resource Type [mksysb] Server of Resource [master] (use PF4) Location of Resource [/export/mksysb/mksysb_target_033106] Comments [] Source for Replication [] -OR- System Backup Image Creation Options: CREATE system backup image: [yes] (use PF4) NIM CLIENT to backup [target] (use PF4) PREVIEW only? [no] IGNORE space requirements? [no] EXPAND /tmp if needed? [yes] Create MAP files? [no] Number of BLOCKS to write in a single output [] (leave blank to use system default) Use local EXCLUDE file? [yes] (specify no to include all fiels in backup) -OR- EXCLUDE_FILES resource [] (leave blank to include all files in backup)

This step is likely to fail (it’s okay) because there may not (yet) be enough free space in the /export/mksysb filesystem. Really; it’s okay if it fails … because the error message will tell you the amount of space that is needed in /export/mksysb Simply open another window on the NIM Master and use smitty fs to expand the size of /export/mksysb. Once the filesystem is expanded, close this window. Return to the prior window (the one with the “Failed” message); press F3 to backup one panel … and press <Enter> to re-execute the panel.

Page 13: NIM_nutshell

NIM Setup Nutshell 19-April-2006

Check for Updates

Doug Ranz; [email protected]

Debugging BOOTP Problems on the NIM Master:

bootp should be running: lssrc –t bootps (at the moment, I seldom find that ps will show bootp although it is indeed running. If so … try:

netstat –Aan | grep 67 (returns the socket of bootp; in my case fl0006000018e600)

Get the PID of the process running on a socket: rmsock fl0006000018e600 inpcb

If you want to start bootp in debug mode: /usr/sbin/bootpd –d –d –d –d –s

tftp should be running: lssrc –t tftp

dhcp should not be running: ps aux | grep –i dhcp