Task 03. Change Config of the Cluster for QAS system

We will change the existing cluster configuration to manage PRD HANA Database and newly added QAS HANA Database.


  1. 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. image03-01

      • Select Session Manager and click Connect. image04

      • Stop QAS DB.

      sudo su - qasadm
      HDB stop
      exit
      

      image05

      • Stop PRD(HDB) DB.
      sudo su - hdbadm
      HDB stop
      exit
      

      image06

    • Keep the connection of sechana, Connect to prihana through Session Manager.

      • After log in AWS Management Console, connect to EC2 Instance Console
      • Select HANA-HDB-Primary instance, click Action, and click Connect. image03-01
      • Select Session Manager and click Connect. image04
      • Stop PRD(HDB) DB.
      sudo su - hdbadm
      HDB stop
      exit
      

      image07

  2. 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.

    • (root) Create a folder for snippet creation
    sudo su -
    mkdir -p /hana/shared/script/
    cd /hana/shared/script/
    
    • (root) Using VI editor, create a snippet as shown below.
    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
    

    image08

    • (root) Load the snippet to crm.
    crm configure load update crm-SAPHana-update.txt
    
    • (root) Check the updated crm settings.
    crm config show
    

    image09

  3. On prihana node, register the resource for QAS DB in the cluster.

    • (root) Using VI editor, create a snippet as shown below.
    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"
    

    image10

    • (root) Load the snippet to crm.
    crm configure load update crm-qas.txt
    

    image11

  4. On prihana node, Set the newly created QAS HANA DB resource constraints

    • (root) Using VI editor, create a snippet as shown below.
    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
    

    image12

    • (root) Load the snippet to crm.
    crm configure load update crm-cs-qas.txt
    
    • (root) Check the updated crm settings.
    crm config show
    

    image13 image14

  5. On prihana node, turn off Cluster Maintenance mode and monitor whether it is properly set.

    • Turn off Cluster Maintenance mode
    crm node ready prihana
    crm node ready sechana
    
    • Monitor the cluster status. Check if the QAS HANA DB resource is properly Started.
    crm_mon -rfn1
    

    image15

    • Monitor HSR status. Check that sechana’s status is SOK.
    SAPHanaSR-showAttr
    

    image16

  6. After switching to qasadm user in sechana node, check if QAS HANA DB is started normally.

    • Check if HDB processes are started normally.
    sudo su - qasadm
    HDB info
    

    image17


© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.