We will change the existing cluster configuration to manage PRD HANA Database and newly added QAS HANA Database.
For changing cluster setup, stop all DB of sechana and prihana node.
Connect to sechana through Session Manager.
After log in AWS Management Console, connect to EC2 Instance Console
Select HANA-HDB-Secondary instance, click Action, and click Connect.
Select Session Manager and click Connect.
Stop QAS DB.
sudo su - qasadm
HDB stop
exit
sudo su - hdbadm
HDB stop
exit
Keep the connection of sechana, Connect to prihana through Session Manager.
sudo su - hdbadm
HDB stop
exit
After switching to root user in prihana node, change the PREFER_SITE_TAKEOVER option for PRD(HDB) DB resource in the cluster from true to false.
sudo su -
mkdir -p /hana/shared/script/
cd /hana/shared/script/
vi crm-SAPHana-update.txt
primitive rsc_SAPHana_HDB_HDB00 ocf:suse:SAPHana \
operations $id=rsc_sap_HDB_HDB00-operations \
op start interval=0 timeout=3600 \
op stop interval=0 timeout=3600 \
op promote interval=0 timeout=3600 \
op monitor interval=60 role=Master timeout=700 \
op monitor interval=61 role=Slave timeout=700 \
params SID=HDB InstanceNumber=00 PREFER_SITE_TAKEOVER=false DUPLICATE_PRIMARY_TIMEOUT=7200 AUTOMATED_REGISTER=true
crm configure load update crm-SAPHana-update.txt
crm config show
On prihana node, register the resource for QAS DB in the cluster.
vi crm-qas.txt
primitive rsc_SAP_QAS_HDB10 ocf:heartbeat:SAPDatabase \
params DBTYPE="HDB" SID="QAS" InstanceNumber="10" \
MONITOR_SERVICES="hdbindexserver|hdbnameserver" \
op start interval="0" timeout="600" \
op monitor interval="120" timeout="700" \
op stop interval="0" timeout="300" \
meta priority="100"
crm configure load update crm-qas.txt
On prihana node, Set the newly created QAS HANA DB resource constraints
vi crm-cs-qas.txt
location loc_QAS_never_on_prihana rsc_SAP_QAS_HDB10 -inf: prihana
colocation col_QAS_never_with_AWS_IP -inf: rsc_SAP_QAS_HDB10:Started \
res_AWS_IP
order ord_QASstop_before_HDB-promote inf: rsc_SAP_QAS_HDB10:stop \
msl_SAPHana_HDB_HDB00:promote
crm configure load update crm-cs-qas.txt
crm config show
On prihana node, turn off Cluster Maintenance mode and monitor whether it is properly set.
crm node ready prihana
crm node ready sechana
crm_mon -rfn1
SAPHanaSR-showAttr
After switching to qasadm user in sechana node, check if QAS HANA DB is started normally.
sudo su - qasadm
HDB info
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.