Showing posts with label NIM. Show all posts
Showing posts with label NIM. Show all posts

Monday, April 20, 2020

New lpp_source creation using the old lpp_source in aix?

New lpp_source creation using the old lpp_source in aix?


The below steps clearly explain, how to create a new lpp_source with the help of existing lpp_source.
Here, I am planning to create a lpp_source for AIX 71TL05SP02 using the old lpp_source AIX71 TL04SP05.


Download the AIX 7.1.5.2 patch files (*.bff) from aix fixcentral and keep it on our server.
===========================================================================================
cd /patching/aix7152    --> (Here we can keep the AIX 7.1.5.2 path files (.bff) format))
inutoc .
ls -l .toc

Create a separate filesytem for the lppsource
==============================================
mklv -y lpplv -t jfs2 migrationvg 120
crfs -v jfs2 -d lpplv -A yes -m /export/lpp_source/aix7152_lppsource -a logname=INLINE -a logsize=245
mount /export/lpp_source/aix7152_lppsource

 Copy all the files from the current lpp_source which is aix7145_lppsource to the new created FS
================================================================================================
cp -rp /export/lpp_source/aix7145_lppsource* /export/lpp_source/aix7152_lppsource
cd /export/lpp_source/aix7152_lppsource/installp/ppc
chown root:system *
chmod 644 *

Define the new lpp_source directory as an lpp_source resource
==============================================================
nim -o define -t lpp_source -a server=master -a location=/export/lpp_source/aix7152_lppsource aix7152_lppsource

 Upgrade the lpp_source using the patch directory as a source of patches
=======================================================================
nim -o update -a packages=all -a source=/patching/aix7152 aix7152_lppsource
cd /export/lpp_source/aix7152_lppsource/installp/ppc
chown root:system *
chmod 644 *

 Remove the duplicate software and any superseded updates from new lpp_source
=============================================================================
nim -o lppmgr -a lppmgr_flgs="-bu -x -r -e" aix7152_lppsource
lsnim -l aix7152_lppsource  (** check the "Rstate" equals "Ready for use" and "simages" equals "yes"**)


**NOW UPGRADE THE SERVER USING THE NEWLY CREATED LPP_SOURCE and MAKE SURE ALL THE FILESETS ARE IN CONSISTENT STATE**


 Create SPOT from LPP_SOURCE
===========================
 Define spot
============
nim -o define -t spot -a server=master -a locatioin=/export/spot --a source=aix7152_lppsource aix7152_spot
lsnim -l aix7152_spot

Check if bos.alt_disk_install.rte is in spot
===========================================
nim -o showres aix7152_spot|grep -i bos.alt_disk_install.rte

Execute only if bos.alt_disk_install.rte not in spot
=====================================================
nim -o cust -a lpp_source=aix7152_lppsource -a filesets=bos.alt_disk_install.rte aix7152_spot

Check bos.alt_disk_install.rte installed now in spot
=====================================================
nim -o showres aix7152_spot|grep -i bos.alt_disk_install.rte



Saturday, March 16, 2019

How to migrate a aix server from AIX 6.1 to 7.1 easily?

How to migrate a aix server from AIX 6.1 to 7.1 easily?




There are different ways to migrate your system from one AIX version to another AIX version:


Migration by using NIM / CD-DVD / mksysb / alternate disk migration.


Sometimes you will be in a position to migrate a NIM master from AIX 6.1 to AIX 7.1.
It is difficult to migrate a nim server using another nim server as you facing some difficulties. 


Sometimes your server sitting in beyond the firewall (DMZ) area, you could not able to enable rsh/ssh/ping to the server from outside, at that time the above method will help you to migrate it easily.


The below steps are really really easy to perform the aix migration from AIX 6.1 to AIX 7.1 which does not required much requirements to meet.


Take a mksysb of the target server
server1# mksysb -ieX /backup/server1_aix61.mksysb



SCP the mksysb over to your NIM master and define it as a NIM mksysb resource
server1# scp /backup/server1_aix61.mksysb root@nimserver:/backupfs/.



Make sure you got the lpp_source and SPOT from the base AIX ISO images at the level you want to upgrade the system to. If not please create it.

nimserver# lsnim -l aix71_TL05_SP02_spot
nimserver# lsnim -l aix71_TL05_SP02_lppsource



Create the mksysb resource using the mksysb taken on the lpar mksysb

nimserver# nim -o define -t 'mksysb' -a server=master -a location=/backupfs/server1_aix61.mksysb server1_AIX61_mksysb



Use the 'nimadm' command to migrate the existing mksysb to a new + upgraded mksysb image with the following command

nimadm -s <spot> -l <lpp_source> -j <volume group for cache> -Y -T <old_mksysb_resource> -O <new mksysb resource file pathname> -N <new_mksysb_resource>

nimserver# nimadm -s aix71_TL05_SP02_spot -l aix71_TL05_SP02_lppsource -j nimadmvg -Y -T server1_AIX61_mksysb -O /backupfs/server1_7.1_mksysb -N server1_AIX71_mksysb




once that completes you would take the new mksysb file that was created and upgraded and scp it back to the lpar it was taken from

server1# scp /backupfs/server1_7.1_mksysb root@server1:/backup/



Install the "bos.alt_disk_install.rte" and "bos.alt_disk_install.boot_images" fileset to that system at the same TL/SP level as the level you upgraded that mksysb to

server1# mount nimserver:/aix71_TL05_SP02_lppsource  /mnt    -> where we hold the AIX 7.1 package

server1# smitty installp  -> install the "bos.alt_disk_install.rte" and "bos.alt_disk_install.boot_images"
(or)
          server1# installp -acgXYd .  bos.alt_disk_install.rte bos.alt_disk_install.boot_images

server1# alt_disk_mksysb -m -k  /backup/server1_7.1_mksysb -d hdisk2

Note: -k specifies that mksysb devices be kept (formally the ALT_KEEP_MDEV variables) This option is to having the customized network related settings to be cloned with mksysb from the old image to new image. 

If you are not using the "-k" option, there might be the chance to losing your network connectivity after the reboot.
           


Boot up from the upgraded disk

Server1# bootlist -m normal -o hdisk2


For the first reboot, it will take long time to reboot as the server booted from the pugraded OS. Please patience.  Once the server rebooted, please check the OS version and other post checks.

Server1# oslevel -s; lppchk -vm3; instfix -i|egrep -i 'tl|sp'; oslevel -rl7100-05

Server1# oslevel -s
7100.05.02.1134



see your server successfully migrated to AIX 7.1








Saturday, May 20, 2017

NIM server and client configuration in AIX?

NIM server and client configuration in AIX?



NIM SERVER PRE-REQUISITE
========================

The below filesets required to setup NIM server and Client. We could check using      

#lslpp –l |grep nim.

bos.sysmgt.nim.master
bos.sysmgt.nim.spot


NIM SERVER INSTALLATION
========================

We could install using below commands

installp -agXd /mnt/nimpkg/bos.sysmgt.nim.master
installp -agXd /mnt/nimpkg/bos.sysmgt.nim.spot


lslpp -l |grep nim - To display the nim.spot and nim.master file sets
ls -l /etc/niminfo  -> The /etc/niminfo file created as part of the installation

The above installation creates the /etc/niminfo  file and the below deamons.

nimd and nimesis – daemon will get started, if it is not started, restart the inetd
startsrc –g inetd
startsrc –s nimd
startsrc -s nimesis


LPP_SOURCE

Lpp_source: This is having the content of aix in the CD for the aix installation

cd /export/install/nim/lpp_source
mkdir 6101LPP

smitty nim -> Perform NIM Adinistration Task -> Manage Resources -> Define a Resource
select lpp_source as resource type and enter

Fill it up the below mandatory field.
resource name                [61TL07]
resource type                 lpp_source
server of resource [master]
location of resource       [/export/install/nim/lpp_source/6101LPP]
source of install images [/cdrom]
Press enter, lpp_source will be created.

Commands to check
lsnim –l  <LPP_SOURCE NAME> detailed view
lsnim –c <lpp_name>

SPOT


Spot: This is used for aix installation which is created for each lpp_source

smitty nim ->  Perform NIM Adinistration Task ->  Manage Resources ->  Define a Resource
select spot as a resource type and enter

resource name                [spot_61TL07]
resource type                 spot
server of resource [master]
source of install images [61TL07_lpp]
location of resource       [/export/install/nim/spot]

Commands to check:
lsnim –l  <SPOTR NAME> detailed view
lsnim –c <sopt_name>


NIM CLIENT CONFIGURATION
==========================
 Nim master's /etc/hosts client IP and HOSTNAME and obviously client server supppose to be in DNS.

For NIM Client:
Required fileset: bos.sysmgt.nim.client   (This fileset present on aix server defaultly)

smitty nim_mkmac
Enter the machine name and press enter to continue
Select the type of network as "ent = ethernet network" and enter

* NIM Machine Name [abc_testlpar]
* Machine Type [standalone]
* Hardware Platform Type [chrp] Make sure this is set to ‘chrp’
Kernel to use for Network Boot [mp]
* Cable Type bnc/tp
* NIM Network master_net/enX
* Host Name abc_testlpar
 Press enter to continue

Commands to check
lsnim|grep -i abc_testlpar
lsnim -l abc_testlpar

Tuesday, January 19, 2016

How to deal with NIM concepts and interview questions?

How to deal with NIM concepts and interview questions?



Filesets Required

   bos.sysmgt.nim.master
   bos.sysmgt.nim.spot

nimd and nimesis – daemon will get started. Else restart the inetd / start the above daemons 
startsrc –g inetd
startsrc –s nimd/ nimesis


Daemons Required:

a) bootp protocol (BOOTPD)
   This is the initial communication made between NIM master and client during network boot.

b) Trivial File Transfer Protocol (TFTPD)
  It is used to transfer lppsource,SPOT and other resources from NIM server to NIM client during the NIM client booting.


Check the services are running,

#lssrc -ls inetd
bootps    /usr/sbin/bootpd   bootpd /etc/bootptab     active
tftp         /usr/sbin/tftpd        tftpd -n                    active

#grep bootps /etc/services
bootps                  67/tcp          # Bootstrap Protocol Server
bootps                  67/udp        # Bootstrap Protocol Server

#grep tftp /etc/services
tftp                    69/udp          # Trivial File Transfer
tftp                    69/tcp          # Trivial File Transfer

If the above services are not enabled, start the same.

#chubserver -v bootp -p udp -a
#chubserver -v tftpd  -p udp -a
#refresh -s inetd
#startsrc -g nfs  (Also, ensure NFS group related services are  also enabled.)



Important Directories and Files

a) /tftpboot

     When we create SPOT, kernel is copied into /tftpboot directory . All kernles of NIM clients are in the direcotry
root@aixnim1: /etc # ls -l /tftpboot
lrwxrwxrwx    1 root     system           34 Dec 19 18:36 aix21.domain.com -> /tftpboot/spot_5200-08.chrp.mp.ent
-rw-r--r--    1 root     system         1276 Dec 19 18:36 aix21.domain.com.info
-rw-r--r--    1 root     system      9379964 Dec  8 15:31 spot_5200-08.chrp.64.ent
-rw-r--r--    1 root     system      9260943 Dec  8 15:31 spot_5200-08.chrp.mp.ent


b) /etc/bootptab

      File which authenticate nim client for remote boot up for nim operations like bos installation, restoration & maintenance boot. Based on the NIM operation, nim client info update and once the NIM operation completed, entry also removed automatically from this file.
      In simple words, authenticates NIM client for remote boot up.

#tail /etc/bootptab
aix21.domain.com:bf=/tftpboot/aix21.domain.com:ip=10.200.50.56:ht=ethernet:sa=50.20.100.48:gw=10.200.50.1:sm=255.255.255.0:
The fields are separated with colon (:) and attributes are separated with equal sign (=):
    first field  - NIM client name
           bf       - boot file name
           ip       - NIM client IP address
           ht       - hardware type
          sa       - TFTP server address for the boot file
          gw      - gateway used by client to reach the server
          sm      - subnet mask for the nim client


c) /etc/niminfo

       The file always exists on the NIM master and client. contains information about who is master and client, port no, protocol informations.

        This is automatically generated when master was created and client was registered to master. This file was not manually edited. If any corrupted, want to be removed and recreated.



How to define the client:     #smitty nim_mkmac

How to define the resource:   #smitty nim_mkres

How to initiate the installation:   #smitty nim_bosinst

How to Rebuild on Master:     #nimconfig -r

How to Rebuild on Client:   #nimint -a master=<MASTER_HOSTNAME> -a name=CLIENT_NIM_NAME>



 if you happy with the above content, please leave your reactions/comments below.

Wednesday, April 8, 2015

How to boot the server into maintenance mode using NIM?

How to boot the server into maintenance mode using NIM?


 If we want to boot a server into maintenance mode without the installation media, then we can achieve this by the NIM server using SPOT. Please find the steps below.

Note: The spot which is used to boot your target server to maintenance mode needs to be the same version and the same TL of the target server  

Login to the NIM master and perform the below steps:

The below steps is for allocated the boot image to the network for the client system to find and boot.
 smitty nim_mac_op
          select client
                   maint_boot = enable a machine to boot in maintenance mode
                             Select SPOT
                                      Enable maintenance boot (Select values in entry fields)
 Press enter and confirm the smit gives OK prompt.

Now boot the client (target) system in SMS mode so that we can select the network adapter that the client system will get the boot image from the network.
          Reboot your Client and Get into SMS mode. 
          press 1 to get into the SMS menu,
   In the SMS menu the first screen we get is the one given below.
ü Utilities
ü Remote Initial Program Load Setup --> (we need to select the correct adapter to set RIPL IP parameters)

ü Enter IP parameters
ü Specify the Client IP
( IP of the client server), Server IP ( IP of the NIM Server ), Check if the subnet mask is correct and Specify the gateway. 
ü Come back to the Main menu, by pressing X
ü Select the boot option
ü Select install/Boot Device, and select the Network card
ü We need to select the ethernet adapter to boot from
(Once you select the adapter you are going to boot from, you will be asked what type of boot you would like to perform.)
ü Select"Normal mode boot"
ü Exit from SMS menu by pressing X,

(Now The system will issue the bootp request to the master and begin the network boot and allow you to access maintenance mode)

Once booted from Nim spot, accessing rootvg to perform maintenance.

  ü On the maintenance mode, select option 1 for Access a root volume group
  ü Select the volume group
  ü Access this volume group and select a shell
you will see the prompt #. 
(now you can go with your maintenance activity)


Tuesday, March 31, 2015

How to perform the mksysb restore from nim?

How to perform the mksysb restore from nim?

Pre-check:

Ø Get the latest mksysb image of your client onto the NIM server.
Ø Ensure you have the location details of the root disk; disk onto which you have to restore mksysb. Select the correct root disk, donot select the data disk, this shall destroy the data on the data disk.
Ø Confirm the client is defined, if not define the client 


Installation Instructions:

1.Define your client in the NIM Master   -> #smitty nim_mkmac

2. Get the mksysb image of your client to the NIM Master

3. Creation of Resource using the Mksysb of your Client   --> #Smitty nim_mkres

4. Smitty nim_task_inst.-->   Install the Base Operating System on Standalone Clients

5. Select your client

6. Choose the Mksysb as Installation type

7. Choose the resource which is created by your mksysb image

8. Choose the Spot which is higher than your Client

9. Change "Initiate reboot and installation now?" to "no"

10. The following steps are optional if the hardware is similar . The steps are required if new hardware drivers will be needed. If you aren't sure, do the steps.

                 a. choose the 61TL01_lpp_source
                 b. set "ACCEPT new license agreements" to "yes"
                 c. set "ACCEPT new license agreements" in the "installp Flags" section to "yes"

11. Reboot your Client and Get into SMS mode, start your restoration

12. Press 1 to get into the SMS menu,

13.In the SMS menu the first screen , we have 3 options

14.Select the option 3, Utilities,

15.Select option “Remote Initial Program Load Setup” , 

16.Enter the IP parameters,

17.Specify the Client IP ( IP of the server on which the mksysb image will be restored ), Server IP ( IP of the NIM Server ), Check if the subnet mask is correct. Specify, gateway if needed. Perform a ping test

18. Come back to the menu, by pressing X,

19. Select the option Multiboot,

20. Select Boot Device, and select the Ethernet card

             Exit from SMS menu by pressing X, the server (a.k.a NIM client) would try to connect to the NIM server, once the packet count starts it means that the NIM client is connected and receiving the packets from the NIM master.

We get the boot screen now, Press 1

Accept the language as English, Press 1 now,

Select 0,

You may change the settings by selecting the right number,

Once selected it comes back to the main menu,

The installation would start now


This progress can also be monitored on the NIM Master,  lsnim –l <  clinet hostname>
Once done, the system should reboot automatically



Verification / Post-check:
Ø Make sure the server is accessible from the network (ssh and telnet should work)
Ø All the Volume groups should be varied On
Ø Confirm all the file systems are mounted
Ø Check all the logins are working fine
Ø Make sure all the required services are running
Ø Get the confirmation from the application team that everything working fine.



Backout:
There is no backout for ‘mksysb restore’; it is itself a backout. Perhaps the mksysb restore of the previous image could be a backout in this case.