SAP HANA and SUSE High Availability and Disaster Recovery Commands

SAP

Managing your HANA and Linux cluster is a essential when you are working on big projects and you need to handle it very carefully for any maintenance activity with near zero downtime.

Below are the useful commands which every person should keep handy with him to take care during their regular maintenance –

1. How to check HA Configuration?
crm configure show

2. Check HA Status?
crm status

3. Putting HA Node in Maintenace Mode?
crm mainteanance

4. Manually Starting Specific HA Node Resource?
crm resource start

5. How to clean up old configuration Files ?
crm resource cleanup

6. How to disable Maintenace Mode in HA?
crm configure property maintenance-mode=false

7.How to disable Stonith Service in cluster?
crm configure property stonith-enabled=false

8. How to Start Cluster in HA?
crm cluster start

9. How to Stop Cluster in HA?
crm cluster stop

10. How to Restart Cluster?
crm cluster restart

11. How to see cluster Status?
crm cluster status

12.Starting the cluster stack on one node?
systemctl start pacemaker

13.Stopping the cluster stack on one node?
systemctl stop corosync

14.Restarting the cluster stack on one node?
systemctl restart corosync

15. How to check the HA/DR Status
Hdbnsutil -sr_state

16. How to break replication between Primary and Secondary Node i.e HA Enviroment (With SIDADM User)
hdbnsutil -sr_unregister –id=abc

17. How to register and establish the HA Nodes ( With SIDADM User)
hdbnsutil -sr_register –name=msap –remoteHost=msap00081 –remoteInstance=00 –replicationMode=async –operationMode=logreplay

18. How to check HA Configuration Entries Log files?
cat /etc/default/grub | grep GRUB_CMLINE_LINUX_DEFAULT

19. How to restart kdumpstatus ?
servicekdump status

OTHER HA/DR STATUS COMMANDS:
===================================
20. How to check HA/DR Status with SIDADM User in details.
hdbcons -e hdbindexserver “replication info”

21. How to check the HA/DR Status with Python Script using SIDADM User
>> Give Command: cdpy>> It will directly map to python script directory
Python systemReplicationstatus.py

22: How to check HA/DR Status with root user?
cmviewcl

23. All HA/DR Configuration stores in this below location
/opt/cmcluster/run

24. How to Start Multi Node HANA DB?
sapcontrol -nr 00 -function StartSystem HDB 1000 500

25. How to check Multi Node HANA DB Services status?
ssapcontrol -nr 00 -function GetSystemInstanceList

26. How to check HANA Services Status of single node.
sapcontrol -nr 00 -function GetProcessList

27.How to Stop Multi Node HANA DB Instances?
sapcontrol -nr 20 -function StopSystem HDB

28.How to Start Multi Node HANA DB Instances?
sapcontrol -nr 20 -function StartSystem HDB

29. How to Check HANA Process on OS Level related to Indexserver?
ps -ef | grep indexserver

30. How to check HANA Process on OS Level related to HANA DB?
HDB proc or HDB info

Steps for enabling the cluster node into maintenance mode for performing any maintenance activity, such as OS upgrade or HANA DB Revision upgrade, etc.

1. Place node(s) into maintenance.
2. Disable STONITH
3. Stop pacemaker service on maintenance nodes.
4. Perform maintenance tasks
5. Start HANA and replication
6. Stop and restart pacemaker
7. Enable STONITH
8. Take node(s) out of maintenance mode

Step 1. Set cluster to maintenance mode:
crm configure property maintenance-mode=true

Step 2. Run “crm status” command to be sure cluster is fully in maintenance mode before continuing.

Step 3. Disable stonith in the cluster:
crm configure property stonith-enabled=false

Step 4. Make all the necessary changes.

Step 5. Enable stonith in the cluster:
crm configure property stonith-enabled=true

Step 6. Remove maintenance mode from cluster:
crm configure property maintenance-mode=false

will keep updated the commands…

Happy Learning !!!
Credits – Mohammed Azher Ul Haque

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.