Monday, September 25, 2023

Migrating HACMP to PowerHA 6.1 in aix?

Migrating HACMP to PowerHA 6.1 in aix?


Migrating HACMP version 5.4 or lower to PowerHA 6.1 using Snapshot

GROUND WORK:

#lslpp -l|grep -i cluster.es     --> To check the current version of the cluster
#./clRGinfo                            --> Check if the RG is online status.
#lssrc -ls clstrmgrES               --> check if the cluster manager is stable on both nodes


TAKE SNAPSOFT OF THE CLUSTER CONFIG (Taking snapshot from one node is enough as it is similar on both the nodes)

#smitty hacmp ->
    Extended configuration
      snapshot configuration
            add a cluster snapshot
        Create a snapshot of the cluster configuration  (Mandatory -snap name and description)
output: .info and .odm file created under /usr/es/sbin/cluster/snapshots directory (Required this for restoration, so keep it in a safe location like your home directory)


STOP THE CLUSTER SERVICES ON BOTH THE NODES.

#lssrc -ls clstrmgrES                    --> check if the cluster manager is st_stable on both nodes
#smitty hacmp
     system management (c-spoc)
         manage hacmp services
             stop cluster services  (now, select node/nodes and bring resource groups offline)

#lssrc -ls clstrmgrES                    --> Now the cluster manager demon should be ST_INIT


REMOVE THE HACMP 5.4 VERSION WHICH IS CURRENTLY INSTALLED

#smitty remove
Sofware name:   (use F7 and select the all the cluster filesets)
Remove only: No; Detailed output: Yes 
Enter to accept the warning and the cluster filesets will be removed in few minutes.
You will Ok prompt.

#lslpp –l|grep –I cluster.es  (Make sure the cluster filesets has been removed)
Note: you have to  remove the cluster filesets on all the nodes.



INSTALL THE NEW POWERHA 6.1 VERSION

#cd <package_located directory>
#smitty install
Install software  (enter . )
Software to install  (use F7 to select the powerha filesets)
Preview only: No; Commit software update: No; Detailed output: Yes, Accept license: Yes
Enter to accept the warning and the new powerHA filesets will be installed in few minutes.
You will Ok prompt.

#lslpp –l|grep –I cluster.es  (Make sure the cluster filesets has been removed)
Note: you have to do the same powerHA filesets installation on all the nodes
 #lssrc –ls clstrmgrES  (Now the current state is “Not Configured” state)



 CONVERT THE SNAPSHOT WHICH WAS TAKEN ON THE CLUSTER 5.4 VERSION

We need to covert the snapshot to be compaitble with powerHA 6.1
Rememer that we have taken the snapshot of the cluster 5.4 under /usr/es/sbin/cluster/snapshots directory  ( .info and .odm file )

#/usr/es/sbin/cluster/conversion/clconvert_snapshot  -v  5.4 –s snapshot_5.4
v - <version of the HA in which the snapshot was taken> 
-s  <name of the snapshot>
Note: The .odm file will be updated.


THE SNAPSHOT NEEDS TO BE APPLIED.

# smitty hacmp
Extended Configuration
Snapshot Configuration
Restore the Cluster Configuration from a Snapshot
Select the snapshot which was converted on the previous step (i.e snapshot_5.4)
Cluster snapshotname: snapshot_5.4; un/configure cluster resource: Yes
Enter to accept the warning and the snapshot to be restored in few minutes.
You will Ok prompt.

After the snapshot restore on the primary node, We can see that the cluster configuration has been restored.  #cltopinfo



THE CLUSTER CONFIGURATION NEEDS TO BE SYNCED.

Remember that the sync has to be performed where you restore the snapshot.
#smitty hacmp
Extended Configuration
Extended Verification and Synchronization
Verify/sync or both: Both; Automatically correct errors: Interactively; Logging: Verbos.
Enter
Now we can able to see the cluster information on the secondary node
Use cltopinfo to get/confirm the details.


START THE CLUSTER

#smitty hacmp
System Management (C-SPOC)
HACMP Services
Start now: now; start services on nodes: mention nodes name; manage RGs: Auto;
startup cluster demon: True
Press enter

#clRGinfo  -> check RG is online
#lssrc -ls clstrmgrES     --> To check if the cluster manager is stable (ST_Stable)


How to remove the hard disk (pdisk) in aix?

How to remove the hard disk (pdisk) in aix?


The below steps are clearly explained how to remove the hard disk (pdisk) in aix.

Please follow the below steps to replace the hdisk (pdisk) with the following steps

$ oem_setup_env
smitty sasdam
=> Delete a SAS Disk Array
=> sissasO
=>hdisk4
Confirm that we want to delete the array, you should get a message stating something like
hdisk4 deleted
pdisk4 Defined
ESC÷O or F10 (this may change according to your keyboard) to exit smitty

# diag
=> enter
=> Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.)
= Hot Plug Task
=> SCSI and SCSI RAID Hot Plug Manager
> Replace/Remove a Device Attached to an SCSI Hot Swap Enclosure Device
=> Select the slot of pdisk4
=> enter

You should have a message like “Running rmdev on pdisk4” followed by the following
The LED should be in the Remove state for the selected device.
YOU may now remove or replace the device.
Use ‘Enter’ to indicate you are finished.

Now it’s time to remove the failed disk and to insert the new disk, then return to the previous session and bit enter as per the reported message
You will be back to the previous menu, but this rune instead of pdisk4 you will have [populated]
ESC+3 or F3 (this may change according to your keyboard) to return to the previous menu

=> Configure Adde/Replaced Devices
You’ll get a ‘processing data” and then it will return to menu
ESC+O or 110 to exit diag

Now we have to recreate the array
# smitty sasdam
=> Create a SAS Disk Array
=> sissasO
=> 0
=> 256 Kb (recommended)
> pdisk4
Confirm that we want to create the new array
ESC+O or 110 (this way change according to your keyboard) to exit smitty.

see, the disk is successfully replaced, Now you can go ahead for your further steps based on your setup.