No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Huawei SAP HANA Appliance HA and DR Scheme Configuration Guide 02

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Registering the DR Node with the Secondary HANA Node

Registering the DR Node with the Secondary HANA Node

Register the DR node with the secondary HANA node for asynchronous replication.

Before the registration, ensure that the network connection is normal. Stop the HANA database on the DR node, configure system replication on the DR node, and then restart the HANA database.

  1. Log in to DR HANA node as the root user.
  2. Run the su - s00adm command to switch to the HANA database user s00adm (replace s00 with the actual database SID in lowercase).

    hw00003:~ # su - S00adm

  3. Run the HDB stop command to stop the HANA database.

    hw00003:/usr/sap/S00/HDB00> HDB stop
    Stopping instance using: /usr/sap/S00/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 00 -function Stop 400
    12.10.2015 15:11:23
    Stop
    OK
    Waiting for stopped instance using: /usr/sap/S00/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 00 -function WaitforStopped 600 2
    12.10.2015 15:11:23
    WaitforStopped
    OK
    hdbdaemon is stopped.

  4. Copy the SSFS_<SID>.DAT and SSFS_<SID>.KEY files from the server node 2 to the DR node.

    In SAP HANA 2.0, the data and log transmission channel needs to be authenticated during the system replication process. Therefore, the system PKI SSFS storage certificate is required.

    SSFS_<SID>.DAT and SSFS_<SID>.KEY are respectively stored in /usr/sap/SID/SYS/global/security/rsecssfs/data and /usr/sap/SID/SYS/global/security/rsecssfs/key. SID is the database instance ID. In this example, the SID is S00. Replace it with the actual SID.

    1. On the DR node, run the following commands to back up the files:
      [root@hw00003 ~]# cd /usr/sap/S00/SYS/global/security/rsecssfs/data
      [root@hw00003 data]# mv SSFS_S00.DAT SSFS_S00.DAT.bak
      [root@hw00003 ~]# cd /usr/sap/S00/SYS/global/security/rsecssfs/key
      [root@hw00003 key]# mv SSFS_S00.KEY SSFS_S00.KEY.bak
    2. On the server node 2 run the following commands to synchronize files to the DR node:
      hw00002:cd /usr/sap/S00/SYS/global/security/rsecssfs/key
      hw00002:/usr/sap/S00/SYS/global/security/rsecssfs/key # scp SSFS_S00.KEY s00adm@hw00003:/usr/sap/S00/SYS/global/security/rsecssfs/key
      Password: //Enter the password.
      SSFS_S00.KEY                                                                                                                     100%  187     0.2KB/s   00:00 
      hw00002:cd /usr/sap/S00/SYS/global/security/rsecssfs/data
      hw00002:/usr/sap/S00/SYS/global/security/rsecssfs/data # scp SSFS_S00.DAT s00adm@hw00003:/usr/sap/S00/SYS/global/security/rsecssfs/data
      Password://Enter the password.
      SSFS_S00.DAT                                                                                                                     100% 2960     2.9KB/s   00:00

  5. On the DR node, run the vim /hana/shared/S00/global/hdb/custom/config/global.ini command to open the global.ini file.

    The SID must be changed based on the actual situation. In this example, the SID is S00.

    hw00003:/ # vim /hana/shared/S00/global/hdb/custom/config/global.ini

  6. Press i to make the hosts file editable and add the following information to the file.

    10.5.1.10 is the IP address of the service network port of the active node. hw00001 is the host name of the active node server.

    10.5.1.11 is the IP address of the service network port of the standby node. hw00002 is the host name of the standby node server.

    NOTE:

    In this solution, the service network is used as the data synchronization channel between the standby node and the DR node. You need to modify the channel according to the actual situation.

    [system_replication_communication] 
    listeninterface = .global 
    [system_replication_hostname_resolution]
    10.5.1.10 = hw00001
    10.5.1.11 = hw00002

  7. Press Esc to switch the vi editor to the CLI mode. Press the colon (:) key to switch to the bottom line mode. Type wq and press Enter to save the modification and exit the vi editor.
  8. Log in to server node 1, and edit the global. ini file in the same way. (The peer IP address and host name need to be modified accordingly.)

    NOTE:

    In addition to the IP address and host name of the peer end of the SR network, you need to add the service IP address and host name of the DR node to the active node.

    [system_replication_communication] 
    listeninterface = .global 
    [system_replication_hostname_resolution]
    10.5.2.11 = hw00002
    10.5.1.12 = hw00003

  9. Log in to server node 2, and edit the global. ini file in the same way. (The peer IP address and host name need to be modified accordingly.)

    NOTE:

    In addition to the IP address and host name of the peer end of the SR network, you need to add the service IP address and host name of the DR node to the standby node.

    [system_replication_communication] 
    listeninterface = .global 
    [system_replication_hostname_resolution]
    10.5.2.10 = hw00001
    10.5.1.12 = hw00003

  10. On the DR node, run the hdbnsutil -sr_register --remoteHost=hw00002 --remoteInstance=00 --replicationMode=async --name=hw00003 --operationMode=logreplay command to register the standby node with the active node.

    s00adm@hw00003:/usr/sap/S00/HDB00> hdbnsutil -sr_register --name=hw00003 --remoteHost=hw00002 --remoteInstance=00 --replicationMode=async --operationMode=logreplay
    adding site ...
    nameserver hw00003:30001 not responding.
    collecting information ...
    updating local ini files ...
    done.
    s00adm@hw00003:/usr/sap/S00/HDB00>
    Table 3-1 Parameter description

    Parameter

    Description

    remoteHost

    Indicates the host name of the active node. In this example, the host name is hw00002. Replace it with the actual host name.

    name

    Indicates the host name of the standby node. In this example, the host name is hw00003. Replace it with the actual host name.

    replicationMode

    Indicates the synchronization mode, including:

    • sync: hard disk synchronization
    • async: asynchronization
    • syncmem: memory synchronization
    NOTICE:

    You are advised to select sync. If you select async or sysnmem, performance is improved but there are data loss risks when exceptions occur.

    remoteInstance

    Indicates the HANA database instance ID. Replace it with the actual instance ID.

    operationMode

    For HANA1.0:

    • delta_datashipping: The data is periodically transmitted between the active and standby nodes and the standby node spends a long time to take over the database service. delta_datashipping is the default mode.
    • logreplay: After the data on the active node is initialized and synchronized to the standby node, only log files are synchronized. In this mode, the logs of the active node are redone on the standby node in real time and the standby node spends a short time to take over the database service. logreplay is recommended.

    For HANA2.0:

    • delta_datashipping: The data is periodically transmitted between the active and standby nodes and the standby node spends a long time to take over the database service.
    • logreplay: After the data on the active node is initialized and synchronized to the standby node, only log files are synchronized. In this mode, the logs of the active node are redone on the standby node in real time and the standby node spends a short time to take over the database service. The default mode is logreplay (recommended).
    • logreplay_readaccess: After the data on the active node is initialized and synchronized to the standby node, only log files are synchronized. In this mode, the logs of the active node are redone on the standby node in real time and the standby node spends a short time to take over the database service. In addition, the SQL can access the standby node in read-only mode.

  11. Run the HDB start command to start the database on the standby node.

    s00adm@hw00003:/usr/sap/S00/HDB00> HDB start
     
     
    StartService
    Impromptu CCC initialization by 'rscpCInit'.
      See SAP note 1266393.
    OK
    OK
    Starting instance using: /usr/sap/S00/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 00 -function StartWait 2700 2
     
     
    07.11.2018 10:13:43
    Start
    OK
     
    07.11.2018 10:14:17
    StartWait
    OK
    s00adm@hw00003:/usr/sap/S00/HDB00>

  12. Run the hdbnsutil -sr_state command to check the system replication status on the DR node.

    If the database mode is async and three nodes can be found, the asynchronization synchronization mode is registered successfully.

    s00adm@hw00003:/usr/sap/S00/home> hdbnsutil -sr_state
     
    System Replication State
    ~~~~~~~~~~~~~~~~~~~~~~~~
     
    online: true
     
    mode: async
    operation mode: logreplay
    site id: 3
    site name: hw00003
     
     
    is source system: false
    is secondary/consumer system: true
    has secondaries/consumers attached: false
    is a takeover active: false
    active primary site: 2
     
    primary masters: hw00002
     
    Host Mappings:
    ~~~~~~~~~~~~~~
     
    hw00003 -> [hw00003] hw00003
    hw00003 -> [hw00002] hw00002
    hw00003 -> [hw00001] hw00001
     
     
    Site Mappings:
    ~~~~~~~~~~~~~~
    hw00001 (primary/primary)
        |---hw00002 (sync/logreplay)
        |    |---hw00003 (async/logreplay)
     
    Tier of hw00001: 1
    Tier of hw00002: 2
    Tier of hw00003: 3
     
    Replication mode of hw00001: primary
    Replication mode of hw00002: sync
    Replication mode of hw00003: async
     
    Operation mode of hw00001: primary
    Operation mode of hw00002: logreplay
    Operation mode of hw00003: logreplay
     
    Mapping: hw00001 -> hw00002
    Mapping: hw00002 -> hw00003
    done.
    s00adm@hw00003:/usr/sap/S00/home>

  13. Log in to the active node as the root user. Run the su - s00adm command to switch to the HANA database user (Replace s00 in the command with the actual database SID in lowercase). Run the cdpy command as a database user to go to the python directory. Then run the python systemReplicationStatus.py command using a database account to check the data synchronization status.

    s00adm@hw00001:/usr/sap/S00/HDB00> cdpy
    s00adm@hw00001:/usr/sap/S00/HDB00/exe/python_support>
    s00adm@hw00001:/usr/sap/S00/HDB00/exe/python_support> python systemReplicationStatus.py
    | Database | Host    | Port  | Service Name | Volume ID | Site ID | Site Name | Secondary | Secondary | Secondary | Secondary | Secondary     | Replication | Replication | Replication    |
    |          |         |       |              |           |         |           | Host      | Port      | Site ID   | Site Name | Active Status | Mode        | Status      | Status Details |
    | -------- | ------- | ----- | ------------ | --------- | ------- | --------- | --------- | --------- | --------- | --------- | ------------- | ----------- | ----------- | -------------- |
    | SYSTEMDB | hw00001 | 30001 | nameserver   |         1 |       1 | hw00001   | hw00002   |     30001 |         2 | hw00002   | YES           | SYNC        | ACTIVE      |                |
    | S00      | hw00001 | 30007 | xsengine     |         3 |       1 | hw00001   | hw00002   |     30007 |         2 | hw00002   | YES           | SYNC        | ACTIVE      |                |
    | S00      | hw00001 | 30003 | indexserver  |         2 |       1 | hw00001   | hw00002   |     30003 |         2 | hw00002   | YES           | SYNC        | ACTIVE      |                |
    | SYSTEMDB | hw00002 | 30001 | nameserver   |         1 |       2 | hw00002   | hw00003   |     30001 |         3 | hw00003   | YES           | ASYNC       | ACTIVE      |                |
    | S00      | hw00002 | 30007 | xsengine     |         3 |       2 | hw00002   | hw00003   |     30007 |         3 | hw00003   | YES           | ASYNC       | ACTIVE      |                |
    | S00      | hw00002 | 30003 | indexserver  |         2 |       2 | hw00002   | hw00003   |     30003 |         3 | hw00003   | YES           | ASYNC       | ACTIVE      |                |
     
    status system replication site "2": ACTIVE
    status system replication site "3": ACTIVE
    overall system replication status: ACTIVE
     
    Local System Replication State
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    mode: PRIMARY
    site id: 1
    site name: hw00001
    s00adm@hw00001:/usr/sap/S00/HDB00/exe/python_support>

  14. Checking the system replication status.

    The system replication status, you can use the HANA studio to connect to the primary HANA database and check the system replication status on the System Replication tab of Landscape tab.

Translation
Download
Updated: 2019-03-30

Document ID: EDOC1100073265

Views: 1303

Downloads: 8

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next