All Products
Search
Document Center

SAP:SAP HANA scale-out deployment guide

Last Updated:Mar 05, 2025

SAP HANA scale-out deployment guide

Version management

Version

Revision date

Changes

Release date

1.0

2018/5/14

1.1

2018/5/31

1. The installation of ECS Metrics Collector is supported.

2. The layout of specific pages is adjusted.

2018/6/1

1.2

2019/7/4

Apsara File Storage NAS (NAS) parameters are optimized.

2019/7/4

1.3

2019/7/30

Some links are updated.

2019/7/30

1.4

2022/1/18

The configuration description of HANA internal service communication is modified.

2022/1/18

Overview

This topic describes SAP HANA scale-out deployment on Alibaba Cloud. The deployment architecture is based on non-shared storage with one master node and two worker nodes. By using the automatic recovery feature of Elastic Compute Service (ECS), this architecture supports automatic recovery of failed nodes. Therefore, you do not need secondary nodes for SAP HANA instances.

Important

This topic cannot replace standard SAP documentation. The installation and deployment methods mentioned in this topic are for reference only. We recommend that you read the official SAP installation and configuration documentation and SAP Notes before you proceed with the deployment.

Architecture

createvpc-1

Resource planning

Network design

Purpose

Location

CIDR block

vSwitch

VPC

Business network

Beijing Zone F

192.168.10.0/24

sap_business

SAP_Network

SAP and hosts

SAP HANA (SID: BWS)

Hostname

IP address

Type

Instance ID

SID

Remarks

hana01

192.168.10.4

Master

00

BWS

Local installation

hana02

192.168.10.5

Worker

00

BWS

Local installation

hana03

192.168.10.6

Worker

00

BWS

Local installation

Users and groups

Ensure that all nodes in the SAP HANA cluster use the same user ID and group ID.

User ID: Set the [sid] adm user ID to 2000.

Group ID: Set the sapsys group ID to 2000.

SWAP space

The swap space is required for installing SAP applications and SAP HANA. We recommend that you create an SSD to provide the swap space when you create an ECS instance. For more information about swap space, see SAP Note 1597355 - Swap-space recommendation for Linux. An SAP service account is required to access this page.

File systems

We recommend that you use Autofs to mount global file systems. For more information about file system sizing for SAP HANA, refer to the SAP official documentation. In this example, the size of the ECS physical memory is 128 GB. The following file system sizing is only for reference:

File system

Type

Logical volume

Volume group

Size

Disk type

/hana/data

XFS

datalv

hanavg

384 GB

SSD

/hana/log

XFS

loglv

hanavg

64 GB

SSD

/hana/shared

NAS

N/A

N/A

128 GB

SSD

Preparations

Alibaba Cloud account

If you do not have an Alibaba Cloud account, register one on the Alibaba Cloud official website or in the Alibaba Cloud app. You need to use a mobile phone number to register the account and complete real-name verification for the account. Then, you can log on to the Alibaba Cloud app with this account to manage and monitor your cloud resources, perform identity authentication, and ask questions and acquire knowledge in Yunqi Community.

VPC

A virtual private cloud (VPC) is an isolated virtual network built on Alibaba Cloud. VPCs are logically isolated from each other. A VPC is a private network dedicated for your use. You have full control over your VPC. For example, you can specify IP address ranges and configure route tables and gateways for your VPC. For more information, see What is a VPC?

Create a VPC and a vSwitch as planned.

ECS instance

ECS is a basic cloud computing service provided by Alibaba Cloud. You can log on to the ECS console to configure your ECS instances. For more information about SAP NetWeaver and SAP HANA on Alibaba Cloud, see Note 1380654 - SAP support in cloud environments.

Create an ECS instance

Create an ECS instance in the ECS console. Specify the billing method and zone.

Select an existing VPC and an existing security group for the ECS instance. For more information about the security group, see Security FAQ.

The following table describes the security group rules for this example.

Protocol type

Port range

Scenario

ICMP

-1/-1

Allows ICMP requests.

SSH

22/22

Allows remote Linux SSH access.

TELNET

23/23

Allows requests from default Telnet ports.

HTTPS

443/443

Allows access from HTTPS websites.

SAP HANA

30015-39915

SAP HANA

VNC

5801-5904

Allows access from VNC Viewer.

Specify the number and capacity of disks during disk creation as planned. For more information about disks, see Block storage performance.

Note

In this example, /hana/data uses three SSDs or ESSDs of equal capacity, with data striped across them by using LVM to meet the performance requirements of SAP HANA. /hana/log and /hana/shared each use a single SSD or ESSD, and all file systems are XFS.

Check all configuration items and ensure that they are correct. Then, create the ECS instance. According to the planning of this deployment, you need to create three ECS instances.

ECS Metrics Collector installation

ECS Metrics Collector is a monitor agent that the SAP system uses on Alibaba Cloud to collect required information about virtual machine configuration and underlying physical resource usage.

When the SAP system runs in an ECS instance, the SAP Host Agent uses the metadata service and APIs to obtain the information required for monitoring the SAP system, including the information about the operating system, network, storage, and SAP architecture. Then, the SAP Host Agent provides the information for SAP applications to analyze events and system performance.

You need to install ECS Metrics Collector for SAP for each ECS instance in which the SAP system is running, either for SAP applications or SAP HANA.

For more information, see ECS Metrics Collector for SAP deployment guide.

NAS

NAS provides a file storage solution for compute nodes such as ECS instances, E-HPC instances, and Docker containers. NAS supports standard file access protocols. You can use NAS without the need to modify existing applications. NAS provides various features such as unlimited capacity, performance expansion, single namespace, multi-party sharing, high reliability, and high availability. For more information about NAS, see the "File Storage NAS" topic.

1. Create an NAS file system

Select a region and a storage type. This deployment uses the SSD performance type. For more information about NAS performance, see General-purpose NAS file systems.

In the ECS console, choose Storage & Snapshots > NAS. On the page that appears, specify the region, storage type, capacity, and zone. Select Create new FS and bind naspackage.

After you complete the payment, go to the ECS console and refresh the console. The file system that you created is displayed on the page.

2. Record the mount address of the NAS file system

Create a NAS file system for /hana/shared as planned and record the mount address of the NAS file system.

ECS instance failover

The failover feature is used to improve the availability of ECS instances. This feature reduces influences of physical failures on services.

In the event that the underlying hardware on which your ECS instances are hosted works abnormally or crashes unexpectedly, Alibaba Cloud sends a text message to you if the breakdown is confirmed as irreversible.

After data migration is complete, Alibaba Cloud will send a text message to indicate that migration is complete. The ECS instance metadata, such as the instance ID, private network IP address, and public network IP address, will remain unchanged.

For more information, see Automatic recovery events of instances.

SAP HANA installation

Maintain hostnames

Modify hostnames for all nodes of SAP applications and SAP HANA. Add the following information to the hosts file in the /etc directory as planned:

192.168.10.4    hana01
192.168.10.5    hana02
192.168.10.6    hana03

Create file systems

Note

Create an NAS file system for /hana/shared. Create XFS file systems for /hana/data and /hana/log.

1. Create file systems for /hana/data and /hana/log

(1) Check disks.

(2) Create a physical volume.

(3) Create the hanavg volume group.

(4) Create the datalv and loglv logical volumes.

(5) Create file systems.

(6) Add mount points for the file systems. Enable the file systems to be mounted upon system startup.

fdisk -l
pvcreate /dev/vdb /dev/vdc /dev/vdd
vgcreate hanavg /dev/vdb /dev/vdc /dev/vdd
lvcreate -L 384G -n datalv -i 3 -I 64 hanavg
lvcreate -L 64G -n loglv -i 3 -I 64 hanavg

mkfs.xfs /dev/hanavg/datalv
mkfs.xfs /dev/hanavg/loglv
mkdir -p /hana/data
mkdir -p /hana/log

Add the following content to the /etc/fstab file:

/dev/mapper/hanavg-datalv       /hana/data      xfs     nobarrier,noatime,nodiratime,logbsize=256k     0       0
/dev/mapper/hanavg-loglv        /hana/log       xfs     nobarrier,noatime,nodiratime,logbsize=256k     0       0

Run the mount -a command to mount all file systems.

3. Mount global file systems

We recommend that you use Autofs to mount the /hana/shared and /hana/backup file systems. You do not need to create directories as mount points.

To configure Autofs, perform the following operations:

(1) Run the following command to edit the auto.master file:

#vim /etc/auto.master

Add /- /etc/auto.nfs.

(2) Create and edit the auto.nfs file in the /etc directory as follows:

/hana/shared -rw,hard,intr,noresvport,timeo=60,retrans=2      xxxxxxx.nas.aliyuncs.com:/

(3) Run the following command to start Autofs and enable automatic start upon system startup:

systemctl start autofs
systemctl enable autofs

You can run the cd command to access the two file systems to check whether they are mounted.

Prepare the operating system and an installation package

You need to configure all nodes of the cluster. The following procedure shows how to configure a node.

1. Install the package required by HA configuration and optimization

Install the sap_cluster_connector/saptune package.

zypper in -y saptune sap_cluster_connector

Run the following command to check whether the package is installed:

zypper se saptune sap_cluster_connector

2. Check the Network Time Protocol (NTP) service

By default, the NTP service is enabled for Alibaba ECS instances. If the time zone of your ECS instances is not Asia/Shanghai, change the time zone and configure the NTP service. Ensure that all ECS instances enable the NTP service and use the same time zone.

3. Install saptune

As an upgraded version of the sapconf tool, saptune is available to SUSE Linux Enterprise Server 12 SP2 and later versions. You can use saptune to tune parameters for operating systems and databases. This ensures better performance for SAP NetWeaver or SAP HANA.

Syntax:

SAP note

Tune system according to SAP and SUSE notes:
  saptune note [ list | verify ]
  saptune note [ apply | simulate | verify | customise | revert ] NoteID

SAP Solution

Tune system for all notes applicable to your SAP solution:
  saptune solution [ list | verify ]
  saptune solution [ apply | simulate | verify | revert ] SolutionName

The following figure shows the installation results of saptune.

installsummary

Run the following command to start a daemon:

saptune daemon start

For more information about saptune, see Prepare your Linux for your SAP solution with saptune or the official documentation for SUSE Linux Enterprise Server.

Install SAP HANA

For more information about how to install and configure SAP HANA, see SAP HANA Platform.

1. Install HANA on the primary node

After SAP HANA is installed, you must modify the parameters to meet the requirements of the non-shared architecture.

Open /hana/shared/[SID]/global/hdb/custom/config/global.ini and add the following configuration to the file:

basepath_shared=no

Run the following commands as the root user:

cd /hana/shared/[SID]/hdblcm
./hdblcm

Enter 4 and press the Enter key, which indicates the configure_internal_network feature. Then, select a communication type of the internal service.

In this example, the communication CIDR block is 192.168.10/24.

2. Install SAP HANA on worker nodes. This topic uses one worker node as example. The installation of other worker nodes is similar.

Create paths for instances.

mkdir -p /hana/data/[HANA SID]

mkdir -p /hana/log/[HANA SID]

Modify directory permissions.

chmod -R 775 /hana/data/[HANA SID]

chmod -R 775 /hana/log/[HANA SID]

Install SAP HANA on the worker node.

Run the cd command as the root user to access the installation path: cd /hana/shared/[HANA SID]/hdblcm.

3. Modify parameters to enable SAP HANA to start upon system startup.

Log on to SAP HANA hosts as the root user and modify all HANA instance parameters.

Edit /hana/shared/[SID]/profile/[SID]_HDB[instance number]_[host name].

Change the value of the Autostart parameter from 0 to 1. Save the settings and restart SAP HANA instances.

Repeat the preceding steps to install SAP HANA on the other worker node according to the planning for this example.

Verify the installation

1. Log on to the ECS instances as the su - [sid]adm user.

2. Check wheher the cluster is deployed.

cd /hana/shared/[SID]/exe/linuxx86_64/hdb/python_support/

python landscapeHostConfiguration.py

landscapehost