Monday, November 10, 2014

Restore or Install AIX with a mksysb image using NIM

mksysb resource is a file containing the image of the root volume group (created with the AIXmksysb command) of a machine. It is used to restore a machine when it crashed, or to install it from scratch (also known as “cloning” a client). In a environment, we usually installed AIX on new LPARs or VIO clients from a existing mksysb rather than going for fresh AIX CD. Installing OS from existing mksysb help us to keep the customization same for all LPAR .

Assumptions:

1. The NIM client (In our example NIM Client is webmanual01) is defined on the NIM master (In our example nim01)
2. The client’s hostname and IP address are listed in the /etc/hosts file.
3. The mksysb image has been transferred or restored from TSM and resides in the NIM master nim01:/export/nim/mksysb.The size and sum command output match that from the source mksysb image.

Create a mksysb resource:

Run smit nim_mkres –> You should see a “Resource type” listing disppalyed –> Scroll through the menu list and select mksysb.
Hit enter and you will see menu below:


Define a Resource

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[TOP]                                            [Entry Fields]
* Resource Name                       [webmanual01mksysb]
* Resource Type                         mksysb
* Server of Resource                   [master]
* Location of Resource                 [/export/nim/mksysb/webmanual01.mksysb.0] 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
[MORE...10]

Prepare Bos install on client:

Run smit nim_tasks –> Select Install and Update Software and press enter–> Then select theInstall the Base Operating System on Standalone Clients –> Select the target definition ( ie the client which will be restored) –>Select the installation type–> select mksysb Select the mksysb resource webmanual01mksysb which you created in last step –> Select the SPOT for the restore / installation –

The entire bos_inst smit panel should now displayed
Install the Base Operating System on Standalone Clients

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[TOP]                                             [Entry Fields]
* Installation Target                    webmanul01
* Installation TYPE                       mksysb
* SPOT                                       spot61_TL06_SP3
LPP_SOURCE
MKSYSB                                   webmanual01mksysb

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?                   []
Remain NIM client after install?                       [yes]
PRESERVE NIM definitions for resources on
this target?                                     [yes]
FORCE PUSH the installation?                           [no]
Initiate reboot and installation now?         [no]
-OR-
Set bootlist for installation at the next reboot?    [no]
Additional BUNDLES to install                     []
-OR-
Additional FILESETS to install                   []
(bundles will be ignored)


On NIM nim01 server ,check for correct client setup and start:

a. Check the subserver bootps is active
#lssrc -t bootps
Service Command Description Status
bootps /usr/sbin/bootpd bootpd /etc/bootptab active

b. Check the subserver tftp is active
#lssrc -t tftp
Service Command Description Status
tftp /usr/sbin/tftpd tftpd -n active
c. Tail /etc/bootptab and should see the client network info listed per example below
webmanual01:bf=/tftpboot/testlpar:ip=10.190.120.90 :ht=ethernet:sa=10.190.120.120:sm=255.255.255.0: 
d. Showmount -e —–> should list 2 filesystems being NFS exported to the client ( webmanual01)
/export/nim/mksysb/webmanul01.mksysb.0 webmanual01
/export/nim/scripts/webmanual01.script webmanual01
Boot client webmanual01 into SMS mode using HMC and select the option 2
PowerPC Firmware
-------------------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
Select Ethernet Adapter as below screen . I will select 2 as I know it is configured
PowerPC Firmware
-------------------------------------------------------------------------------
NIC Adapters
Device Location Code Hardware
Address
1. Port 1 - IBM 2 PORT 10/100/100 U787B.001.WEBDEV-P1-C1-T1 001a6491a656
2. Port 2 - IBM 2 PORT 10/100/100 U787B.001.WEBDEV-P1-C1-T2 001a6491a657
Now select 1 for IP Parameters as follows
PowerPC Firmware
-------------------------------------------------------------------------------
Network Parameters
Port 2 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter : U787B.001.WEBDEV-P1-C1-
1. IP Parameters
2. Adapter Configuration
3. Ping Test
4. Advanced Setup: BOOTP
Now fill up the parameters as below
PowerPC Firmware
-------------------------------------------------------------------------------
IP Parameters
Port 2 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter : U787B.001.WEBDEV-P1-C1-
1. Client IP Address [10.190.120.17] 2. Server IP Address [10.190.120.24] 3. Gateway IP Address [10.120.112.1]
4. Subnet Mask [255.255.255.000]
Now go back previous menu and select Ping Test (option 3)
Make sure you get a ping success; else, the NIM will fail. If ping failure, check the address info entered; check if the adapter is correct and if the adapter is connected into the network. When ping test OK, proceed to next step:
Type menu item number and press Enter or select Navigation key:3
PowerPC Firmware
-------------------------------------------------------------------------------

Ping Test
Port 2 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter : U787B.001.WEBDEV-P1-C1
Speed, Duplex: auto,auto
Client IP Address: 10.190.120.17
Server IP Address: 10.190.120.24
Gateway IP Address: 10.190.112.1
Subnet Mask: 255.255.255.000
Protocol: Standard
Spanning Tree Enabled: 0
Connector Type:

1. Execute Ping Test
-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:1

.---------------------.
| Attempting Ping... |
`---------------------'

<strong>Lots of OutPut</strong>

.-----------------.
| Ping Success. |
`-----------------'


Go back to Main Menu and Select 5 for Select Boot Options
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
Now Select 1 Select Install/Boot Device and Select 6 for Network. Then Select Adapter # from previous step as option 2
Multiboot
1. Select Install/Boot Device
2. Configure Boot Device Order
3. Multiboot Startup
PowerPC Firmware
-------------------------------------------------------------------------------
Select Device Type
1. Diskette
2. Tape
3. CD/DVD
4. IDE
5. Hard Drive
6. Network
7. List all Devices

-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:6
PowerPC Firmware

-------------------------------------------------------------------------------
Select Device
Device Current Device
Number Position Name
1. - Ethernet
( loc=U787B.001.WEBDEV-P1-C1-T1 )
2. - Ethernet
( loc=U787B.001.WEBDEV-P1-C1-T2 )

Now select Normal Mode Boot and Select 1 to Exit System Management Services
PowerPC Firmware
-------------------------------------------------------------------------------
Select Task

Ethernet
( loc=U787B.001.WEBDEV-P1-C1-T2 )

1. Information
2. Normal Mode Boot
3. Service Mode Boot

-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:2

PowerPC Firmware

-------------------------------------------------------------------------------
Are you sure you want to exit System Management Services?
1. Yes
2. No
At this point, you should see the BOOTP packets increase until finally the system is able to load the minimal kernel, and start the NIM install, Once loaded, you reach the AIX install menu as below , from there I have select to restore the OS on hdisk0.
Type menu item number and press Enter or select Navigation key:

Welcome to Base Operating System Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

>>> 1 Start Install Now with Default Settings

2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

4 Configure Network Disks (iSCSI)

5 Select Storage Adapters
System Backup Installation and Settings

Either type 0 and press Enter to install with the current settings, or type the
number of the setting you want to change and press Enter.

Setting: Current Choice(s):

1 Disk(s) where you want to install ...... hdisk0
Use Maps............................. No
2 Shrink File Systems..................... No
3 Import User Volume Groups............... Yes
4 Recover Devices......................... Yes

>>> 0 Install with the settings listed above.

Now system will install here and after installation complete you need to do post customization steps as per your environment.--

No comments:

Post a Comment