You are on page 1of 48

PUBLIC

SAP HANA Platform 2.0


Document Version: 1.2 – 2018-05-03

Red Hat Enterprise Linux (RHEL) 7.x Configuration


Guide for SAP HANA
x86_64 and POWER Architectures
Content

1 Executive Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 How to Use This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Installation Overview of SAP HANA on RHEL 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1 Hardware. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
2.2 Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Required Hosts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

3 Manual Preparation of the OS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


3.1 Basic OS Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Install Additional Required Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Install GCC 6 C++ Runtime Compatibility Libraries for SAP HANA 2.0 >= SPS 02. . . . . . . . . . . . . 10
Install GCC 5 C++ Runtime Compatibility Libraries for SAP HANA 2.0 < SPS 02. . . . . . . . . . . . . . 11
3.3 Configure the Hostname. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.4 Configure Network Time and Date. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chrony. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
NTPD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Configure Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Multipath Disk Attachment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Internal Disks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Create File Systems and Mount Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 Activate SAP HANA Specific Tuned Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7 Disable SELinux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.8 Disable Automatic NUMA Balancing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.9 Add Symbolic Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.10 Disable Transparent Hugepages (THP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.11 Configure CPU Governor for performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.12 Configure Processor C-States (not relevant for IBM Power LE (ppc64le)). . . . . . . . . . . . . . . . . . . . . 21
3.13 Increase the Maximum Number of Processes a User is Allowed to Run. . . . . . . . . . . . . . . . . . . . . . .22
3.14 Disable ABRT, Core Dumps and kdump. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.15 Firewall Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Calculation of the Ports Used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Common Networks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Configure the Firewall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24

4 SAP HANA Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
2 PUBLIC Content
4.1 Preparation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2 SAP HANA Installation Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Interactive Command Line SAP HANA Installation Using HDBLCM. . . . . . . . . . . . . . . . . . . . . . . 29
Interactive Installation of SAP HANA Using HDBLCMGUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Unattended Installation Using hdblcm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Scale-Out Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

5 Automated RHEL and SAP HANA Installation Using Kickstart. . . . . . . . . . . . . . . . . . . . . . . . . 32


5.1 Description of the Sample Kickstart File for Installing SAP HANA on RHEL 7.x. . . . . . . . . . . . . . . . . . 32
5.2 Example Kickstart Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6 Operating System Maintenance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


6.1 Changes to OS configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2 Maintenance / Patching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.3 Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7 Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.1 Appendix A – Required Packages for SAP HANA on RHEL7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2 Appendix B – SAP HANA Tuned Profiles OS Modifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.3 Appendix C – Sample XML Password File for Unattended SAP HANA Installation. . . . . . . . . . . . . . . 42
7.4 Appendix D – Sample Kickstart File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.5 Appendix E – Installation in a Virtual Machine (VMware). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Content PUBLIC 3
1 Executive Summary

This guide serves as a supplement to the existing documentation from SAP and the hardware vendors to
provide specific guidance on how to configure Red Hat Enterprise Linux for SAP HANA (RHEL for SAP HANA)
to be used with SAP HANA.

“RHEL for SAP Solutions” is used for both “RHEL for SAP NetWeaver” and “RHEL for SAP HANA”. For more
information about “Red Hat Enterprise Linux for SAP Solutions”, refer to the SAP Note 2526952 - Red Hat
Enterprise Linux for SAP Solutions.

SAP HANA offers two distinct deployment models, a complete pre-installed and pre-configured (so called
Appliance) model from the hardware vendors or the “Tailored Datacenter Integration” (TDI) model where the
customers take responsibility for the construction and validation of their SAP HANA environment but by that
providing a better integration into their IT infrastructures.

The setup described in this document is based on the recommendations in the following SAP Notes and other
SAP Documentation:

● SAP Note 2235581 - SAP HANA: Supported Operating Systems


● SAP Note 2292690 - SAP HANA DB: Recommended OS settings for RHEL 7
● SAP Note 2298750 - SAP HANA Platform SPS 12 Release Note
● SAP Note 2380257 - SAP HANA Platform 2.0 SPS 00 Release Note
● SAP Note 2404375 - SAP HANA Platform 2.0 SPS 01 Release Note
● SAP Note 2460914 - SAP HANA Platform 2.0 SPS 02 Release Note
● SAP Note 2551355 - SAP HANA Platform 2.0 SPS 03 Release Note
● SAP HANA Server Installation and Update Guide
● SAP HANA – Storage Requirements Guide

This guide does not describe all variants resulting in a valid deployment. It describes the base configurations
along with the minimum requirements.

This guide does not replace any existing SAP HANA documentation, including SAP Notes, and sizing guides.
Furthermore, it does not replace any SAP HANA hardware vendor documentation.

SAP HANA 1.0 SPS 12 is the minimum version supported on Red Hat Enterprise Linux 7 (RHEL for SAP HANA)
on x86_64.

On IBM Power LE you must at least use SAP HANA 2.0 SPS2 Revision 21.

Check the matrix attached to SAP Note 2235581 - SAP HANA: Supported Operating Systems for full details
on the certified OS release and SAP HANA SPS combinations.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
4 PUBLIC Executive Summary
1.1 How to Use This Guide

This guide is divided into four main parts:

1. Manual installation of RHEL for SAP HANA 7.


2. SAP HANA installation examples.
3. Automatic Installation of OS and SAP HANA with a kickstart file.
4. Appendices as shortcuts to more detailed information.

Some steps depend highly on your environment and the devices used in your servers. Adapt the instructions
given in this guide accordingly to match your environment.

In the step-by-step instructions, there is always a short description stating what has to be done. And below the
text there is a gray box with an example showing what could be executed. Only use copy-paste if you are sure
that you don't have to replace a placeholder.

1.2 Installation Overview of SAP HANA on RHEL 7

These are the general steps for installing SAP HANA on RHEL for SAP HANA 7:

● Install base RHEL 7. Use the base application profile.


● Register the host to the Red Hat Customer Portal or your local Red Hat Satellite server and subscribe it to
the required channels for RHEL for SAP HANA.
● Configure the OS according to the guidelines in SAP Note 2292690 - SAP HANA DB: Recommended OS
settings for RHEL 7, the SAP HANA Installation guides and the recommendations in this document.
● Update the system to the latest release within the version range used.
● Install SAP HANA.

Related Information

SAP Note 2235581 - SAP HANA: Supported Operating Systems


SAP Note 2292690 - SAP HANA DB: Recommended OS settings for RHEL 7.2
SAP Note 2298750 - SAP HANA Platform SPS 12 Release Note
SAP Note 2380257 - SAP HANA Platform 2.0 SPS 00 Release Note
SAP Note 2404375 - SAP HANA Platform 2.0 SPS 01 Release Note
SAP Note 2460914 - SAP HANA Platform 2.0 SPS 02 Release Note
SAP Note 2551355 - SAP HANA Platform 2.0 SPS 03 Release Note
SAP HANA – Storage Requirements Guide
SAP HANA Server Installation and Update Guide

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Executive Summary PUBLIC 5
2 Prerequisites

Before performing the actual installation of SAP HANA, ensure that you have fulfilled the prerequisites listed in
the following sections.

2.1 Hardware

Your server hardware platform must be validated for SAP HANA independently of which delivery approach
(Appliance or TDI) you plan to use.

For a list of validated server hardware platforms, see SAP Certified and Supported SAP HANA Hardware . For
information on supported hardware for SAP HANA TDI setups, see SAP HANA TDI - Overview .

2.2 Storage

The appliance hardware vendors provide storage within their pre-build SAP HANA systems.

If you use the TDI approach, SAP HANA requires a SAP HANA TDI certified storage subsystem (see SAP
Certified and Supported SAP HANA Hardware or the list of certified storage systems).

You need to apply the file system layout / partitioning which is outlined in the SAP HANA Server Installation
and Update Guide and the SAP HANA – Storage Requirements Guide . For TDI setups also check the storage
vendors' TDI documentation for specific setup requirements for their storage systems.

Ensure to pick the right sections and clearly distinguish between shared file system based installations and
shared disc based installation.

The mount points in this guide do apply for scale-up deployments or for shared file system deployments.
Mount points for shared disc deployments can be either retrieved from the SAP HANA Server Installation and
Update Guide or to some extend from the hardware vendor’s documentation.

For more information about file system layout, the partitioning, and the sizing, see the section Recommended
File System Layout in the SAP HANA Server Installation and Update Guide and the SAP HANA – Storage
Requirements Guide .

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
6 PUBLIC Prerequisites
2.3 Software

Built on Red Hat Enterprise Linux (RHEL), RHEL for SAP Solutions offers the following additional components:

● SAP specific technical components to support S/4HANA, SAP HANA, and SAP Business Apps
● High Availability solutions for S4/HANA, SAP HANA, and SAP Business Apps
● Smart Management for lifecycle management
● Red Hat insights for proactive optimization
● Update Services for SAP Solutions, that extends the lifecycle of minor releases to 4 years

For more information about Red Hat Enterprise Linux for SAP Solutions, see SAP Note 2526952 - Red Hat
Enterprise Linux for SAP Solutions.

Check the matrix attached to SAP Note 2235581 - SAP HANA: Supported Operating Systems for the certified
OS/HANA SPS combinations.

Each server on which SAP HANA is installed needs a valid subscription for Red Hat Enterprise Linux for SAP
HANA and Red Hat Enterprise Linux for SAP Solutions subscription which can be obtained via your
hardware vendor or directly from Red Hat Sales.

Each host on which SAP HANA is installed needs a valid subscription for Red Hat Enterprise Linux for SAP
HANA which can be obtained via your hardware vendor or directly from Red Hat Sales.

To prepare the OS for the HANA installation the following RHEL repositories must be accessible:

● Red Hat Enterprise Linux 7 Server


● Red Hat Enterprise Linux for SAP HANA (RHEL 7 Server)

If you plan to set up SAP HANA with the automated HANA System Replication HA solution provided by Red Hat
the following Repository must be accessible as well:

● Red Hat Enterprise Linux High Availability (for RHEL 7 Server)

To ensure that the system stays on a certified RHEL7 release the system must be subscribed to the
corresponding Extended Update Support (EUS) repositories after installation.

2.4 Required Hosts

The following hosts need to be accessible during installation. Without these hosts the installation is not
possible:

● Host to install: <hostname>.example.com


● When not using a Red Hat Satellite Server:
○ Web server for Kickstart files: <webserver>.example.com
○ FTP for repositories: <ftpserver>.example.com
● When using a Red Hat Satellite Server:
Satellite Server: <satellite>.example.com
● NTP server: <ntp>.example.com
● SAP Support Portal

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Prerequisites PUBLIC 7
The host names have to be substituted with the names of the corresponding host in your environment.

Related Information

SAP Certified and Supported SAP HANA Hardware


SAP HANA TDI - Overview
SAP HANA Server Installation and Update Guide
SAP HANA – Storage Requirements Guide
SAP Note 2235581 - SAP HANA: Supported Operating Systems
Red Hat Enterprise Linux for SAP HANA

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
8 PUBLIC Prerequisites
3 Manual Preparation of the OS

3.1 Basic OS Installation

Perform the basic installation steps:

● Install interactively using the regular RHEL 7.x installation media (use the minimal installation option). On
IBM Power system the RHEL7 installation .ISO image also can be mounted via VIOS (Virtual I/O Server),
which shows up as an optical disk and then start installation over the SMS menu. For more information,
refer to the IBM Knowledge Center .
● Subscribe your system to Red Hat channels for x86_64 or IBM Power Little Endian (PPC64LE) according to
the following Red Hat knowledge base articles:
○ How to subscribe a RHEL 7 system to RHEL for SAP HANA child channel?
○ How to subscribe RHEL 7 SAP HANA system to Extended Update Support (EUS) channel?

Before proceeding with the OS configuration verify that the system has access to the required repositories.

For x86_64 the list of repositories available on the server should look similar to the following:

# yum repolist
Loaded plugins: product-id, rhnplugin, search-disabled-repos
This system is receiving updates from RHN Classic or Red Hat Satellite.
repo id repo
name status
rhel-x86_64-server-7.3.eus RHEL EUS Server (v. 7.3 for 64-bit
x86_64) 14,852
rhel-x86_64-server-ha-7.3.eus RHEL EUS Server High Availability (v. 7.3
for 64-bit x86_64) 311
rhel-x86_64-server-optional-7.3.eus RHEL EUS Server Optional (v. 7.3 64-bit
x86_64) 11,169
rhel-x86_64-server-rs-7.3.eus RHEL EUS Server Resilient Storage (v. 7.3
for 64-bit x86_64) 389
rhel-x86_64-server-sap-hana-7.3.eus RHEL EUS Server SAP HANA (v. 7 for 64-bit
x86_64) 30
rhn-tools-rhel-x86_64-server-7.3.eus RHN Tools for RHEL EUS (v. 7.3.eus for
x86_64) 124
repolist: 26,875

Note
The Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs) repository is only required if you
plan to set up automated SAP HANA System Replication using the RHEL HA add-on).

For IBM Power Little Endian (PPC64LE) the list of repositories available on the server should look similar to the
following:

# yum repolist
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos,
subscription-manager

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 9
# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
repo id repo
name status
!rhel-7-for-power-le-optional-rpms/ppc64le Red Hat Enterprise Linux 7
for IBM Power LE - Optional (RPMs) 10.320
!rhel-7-for-power-le-rpms/ppc64le Red Hat Enterprise Linux 7
for IBM Power LE (RPMs) 12.328
!rhel-7-for-power-le-satellite-tools-6.2-rpms/ppc64le Red Hat Satellite Tools
6.2 (for RHEL 7 for IBM Power LE) (RPMs) 70
!rhel-7-for-power-le-supplementary-rpms/ppc64le Red Hat Enterprise Linux 7
for IBM Power LE - Supplementary (RPMs) 114
!rhel-sap-for-rhel-7-for-power-le-rpms/ppc64le Red Hat Enterprise Linux
for SAP for IBM Power LE (RPMs) 12
!rhel-sap-hana-for-rhel-7-for-power-le-rpms/ppc64le RHEL for SAP HANA (for
RHEL 7 for IBM Power LE) (RPMs) 8

3.2 Install Additional Required Packages

Install the base package group and other additional required packages required for running SAP HANA on
RHEL 7 according to the list in Appendix A – Required Packages for SAP HANA on RHEL7 [page 39]:

# yum -y groupinstall base


# yum install gtk2 libicu xulrunner sudo tcsh libssh2 expect cairo graphviz
iptraf-ng \
krb5-workstation krb5-libs libpng12 nfs-utils lm_sensors rsyslog openssl \
PackageKit-gtk3-module libcanberra-gtk2 libtool-ltdl xorg-x11-xauth numactl \
xfsprogs net-tools bind-utils

3.2.1 Install GCC 6 C++ Runtime Compatibility Libraries for


SAP HANA 2.0 >= SPS 02

Since SAP HANA 2.0 releases are built with different GCC compiler versions than the one that is included by
default in RHEL 7, it is necessary to install an additional package to allow SAP HANA 2.0 SP02 and above to run
on RHEL 7 x86_64 or ppc64le:

# yum install compat-sap-c++-6

Make sure you have at least version 6.3.1-1 of the package (X86_64 or PPCLE) installed:

# rpm -q compat-sap-c++-6
compat-sap-c++-6-6.3.1-1.el7_3.x86_64 # on X86_64 architecture
compat-sap-c++-6-6.3.1-1.el7_3.ppc64le # on PPC LE architecture

See SAP Note 2455582 - Linux: Running SAP applications compiled with GCC 6.x for more information.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
10 PUBLIC Manual Preparation of the OS
3.2.2 Install GCC 5 C++ Runtime Compatibility Libraries for
SAP HANA 2.0 < SPS 02

Since SAP HANA 2.0 releases are built with different GCC compiler versions than the one that is included by
default in RHEL 7, it is necessary to install an additional package to allow SAP HANA 2.0 GA and SP01 to run on
RHEL 7 x86_64:

# yum install compat-sap-c++-5

Make sure you have at least version 5.3.1-10 of the package installed:

# rpm -q compat-sap-c++-5
compat-sap-c++-5-5.3.1-10.el7_2.x86_64 # on X86_64 architecture

See SAP Note 2338763 - Linux: Running SAP Applications compiled with GCC 5.x for more information.

3.3 Configure the Hostname

Configure the hostname:

● Configure the server hostname to the short hostname (without domain):

# hostnamectl set-hostname <hostname>

● Make sure /etc/hosts contains an entry matching the hostname and IP address of the system:

<your ip> <hostname>.example.com <hostname>

● Double-check that it works:

# hostname
<hostname>
# hostname -s
<hostname>
# hostname -f
<hostname>.example.com
# hostname -d
example.com

● Check that the DNS setup is working correctly (lookup and reverse lookup):

# nslookup <hostname>
Server: xxx.xxx.xxx.xxx
Address: xxx.xxx.xxx.xxx#53
Name: <hostname>.example.com
Address: <your.ip>
# nslookup <yourip>
Server: xxx.xxx.xxx.xxx
Address: xxx.xxx.xxx.xxx#53
<your.ip.reverse>.in-addr.arpa name = <hostname>.example.com.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 11
3.4 Configure Network Time and Date

Make sure you have correct network time settings.

There are many ways to keep your time in sync. The default with RHEL 7 is chrony, but most customers still use
NTP (Network Time Protocol) in their environments. For guidance on which NTP implementation to choose see
the chapter Choosing Between NTP Daemons in the RHEL7 System Administrators Guide.

3.4.1 Chrony

The chrony suite is installed by default on some versions of Red Hat Enterprise Linux 7. If required, to ensure it
is installed and enabled, run the following commands as root:

● Make sure chronyd is installed:

# yum -y install chrony


# systemctl stop chronyd.service

● Edit /etc/chrony.conf and make sure the server lines reflect your ntp servers:

# grep ^server /etc/chrony.conf


server ntp.example.com
server ntp1.example.com
server ntp2.example.com

● Enable and start the chrony service:

# systemctl enable chronyd.service


# systemctl start chronyd.service
# systemctl restart systemd-timedated.service

● Double-check that the chrony service is enabled:

# systemctl list-unit-files | grep chronyd.service


chronyd.service enabled
# chronyc sources
210 Number of sources = 3
MS Name/IP address Stratum Poll Reach LastRx Last sample
=========================================================================
^* ntp.example.com 2 8 377 200 -2659ns[-3000ns] +/- 28ms
^- ntp1.example.com 2 8 377 135 -533us[ -533us] +/- 116ms
^- ntp2.example.com 2 9 377 445 +14ms[ +14ms] +/- 217ms

For more information about setting up chrony, see the chapter Using chrony in the RHEL7 System
Administrators Guide.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
12 PUBLIC Manual Preparation of the OS
3.4.2 NTPD

If NTPD is preferred instead of chrony it can be installed and enabled using the following commands:

● Make sure ntp and its utilities are installed and chrony is disabled:

# yum -y install ntp ntpdate


# systemctl stop ntpd.service
# systemctl stop chronyd.service
# systemctl disable chronyd.service

● Edit /etc/ntp.conf and make sure the server lines reflect your ntp servers:

# grep ^server /etc/ntp.conf


server ntp.example.com
server ntp1.example.com
server ntp2.example.com

● Force an update to the current time:

# ntpdate ntp.example.com

● Enable and start the ntpd service:

# systemctl enable ntpd.service


# systemctl start ntpd.service
# systemctl restart systemd-timedated.service

● Double-check that the ntp service is enabled:

# systemctl list-unit-files | grep ntp


ntpd.service enabled
ntpdate.service disabled

The ntpdate service script adjusts the time according to the ntp server every time the system comes up. This
happens before the regular ntp service is started and ensures an exact system time even if the time deviation is
too large to be compensated by the ntp service.

# echo ntp.example.com >> /etc/ntp/step-tickers


# systemctl enable ntpdate.service

For more information on configuring NTPD on RHEL7 look at the chapter Configuring NTP Using ntpd in the
RHEL7 System Administrators Guide.

3.5 Configure Storage

To configure the storage and create an XFS file system you have also two possibilities to perform that:

● Multipath Disk Attachment


● Internal Disks

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 13
3.5.1 Multipath Disk Attachment

This section provides the procedures for configuring Multipath devices.

Device mapper multipathing (DM Multipath) allows you to configure multipath I/O paths between server nodes
and storage arrays into a single device. These I/O paths are physical SAN connections that can include
separate cables, switches, and controllers. DM Multipath can be used to provide:

● Redundancy
DM Multipath can provide failover in an active/passive configuration. In an active/passive configuration,
only half the paths are used at any time for I/O. If any I/O path (the cable, switch, or controller) fails, DM
Multipath switches to an alternate path.
● Improved Performance
DM Multipath can be configured in active mode. In some configurations, DM Multipath can detect loading
on the I/O paths and dynamically rebalanced the load.

To optimize the usage of all available I/O paths for better performance, we strongly recommend to separate the
logical volumes of the SAP HANA for log, data and shared file systems. They should be striped over a number
of different LUNs of the active paths. Note depending on the chosen storage Hardware Vendor, the
configuration can be changed. For any further questions, refer to your Hardware Vendor Storage Configuration.

The multipath -ll command can be used to display the current multipath configuration and show the
current multipath topology from all available information (sysfs, the device mapper, path checkers, …)

The following command shows a example of output for a 4 LUNs of a SAN Volume Controller storage
subsystem.

# multipath -ll
3600a098000591988000004be59c8cda5 dm-3 NETAPP ,INF-01-00
size=3.3T features='4 queue_if_no_path pg_init_retries 50
retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 8:0:1:3 sdq 65:0 active ready running
| `- 1:0:0:3 sdd 8:48 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:1:3 sdh 8:112 active ready running
`- 8:0:0:3 sdm 8:192 active ready running
3600a098000591c36000004ff59c8d106 dm-0 NETAPP ,INF-01-00
size=3.3T features='4 queue_if_no_path pg_init_retries 50
retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:0 sde 8:64 active ready running
| `- 8:0:0:0 sdj 8:144 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:0:0 sda 8:0 active ready running
`- 8:0:1:0 sdn 8:208 active ready running
3600a098000591988000004bb59c8cd71 dm-1 NETAPP ,INF-01-00
size=3.3T features='4 queue_if_no_path pg_init_retries 50
retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:0:1 sdb 8:16 active ready running
| `- 8:0:1:1 sdo 8:224 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:1:1 sdf 8:80 active ready running
`- 8:0:0:1 sdk 8:160 active ready running
3600a098000591c360000050259c8d138 dm-2 NETAPP ,INF-01-00
size=3.3T features='4 queue_if_no_path pg_init_retries 50
retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:2 sdg 8:96 active ready running
| `- 8:0:0:2 sdl 8:176 active ready running

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
14 PUBLIC Manual Preparation of the OS
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:0:2 sdc 8:32 active ready running
`- 8:0:1:2 sdp 8:240 active ready running

1. First step is, create the new volumes for using the LVM physical volume:

#pvcreate /dev/mapper/3600507680185000d38000000000004b9
Physical volume "/dev/mapper/3600507680185000d38000000000004b9" successfully
created

2. To create a volume group from one or more physical volumes, use the vgcreate command. The vgcreate
command creates a new volume group by name and adds one physical volume to it. The following
command creates a volume group vghana that contains physical volumes /dev/mapper/
3600a098000591c36000001ed542975d4

#vgcreate vghana /dev/mapper/3600a098000591c36000001ed542975d4


Volume group “vghana" successfully created

Create the physical volumes and volume group for all SAP HANA file systems /hana/log, /hana/data
and /hana/shared.
The following shows a sample of the command pvs. pvs command provides physical volume information
in a configurable, displaying one line per physical volume.

# pvs
PV VG Fmt Attr
PSize PFree
/dev/mapper/3600a098000591988000004bb59c8cd71 vghana lvm2 a--
3.25t 259.44g
/dev/mapper/3600a098000591988000004be59c8cda5 vghana lvm2 a--
3.25t 259.44g
/dev/mapper/3600a098000591c36000004ff59c8d106 vghana lvm2 a--
3.25t 259.44g
/dev/mapper/3600a098000591c360000050259c8d138 vghana lvm2 a--
3.25t 259.44g

3. Create the logical volume from the volume group, which you have already created in the last step. The
following command creates the logical volume lvlog from the volume group vghana. This example
creates the different logical volume that uses 1TB, 9TB and 3TB of the volume group vghana.

# lvcreate -n lvlog -i 2 -I 64k -L 1t vghana


Logical volume "lvlog" created
# lvcreate -n lvdata -i 2 -I 2M -L 9t vghana
Logical volume "lvdata" created
# lvcreate -n lvshared -i 2 -I 2m -L 3t vghana
Logical volume "lvshared" created
# lvcreate -n lvusrsap -i 2 -I 2m -L 1t vghana
Logical volume "lvusrsap" created

lvs shows the list of logical volumes and reports the info about all logical volumes.

# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy
%Sync Convert
lvdata vghana -wi-ao---- 3.00t
lvlog vghana -wi-ao---- 1.00t
lvshared vghana -wi-ao---- 1.00t
lvusrsap vghana -wi-a----- 1.00t

To create File Systems and Mount Points, refer to the section Create File Systems and Mount Points [page 17].

For more information about DM Multipath, refer to DM Multipath Configuration and Administration .

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 15
3.5.2 Internal Disks

This section describes the configuration storage for Internal Disk.

For more information about multipath threading, external storage and general information on the storage
requirements for SAP HANA, see the SAP HANA TDI - Storage Requirements guide .

To be able to create the logical volumes and file systems required for running SAP HANA the storage devices
must be partitioned first and then the necessary physical volumes and volume groups must be created:

● Check for empty devices:

# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 /boot
└─sda2
sdb

● Create a disk partition:


○ Let’s assume disk /dev/sdb is our free device.
○ Storage devices with less than 2TB in size can be partitioned with fdisk:

# fdisk /dev/sdb
Command (m for help):c

○ Storage devices with more than 2 TB free in size must be partitioned with parted:

# parted /dev/sdb

● Create PV with pvcreate /dev/<disk-partition>.


● Expand VG with vgextend vg00 /dev/<disk-partition>.
● Check with pvs and vgs.

When the volume groups have been created you can create the logical volumes for the SAP HANA instance
according to the SAP HANA Server Installation and Update Guide.

The following table shows you the storage areas you’ll need for installing SAP HANA. The mount points are
defaults which can be changed during installation. The names of the logical volumes are only suggestions and
could be changed without having any influence on the SAP HANA installation.

For the size of Disk Space for every Logical Volume, check the SAP HANA TDI-Storage Requirements .

Logical Volume Recommended Size Mount Point

lv_hana_shared SAP HANA TDI-Storage Requirements /hana/shared

lv_hana_data SAP HANA TDI-Storage Requirements /hana/data

lv_hana_log SAP HANA TDI-Storage Requirements /hana/log

lv_usr_sap At least 50 GiB /usr/sap

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
16 PUBLIC Manual Preparation of the OS
Example Calculation

System memory: 96 GiB

The following example just show you, how you can create logical volumes for a machine with 96 GiB of memory
as following:

# lvcreate -L96G -n lv_hana_shared vg00


# lvcreate -L276G -n lv_hana_data vg00
# lvcreate -L96G -n lv_hana_log vg00
# lvcreate -L50G -n lv_usr_sap vg00

3.5.3 Create File Systems and Mount Points


In general, the default XFS format and mount options are optimal for most workloads.

Red Hat recommends that the default values are used unless specific configuration changes are expected to
benefit the workload of the file system. All filesystems are supported to using with SAP HANA, for more
information, refer to the SAP Note 405827 - Linux: Recommended file systems. If software RAID is in use, the
mks.xfs command automatically configures itself with the correct stripe unit and width to align with the
hardware.

Create the required mount points:

# mkdir -p /hana/{shared,data,log}
# mkdir -p /usr/sap

On these logical volumes, create file systems based on XFS. For more information about the creation of an xfs
filesystem and the tuning possibilities have a look at the manpage of the mkfs.xfs executable. The difference
between multipath environments and Internal discs is the default path.

In the example below the file systems are tuned for a RAID 5 Array with 3 disks, a file system block size of 4kb
and a chunk size of 64kb:

# mkfs -t xfs -b size=4096 -d su=64k,sw=2 /dev/vg00/lv_hana_shared


# mkfs -t xfs -b size=4096 -d su=64k,sw=2 /dev/vg00/lv_hana_data
# mkfs -t xfs -b size=4096 -d su=64k,sw=2 /dev/vg00/lv_hana_log
# mkfs -t xfs -b size=4096 -d su=64k,sw=2 /dev/vg00/lv_usr_sap

For optimal performance of the XFS file system, refer to the following Red Hat Customer Portal article: What
are some of best practices for tuning XFS filesystems (Red Hat Customer Portal login required).

Write the mount directives to /etc/fstab:

# echo “/dev/vg00/lv_hana_shared /hana/shared xfs defaults 1 3”\


>> /etc/fstab
# echo “/dev/vg00/lv_hana_data /hana/data xfs defaults 1 4”\
>> /etc/fstab
# echo “/dev/vg00/lv_hana_log /hana/log xfs defaults 1 5”\
>> /etc/fstab
# echo “/dev/vg00/lv_usr_sap /usr/sap xfs defaults 1 6”\
>> /etc/fstab

Check if XFS filesystems from /etc/fstab can be mounted:

# mount -avt xfs

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 17
3.6 Activate SAP HANA Specific Tuned Profiles

Activate SAP HANA specific tuned profiles.

The tuned tuning service can adapt the operating system to perform better under certain workloads by
setting a tuning profile. Red Hat has developed specific tuned profiles to optimize the performance of SAP
HANA on RHEL. To configure the system to use the appropriate tuned profile do the following:

● Install the package tuned-profiles-sap-hana from the RHEL for SAP HANA channel and activate
tuned:

# yum -y install tuned-profiles-sap-hana


# systemctl start tuned
# systemctl enable tuned

● Configure the system to use the appropriate tuned profile:


○ For SAP HANA 2.0 operating on bare metal on x86_64 or ppc64le or in a VM on RHV on x86_64:

# tuned-adm profile sap-hana

○ For SAP HANA operating in a virtual machine on a VMware hypervisor for x86_64:

# tuned-adm profile sap-hana-vmware

See Appendix E – Installation in a Virtual Machine (VMware) [page 45] for more information on recommended
settings for running SAP HANA on RHEL on VMware

Have a look at Appendix B – SAP HANA Tuned Profiles OS Modifications [page 40] for information about the
modifications performed by the tuned profiles.

Note
When the tuned-sap-hana package is updated on a system then all updated settings in the sap-hana profiles
are automatically applied to the system if one of the profiles is active.

3.7 Disable SELinux

RHEL 7 is delivered with SELinux enabled by default.

Since there is no supported SELinux policy for SAP HANA, leaving SELinux enabled can lead to problems when
running SAP HANA on RHEL, and therefore SELinux must be disabled to be able to run SAP HANA on RHEL 7.

For testing purposes SELinux can be set to permissive mode at runtime:

# setenforce 0

To ensure that SELinux is fully disabled modify the file /etc/selinux/config:

# sed -i 's/\(SELINUX=enforcing\|SELINUX=permissive\)/SELINUX=disabled/g' \
/etc/selinux/config

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
18 PUBLIC Manual Preparation of the OS
Afterwards the system needs to be rebooted for this change to take effect.

You can use the following commands to verify that SELinux is fully disabled:

# sestatus
SELinux status: disabled
# getenforce
Disabled

3.8 Disable Automatic NUMA Balancing

Since SAP HANA is NUMA (non-uniform memory access) aware it does not rely on the Linux kernel features to
optimize NUMA usage automatically. Therefore the automatic NUMA balancing features of the Linux Kernel
should be disabled.

If not using sap-hana tuned profile create the file /etc/sysctl.d/sap_hana.conf and put the line
kernel.numa_balancing = 0 in it:

# echo "kernel.numa_balancing = 0" > /etc/sysctl.d/sap_hana.conf

To activate the change run the following command:

# sysctl -p /etc/sysctl.d/sap_hana.conf

You can verify that the kernel parameter is set correctly using the following command:

# sysctl kernel.numa_balancing
kernel.numa_balancing = 0

RHEL7 also provides the numad userspace daemon that can be used to control NUMA balancing of
applications. This needs to be disabled as well:

# systemctl status numad


numad.service - numad - The NUMA daemon that manages application locality.
Loaded: loaded (/usr/lib/systemd/system/numad.service; disabled; vendor
preset: disabled)
Active: inactive (dead)

If numad is shown as active disable it with the following commands:

# systemctl stop numad


# systemctl disable numad

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 19
3.9 Add Symbolic Links

Since SAP HANA is built on a different Linux Distribution, some of the library names used during the build
process doesn't match with the library names used on RHEL7.

Therefore the following symbolic links are required:

# ln -s /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.1.0.1
# ln -s /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.1.0.1

3.10 Disable Transparent Hugepages (THP)

Disable Transparent Hugepages (THP).

SAP HANA can crash occasionally when Transparent Hugepages (THP) are enabled.

Transparent Hugepages can be switched off during runtime with the following commands:

# echo never > /sys/kernel/mm/transparent_hugepage/enabled

The sap-hana tuned profile deactivates Transparent Hugepages. To ensure that THP are already deactivated
at boot-time before the tuned profile is activated, add the following to the line starting with
GRUB_CMDLINE_LINUX in /etc/default/grub:

transparent_hugepage=never

To enable this change, the GRUB2 configuration needs to be rebuilt:

● On a machine without UEFI activate this option by issuing:

# grub2-mkconfig -o /boot/grub2/grub.cfg

● On a machine with UEFI activate this option by issuing:

# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Afterwards a reboot is required. In a scale-out environment, those changes have to be done on every server of
the landscape.

See Chapter 24. Working with the GRUB 2 Boot Loader for more information on how to manage GRUB2 on
RHEL7.

To verify that THP have been disabled use the following command:

# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
20 PUBLIC Manual Preparation of the OS
3.11 Configure CPU Governor for performance

Linux is using a technology for power saving called CPU governors to control CPU frequency and power
consumption. By default Linux uses the governor ondemand, which will dynamically scale frequency and
voltage up and down depending on CPU load. If you want to maximize CPU performance at the cost of
increased energy consumption, SAP recommends to use the governor performance. If you use the sap-hana
tuned profile as described above, the performance governor is configured via the profile and you don't need to
additionally change this setting manually.

If not using sap-hana tuned profile, insert the following code in a system startup script such as /etc/rc.d/
rc.local :

cpupower frequency-set -g performance

The setting will be applied during system boot. To take effect immediately, the script or the command must be
executed.

3.12 Configure Processor C-States (not relevant for IBM


Power LE (ppc64le))

The Linux kernel shipped with RHEL 7.2 includes a cpuidle driver for recent Intel CPUs: intel_idle. This
driver leads to a different behavior in C-states switching. The normal operating state is C0, when the processor
is put to a higher C state, which saves power. But for low latency applications, the additional time needed to
stop and start the execution of the code again will cause performance degradations. Therefore it is
recommended to limit the C-states to C0 and C1 by setting the following parameter:

processor.max_cstate=1

Additionally you should also configure the intel_idle kernel module to allow C-State C1:

intel_idle.max_cstate=1

You can set this parameter in the kernel command line by modifying /etc/default/grub. Append the
following parameter to the line starting with GRUB_CMDLINE_LINUX:

processor.max_cstate=1 intel_idle.max_cstate=1

To enable these changes, the GRUB2 configuration needs to be rebuilt:

● On non-UEFI systems run:

# grub2-mkconfig -o /boot/grub2/grub.cfg

● On UEFI systems run:

# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 21
Afterwards a reboot is required. In a scale-out environment, those changes have to be done on every server of
the landscape.

See Chapter 24. Working with the GRUB 2 Boot Loader in the RHEL7 Administrators Guide for more
information on how to manage GRUB2 on RHEL7.

For more information on setting C-States, see the following Red Hat KnowledgeBase article: What are CPU "C-
states" and how to disable them if needed? (Red Hat Customer Portal login required).

3.13 Increase the Maximum Number of Processes a User is


Allowed to Run

Depending on the workload and the hardware, SAP HANA might need to start a large amount of processes.

In most cases the maximum number of processes for the sapsys group therefore isn't sufficient. The solution is
to create the file /etc/security/limits.d/99-sapsys.conf with the following content:

@sapsys soft nproc unlimited


@sapsys hard nproc unlimited

By default, RHEL for SAP HANA is configured to prevent so-called fork bombs. The fact that the group sapsys
can now create an unlimited number of processes can be a potential security issue.

After making this change all processes of users belonging to the sapsys group need to be terminated and the
users must log out and back in for the new setting to take effect.

To verify that the new limit is active log in as a user belonging to the sapsys group and run the following
command:

# ulimit -u
unlimited

3.14 Disable ABRT, Core Dumps and kdump

All crashes of SAP HANA are normally analyzed by SAP support, they don't rely on operating system
mechanisms for crash reporting.

So to avoid delays when a Linux kernel crash or a core dump occurs it is possible to disable the application
crash and core file handling of the operating system.

The ABRT service, which handles application crashes can be disabled with the following commands:

# systemctl disable abrtd


# systemctl disable abrt-ccpp
# systemctl stop abrtd
# systemctl stop abrt-ccpp

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
22 PUBLIC Manual Preparation of the OS
Do the same with core file creation. To disable core dumps for all users, open /etc/security/limits.conf,
and add the lines:

* soft core 0
* hard core 0

By default RHEL7 enables the kernel crash dump facility (kdump ), which can result in longer outages when
there is a Linux kernel crash. Because the system tries to have a memory dump that can help to analyze what
caused the kernel to crash. If you would like to avoid these long outages, it is possible to disable kdump with
the following commands:

# systemctl stop kdump.service


# systemctl disable kdump.service

If kdump should be enabled for support purposes, keep it enabled. Have a look at the following Red Hat
Customer Portal article for more information about kdump: How to troubleshoot kernel crashes, hangs, or
reboots with kdump on Red Hat Enterprise Linux (Red Hat Customer Portal login required).

3.15 Firewall Configuration

To protect your SAP HANA servers from unauthorized access it can be beneficial to configure the built in
firewall of the OS to only allow access via the ports that SAP HANA used for communication.

To configure the firewall you can use the firewall-config tool. In this case you will need an X11 System to
display the GUI version or you can use the command line firewall-config-cmd tool.

To avoid problems with the firewall during installation it can be disabled completely with the following
commands:

# systemctl stop firewalld


# systemctl disable firewalld

3.15.1 Calculation of the Ports Used

SAP HANA uses several ports for different purposes. Most of these ports have to be calculated on the base of
the instance number.

For more information, refer to the TCP/IP Ports of All SAP Products.

For the following ports a database with the instance 99 is used to illustrate the calculation:

Schema Calculated Description


port

3xx09 39909 Administration port for SAP HANA

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 23
Schema Calculated Description
port

1128 – 1129 1128-1129 SAP HANA Studio

5xx13 - 5xx14 59913 - 59914

43xx 4399 Company Network

80xx 8099

3xx15 39915 SAP HANA Studio + Replication

3xx17 39917

3xx01 39901 Primary Site for Clustering

3xx07 39907

3.15.2 Common Networks

When you create the firewall make sure to ask the customer in which different networks he will need the
services.

As a base you can take the list of usual networks from the table below. These networks are also used in the
sample kickstart script:

Network Purpose Remark

Administration Administer the SAP HANA setup Only administrators should have access

Client-Network Work with the database Normal users have access

Replication-Network Replication Services and other instances Network for instances that SAP HANA is auto­
matically replicated to

Primary-Network Cluster communication between nodes Used for building clusters

Company-Network Network to access the SAP HANA database


from inside the company

3.15.3 Configure the Firewall

For every network you have to add the rules with the calculated port number. In contrast to RHEL6, do not use
iptables. The command firewall-cmd should be used instead. It controls the whole firewall infrastructure
provided by the kernel.

To determine the current status of the firewall use the following:

# firewall-cmd --state

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
24 PUBLIC Manual Preparation of the OS
If it is stopped, start and enable it with:

# systemctl enable firewalld


# systemctl start firewalld

To check out the current zone and interfaces it is working on use:

# firewall-cmd --get-active-zone

List the open ports with:

# firewall-cmd –-list-ports

When using firewall-cmd to configure the firewall, stateful firewall rules are created by default. One of the
most interesting new features in RHEL7 is the possibility to create services. So multiple ports used by SAP
HANA can be grouped together inside an appropriate service configuration file. The following configuration
reflects our example used for an instance number of 99. So we create the file /etc/firewalld/services/
hana.xml:

<?xml version="1.0" encoding="utf-8"?>


<service>
<short>SAP HANA</short>
<description>Firewall rules for SAP HANA</description>
<port port="39909" protocol="tcp"/>
<port port="1128" protocol="tcp"/>
<port port="1129" protocol="tcp"/>
<port port="4399" protocol="tcp"/>
<port port="8099" protocol="tcp"/>
<port port="59913" protocol="tcp"/>
<port port="59914" protocol="tcp"/>
<port port="39915" protocol="tcp"/>
<port port="39917" protocol="tcp"/>
<port port="39901" protocol="tcp"/>
<port port="39907" protocol="tcp"/>
<destination ipv4="192.168.0.33"/>
</service>

Ensure that the permission of the file /etc/firewalld/services/hana.xml are set as 0640. The service
should be added to the respective zone and firewalld should be reloaded. Here we are using zone public:

# chmod 0640 /etc/firewalld/services/hana.xml


# firewall-cmd --zone=public --add-service=hana --permanent
# firewall-cmd --reload

See the section Using Firewalls in the RHEL7 security guide for more information.

See section Network Security in the SAP HANA Security Guide for more information on how to secure the
networks used by your SAP HANA system.

Related Information

SAP HANA Server Installation and Update Guide


SAP HANA TDI - Storage Requirements
SAP HANA Security Guide
IBM Knowledege Center

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Manual Preparation of the OS PUBLIC 25
SAP HANA on IBM Power Systems and IBM System Storage - Guides
SAP Note 2382421 - Optimizing the Network Configuration on HANA- and OS-Level

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
26 PUBLIC Manual Preparation of the OS
4 SAP HANA Installation

The following chapters show some examples of how to install SAP HANA. As long as it is not stated otherwise,
the names of the volume groups, users and paths mentioned in this chapter are examples only and should be
replaced to fit the needs of the OEM.

For detailed instructions, see the SAP HANA Server Installation and Update Guide.

4.1 Preparation

Before you can install SAP HANA the installation environment has to be prepared. The following tables list the
requirements to be able to perform a SAP HANA installation:

System Requirements for Installation

Object Task Remark

Logical volume Create 128 GiB logical volume Space to store the SAP HANA installer
temporarily

SAP HANA Requirements for Installation

Object Task Remark

SAP archiver Download from SAP Support Portal Only use the latest version

SAP HANA installer Download from SAP Support Portal Only use the latest version

Installer path Previously created logical volume Space required for installer

Data path Previously created logical volume Space to install SAP HANA

Log path Previously created logical volume Space to store log information

SAP HANA system ID ID to identify the SAP HANA database Has to be identical for all instances run­
ning in a clustered environment

Instance number Identification number for a SAP HANA Has to be unique in a clustered environ­
instance running on a host ment or if multiple instances running on
the same host

System usage Specify the application area of the in­


stalled instance

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
SAP HANA Installation PUBLIC 27
Object Task Remark

SAP HANA administrator data UNIX user information for the SAP Usual information found in /etc/
HANA administration user passwd (uid, gid, home directory and
path to a shell)

Passwords Passwords for different users See Appendix C – Sample XML Pass­
word File for Unattended SAP HANA In­
stallation [page 42] for a list of pass­
words to use and their functions

Before starting the SAP HANA installation make sure that the OS itself is installed as described in the Manual
Preparation of the OS [page 9] section and all preconditions from the tables above are fulfilled.

The official SAP HANA installation packages and utilities can be downloaded from the SAP Support Portal .
They are available in the form of a SAR-archives which can be extracted using SAPCAR.

To extract the SAP HANA installation packages create temporary space for the SAP HANA installer. Assumed
values:

● LV name: lv_install
● LV VG: vg00
● LV size: 128 GiB
● LV mount point: /install

# lvcreate -L128G -n lv_install vg00


# mkfs -t xfs /dev/vg00/lv_install
# mount /dev/vg00/lv_install /install

Note
Instead of using a local directory the SAP HANA installation files can also be mounted via NFS.

Move the SAPCAR binary downloaded from the SAP Support Portal to the /install directory and make sure
it is executable (SAPCAR_XXX.EXE is used in this example):

# mv <Path to downloaded installer>/SAPCAR_XXX.EXE /install/sapcar


# chmod a+x /install/sapcar

Move the SAR-Archive for the SAP HANA installation to /install as well and then extract it:

# mv <Path to downloaded installer>/<HANA_Archive>.SAR /install


# cd /install
# ./sapcar -manifest SIGNATURE.SMF -xvf <HANA_Archive>.SAR

When the archive is extracted a new directory SAP_HANA_DATABASE/ is created inside the /install
directory.

It is crucial for the HDB Life Cycle Manager (LCM) to check each file in this directory for correctness. So the file
SIGNATURE.SMF must be placed in the SAP_HANA_DATABASE directory as well:

# mv SIGNATURE.SMF SAP_HANA_DATABASE/

When starting the installation make sure to have the following information available:

● System ID (SID)

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
28 PUBLIC SAP HANA Installation
● Instance number
● Usage type
● Instance admin password
● Linux account data of the instance admin
○ Home directory
○ UID
○ Default shell
○ GID
● SYSTEM user password

For information about troubleshooting, see the SAP Note 2078425 - Troubleshooting note for SAP HANA
platform lifecycle management tool hdblcm.

Related Information

SAP Support Portal


SAP HANA Server Installation and Update Guide
SAP Note 2078425 - Troubleshooting note for SAP HANA platform lifecycle management tool hdblcm

4.2 SAP HANA Installation Examples

The SAP HANA database lifecycle manager (HDBLCM) tools install or update the underlying components of
the SAP HANA platform.

4.2.1 Interactive Command Line SAP HANA Installation


Using HDBLCM

To start an interactive command line installation run the following commands:

# cd /install/SAP_HANA_DATABASE
# ./hdblcm --action=install

HDBLCM will ask for the required information via command line prompts. At the end of the installation
HDBLCM will show the path to the log file where detailed information about the installation process can be
found.

For a detailed description of how to install an SAP HANA system, see SAP HANA Server Installation and Update
Guide.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
SAP HANA Installation PUBLIC 29
4.2.2 Interactive Installation of SAP HANA Using
HDBLCMGUI

An alternative to the command line installation is to use of the graphical variant of the SAP HANA Lifecycle
Manager.

To be able to run it some parts of the GNOME Desktop environment must be installed on the system. Check the
list of packages in Appendix A – Required Packages for SAP HANA on RHEL7 [page 39] to verify that all
required packages are installed to be able to run the graphical installer.

Change to the installation directory and launch the installer with:

# cd /install/SAP_HANA_DATABASE
# ./hdblcmgui

For a detailed description how to install an SAP HANA system, see SAP HANA Server Installation and Update
Guide.

4.2.3 Unattended Installation Using hdblcm

The SAP HANA Lifecycle Manager can also be used for unattended SAP HANA installations.

The SAP HANA Server Installation and Update Guide explains the process in detail. In our case, we use the
following command line:

# cat /root/password.xml | /tmp/__installer.HDB/hdblcm \


--read_password_from_stdin=xml \
--sid=ANA --number=00 \
--sapmnt=/sapmnt/shared \
--datapath=/sapmnt/data \
--logpath=/sapmnt/log \
--shell=/bin/bash \
--hostname=$(hostname) \
-b --system_usage=test \
--autostart=1 \
--components=server \
--system_usage=test \
--timezone=CET \
--max_mem=827052 \
[--db_mode=single_container]

In this example, SAP HANA is installed the same way as the one installed using the GUI. The unattended
installation method can be used within RHEL kickstart installations or other scripted installation methods.

For a complete guide to all parameters, see the SAP HANA Server Installation and Update Guide.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
30 PUBLIC SAP HANA Installation
4.2.4 Scale-Out Installation

For SAP HANA Scale-Out setups follow the guidelines as you do for a single machine, but choose Distributed
system instead of Single-host system in the graphical installation using hdblcmgui. When prompted provide
the names of the additional hosts.

When performing a command-line scale-out SAP HANA installation using hdblcm use the --addhosts option
to specify the additional host of the scale-out landscape (refer to section SAP HANA Server Installation and
Update Guide for more information).

Since the standard SSH mechanism used by hdblcm for scale-out installations doesn’t work on some RHEL
releases (refer to the Red Hat Knowledge Base article SAP HANA Multi host install fails with the message
"LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE , unable to exchange encryption keys" for more information)
it is recommended for RHEL7 to configure SAP HostAgent with SSL communication on all hosts of the scale
out landscape before starting the installation.

To use SAP Host Agent as the communication mechanism between hosts, do the following:

● Install SAP Host Agent on all hosts of the SAP HANA scale-out landscape (see SAP Note 1031096 -
Installing Package SAPHOSTAGENT)
● Configure SSL communication between the SAP HostAgents as described in Configuring SSL for SAP Host
Agent on UNIX
● Run hdblcm[gui] using the option --remote_execution=saphostagent

For more information, see Using SAP Host Agent to Execute Platform LCM Tasks in the SAP HANA Server
Installation and Update Guide.

Related Information

SAP HANA Server Installation and Update Guide


SAP Note 1031096 - Installing Package SAPHOSTAGENT
Using SAP Host Agent to Execute Platform LCM Tasks
SAP HANA Multi host install fails with the message "LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE , unable to
exchange encryption keys"

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
SAP HANA Installation PUBLIC 31
5 Automated RHEL and SAP HANA
Installation Using Kickstart

You can perform an automated RHEL and SAP HANA installation using Kickstart.

To automate the installation of RHEL for SAP HANA and SAP HANA itself the Kickstart mechanism provided
by the RHEL installer can be used. Using tools like Red Hat Satellite and PXE it is possible to fully automate the
installation process.

If you have no PXE Environment to pass the necessary network information to the kernel, it is also possible to
start an automated kickstart installation using a RHEL7 installation media:

● Insert the boot DVD.


● When the boot menu from the DVD shows up, select Update or install ...
● Press the <TAB>-Key to get to the command prompt.
● Add the following parameters:
○ ksdevice=<Ethernet interface or link>, for example
○ ksdevice=link (for the first network device with a link)
○ ksdevice=eth3
○ ks=<method and URL to the Kickstart file>, for example
○ ks=https://192.168.0.200/kickstart.php?instance=01&sid=RHT
○ ks=http://192.168.0.200/hana.cfg
○ ip=<IP Address>, for example
ip=192.168.0.101
○ netmask=<Netmask>, for example
netmask=255.255.255.0
○ gateway=<Gateway address>, for example
Gateway=192.168.0.1

The installation of RHEL for SAP HANA and SAP HANA should execute automatically until the point where you
have to accept the SAP HANA EULA (End User License Agreement).

5.1 Description of the Sample Kickstart File for Installing


SAP HANA on RHEL 7.x

This section describes the kickstart file provided as a sample in Appendix D – Sample Kickstart File [page 42].

For detailed information on how to set up Kickstart to automate the installation of RHEL, see the chapter
Kickstart Installations in the RHEL7 Installation Guide .

The first part of the file contains the partition scheme using XFS for the logical volumes dedicated for SAP
HANA.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
32 PUBLIC Automated RHEL and SAP HANA Installation Using Kickstart
Some additional repositories and packages need to be included for the installation of SAP HANA (see
comments in the file).

● Only the base package group will be installed to keep the footprint as small as possible.
● The %pre-section comprises a small routine for presenting the EULA to the customer.
● ○ If the customer accepts it, the OS and application are installed.
If the EULA is rejected, the installation process is aborted immediately and the machine is rebooted.
○ Additional vendor specific dialogs or settings can be added via additional %pre sections. There can be
as many additional sections as you want, they are all executed serially before the Installation begins.
○ The second %pre-script calculates the size of the logical volumes reserved for SAP HANA according to
the requirements of SAP HANA. It writes an include file to /tmp, which in turn is included in the install
section for partitioning.

There can be more than one %post-sections present in a kickstart file. They include the following:

● First, all necessary services are enabled, others disabled.


● New software repositories are written to enable the installation of additional products later on. The
SERVER variable needs to be modified by the OEM.
● The IPv6 protocol is disabled by executing /bin/true, whenever the kernel tries to load the appropriate
module.
● Create the file /etc/resolv.conf. The variables DOMAIN, DNS1 and DNS2 need to be modified by the
OEM.
● The network interfaces and the udev numbering are defined. If the kickstart process uses DHCP/PXE, the
network parameters used here must be the ones used later on. All parameters must be set by the OEM.
Avoid network directive using fixed IP on the kernel command line when using DHCP/PXE.
● Set the hostname. In a real environment, this could also be obtained using DNS/BIND.
The SAP HANA installer expects the short version of the hostname without the domain (no FQDN).
● Modify the file /etc/hosts. This is crucial for the SAP HANA installer to work. It is up to the OEM to set
the array index of IPADDR properly here.
● Because a proper time synchronization is crucial for SAP HANA to work, NTP is configured. The clock is
synchronized initially to avoid clock skew when the service is started. The OEM must choose the right NTP
server here.
● Set a symbolic link in /usr/lib64 from the latest version of libssl. This is a prerequisite for the version
of SAP HANA tested as by 20/03/2014.
● Install SAP HANA in the unattended mode:
○ First, a tarball and the file password.xml must be copied to the local machine. The variable SERVER
holds the ip address of the machine where these come from and must be modified by the OEM.
○ Then SAP HANA is installed in unattended mode with the following command:

# cat /root/password.xml | /tmp/SAP_HANA_DATABASE/hdblcm \


--read_password_from_stdin=xml \
--sid=ANA --number=00 \
--sapmnt=/hana/shared \
--datapath=/hana/data \
--logpath=/hana/log \
--shell=/bin/bash \
--hostname=$(hostname) \
-b --system_usage=test \
--autostart=1 \
--components=server \
--system_usage=test \
--timezone=CET \
--max_mem=827052

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Automated RHEL and SAP HANA Installation Using Kickstart PUBLIC 33
○ The instance (--sid option) must be changed by the OEM to meet the needs of the customer.
○ The parameter --max_mem limits the overall memory usage of SAP HANA.
○ For the explanation of all options, change to the installation directory and refer to:

# ./hdblcm --action=install --help

○ You can ignore the checks done by the SAP HANA installer (e.g. to install on virtual Systems) by
appending ignore statements to the previous line:
○ --ignore=check_hardware
○ --ignore=check_min_mem
○ As shown above, the installer can be provisioned with a password file. The file password.xml needs
the following layout and entries:

<?xml version="1.0" encoding="UTF-8"?>


<Passwords>
<password>Passw0rd</password>
<sapadm_password>Passw0rd</sapadm_password>
<system_user_password>Passw0rd</system_user_password>
<root_password>redhat</root_password>
</Passwords>

○ In the XML file replace the values for the following tags accordingly:
○ password
○ sapadm_password
○ system_user_password
○ root_password
See Appendix C – Sample XML Password File for Unattended SAP HANA Installation [page 42] for an
example.
○ For details on setting kernel parameters for SAP HANA, see Linux Kernel Parameters in the SAP HANA
Server Installation and Update Guide.

Always check your kickstart file after modifying it. This can be done with:

# yum -y install pykickstart


# ksvalidator </var/www/html/hana.cfg>

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
34 PUBLIC Automated RHEL and SAP HANA Installation Using Kickstart
5.2 Example Kickstart Process

The kickstart process can be initiated using PXE or with a physical or virtual DVD. When the system boots, the
user will see a selection of options provided in this example by the PXE server.

Leave this menu item selected and press <TAB>.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Automated RHEL and SAP HANA Installation Using Kickstart PUBLIC 35
Now, some kernel command line parameters can be appended:

● ks=http://<install server>/hana.cfg
● ksdevice=<HANA network interface>
● ip=<HANA network address>
● netmask=<HANA netmask>
● gateway=<HANA gateway>

As mentioned above, these parameters must be equal to the ones defined persistently for the SAP HANA
interface defined in the kickstart file in the postinstall section, Part 1.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
36 PUBLIC Automated RHEL and SAP HANA Installation Using Kickstart
6 Operating System Maintenance

Regarding the operating system maintenance several aspects have to be taken into account.

6.1 Changes to OS configuration

To guarantee optimal performance and the highest stability, SAP appliance hardware and technology partners
may deliver SAP HANA systems with operating system settings that deviate from the standard as outlined in
the SAP HANA Master Guide and SAP HANA Server Installation and Update Guide.

Also customers may want to change the configuration of the operating system of the SAP HANA appliance, for
example, in order to apply additional customer-specific security hardening settings or to install additional
software required for the operation of SAP HANA in customer environments.

SAP permits such changes to configuration parameters of the Operating System that deviate from the patterns
- as described above - unless these changes are listed in SAP Note 1731000 - Configuration changes that are
not recommended. The changes described in this note have caused problems in customer environments or in
the laboratories of SAP or SAP HANA appliance hardware and technology partners.

Changes to operating system parameters are permitted only with the agreement of the corresponding
hardware and operating system suppliers of your SAP HANA appliance. Customers and partners are advised to
document all changes to the standard patterns so that SAP support can more efficiently identify the root cause
of problems. In case administration was outsourced to 3rd party service provider, the provider should first
consult with the hardware support provider before changing any settings in the operating system.

For the latest information, see SAP Note 1730999 - Configuration changes to SAP HANA system and the SAP
Notes referenced in it.

6.2 Maintenance / Patching

The customer is generally responsible for implementing operating system patches. If the customer has a
special agreement with the hardware or technology partner, support for operating system patching may be the
responsibility of the corresponding partner.

The initially delivered configuration of the appliance's operating system should persist. If configuration settings
are subsequently changed, problems may occur, for example in regards to performance. The customer can
request a validation of configuration changes for the operating system and for the installation of additional
operating system components by the hardware partner depending on the service contract between the
hardware partner and the customer. The hardware partner then supports these changes and additional
components in accordance with the existing service contract with the customer.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Operating System Maintenance PUBLIC 37
OS security patches that have been released by the OS vendor may be installed immediately after they are
available. However, the original packages of the distributors must be used, to which a customer is entitled to
within the framework of a valid support contract with the distributor or an authorized OEM.

For all other operating system patches, the customer should wait until they are released as part of RHEL minor
releases. These minor releases shall be downloaded and applied to the SAP HANA system only according to
agreements with SAP and the respective hardware partner. In particular, any updates related to kernel or
runtime libraries (glibc) need to be validated and approved by SAP beforehand. OS minor releases are certified
by SAP to check the performance and functionality. We support minor OS releases that have been certified by
SAP.

OS major releases that have been verified by SAP may be deployed at any time.

On rare occasions, SAP might require a certain operating system patch to be implemented. In this case SAP
strongly recommends to not change configuration settings unless explicitly stated in the corresponding SAP
release note. SAP will state any dependencies in the relevant SAP Note published when a revision is released
which requires such modifications.

6.3 Support

If errors occur in any software component of SAP HANA, SAP is the main point of contact.

SAP distributes all issues within the support organization by default, as is the case for other SAP applications.
To investigate SAP HANA related problems, SAP support requires a support connection to all servers in the
SAP HANA landscape. For more information about how to establish a service connection for SAP HANA, see
SAP Note 1635304 - Central note for HANA support connections.

Red Hat offers enhanced support for customers who are using “RHEL for SAP HANA” and “RHEL for SAP
Solutions”. Red Hat Enterprise Linux for SAP Solutions offers customers a “Premium” SLA with 24x7 support,
and a “Standard” SLA with 12x5 support. For mission-critical production environments, “Premium” SLA is
recommended. And for non-production use like DEV and QA, we recommend matching the same support level
as the hardware vendor and SAP have. For example, if a hardware vendor requires Premium support for the
hardware, even for non-production environments, we recommend having the Premium SLA for RHEL for SAP
Solutions. For more information refer to the SAP Note 2526952 - Red Hat Enterprise Linux for SAP Solution.

This support offer facilitates communication and ensures high quality.

If the customer has defined special support agreements with the hardware or technology partner (such as
special Service Level Agreements), the customer should contact the corresponding partner directly in the case
of obvious hardware or operating system issues.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
38 PUBLIC Operating System Maintenance
7 Appendix

The appendix provides additional information.

7.1 Appendix A – Required Packages for SAP HANA on


RHEL7

The following packages have to be installed on RHEL for SAP HANA 7 as a dependency for SAP HANA. Without
these packages, the installation is likely going to fail.

These packages are in the usual RHEL for SAP HANA 7.x channels for the base installation:

● cairo (vector graphics library, needed for supportability)


● expect
● krb5-workstation
● krb5-libs
● libcanberra-gtk2
● libaio
● libicu
● libpng12
● libssh2
● libtool-ltdl
● ntp
● ntpdate
● numactl
● openssl
● PackageKit-gtk3-module
● rsyslog
● sudo
● tcsh
● xorg-x11-xauth
● xulrunner

The following packages are required for SAP HANA components that are not SAP HANA server (database)
components:

● gtk2 (only required if the graphical SAP HANA installation tools hdblcmgui and hdbsetup are used)
● krb5-libs.i686 (only required if the 32-bit SAP HANA client is going to be installed; this is not necessary for
a standard SAP HANA installation)

For supportability it might be necessary to install the following packages:

● graphviz (graph visualization tools)

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Appendix PUBLIC 39
● iptraf-ng (TCP/IP network monitor)
● lm_sensors (hardware health monitoring for Linux)
● nfs-utils (support utilities for NFS)

If you plan to use OFED (OpenFabrics Enterprise Distribution) for your HANA setup the following packages
need to be installed as well:

● gcc
● glib2
● glibc-devel
● glib2-devel
● kernel-devel
● libstdc++-devel
● redhat-rpm-config
● rpm-build
● zlib-devel

7.2 Appendix B – SAP HANA Tuned Profiles OS


Modifications

As documented in chapter Activate SAP HANA Specific Tuned Profiles [page 18] the appropriate tuned profile
must be activated on servers running SAP HANA to ensure that the system meets the performance
requirements given by SAP. The following table lists the OS settings that are modified by the profiles.

The following tables list the OS settings that are modified by the profiles:

sap-hana (based on standard tuned throughput-performance profile)


Setting Description

kernel.numa_balancing=0 Disable NUMA balancing in Linux kernel (only in version


2.7.0-1.el7 and later of tuned-profiles-sap-hana)

force_latency=70 Set the CPU DMA latency to 70 (only in version


2.7.1-3.el7_3.3 and later for RHEL 7.3 of tuned-profiles-sap-
hana; previous versions set “force_latency=1”)

governor=performance Set the CPU frequency scaling governor to performance

energy_perf_bias=performance Set a policy where performance is paramount. The pro­


cessor will be unwilling to sacrifice any performance for the
sake of energy saving

min_perf_pct=100 Limit the minimum P state that will be requested by the


driver stated as a percentage of the max (non-turbo) per­
formance level; 100 means that CPU will run on max. per­
formance

transparent_hugepages=never Disable the usage of THP

kernel.sem=1250 256000 100 8192 Increase the default Semaphore limits of the kernel

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
40 PUBLIC Appendix
Setting Description

readahead=4096 Set disk read ahead to 4096 blocks

kernel.sched_min_granularity_ns=10000000 Set minimal preemption granularity for CPU-bound tasks to


10000000 ns

kernel.sched_wakeup_granularity_ns=15000000 Set wakeup/sleep latencies to 15000000 ns

vm.dirty_ratio=40 Set percentage for start of dirty data write back to 40

vm.dirty_background_ratio=10 Start background write back at 10%

vm.swappiness=10 Set tendency for swapping to 10

sap-hana-vmware (based on standard tuned throughput-performance profile)


Setting Description

kernel.numa_balancing=0 Disable NUMA balancing in Linux kernel (only in version


2.7.0-1.el7 and later of tuned-profiles-sap-hana)

force_latency=1 Lock the processor into C1-state for the duration the profile
is in force

governor=performance Set the CPU frequency scaling governor to performance

energy_perf_bias=performance Set a policy where performance is paramount. The pro­


cessor will be unwilling to sacrifice any performance for the
sake of energy saving

min_perf_pct=100 Limit the minimum P state that will be requested by the


driver stated as a percentage of the max (non-turbo) per­
formance level; 100 means that CPU will run on max. per­
formance

transparent_hugepages=never Disable the usage of THP

kernel.sem=1250 256000 100 8192 Increase the default Semaphore limits of the kernel

readahead=4096 Set disk read ahead to 4096 blocks

kernel.sched_min_granularity_ns=10000000 Set minimal preemption granularity for CPU-bound tasks to


10000000 ns

kernel.sched_wakeup_granularity_ns=15000000 Set wakeup/sleep latencies to 15000000 ns

vm.dirty_ratio=40 Set percentage for start of dirty data write back to 40

vm.dirty_background_ratio=10 Start background write back at 10%

vm.swappiness=30 Set tendency for swapping to 30

The sap-hana-vmware tuned profile also disables Large Receive Offload (LRO) for eth0 based on VMware
KBase Poor TCP performance might occur in Linux virtual machines with LRO enabled .

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Appendix PUBLIC 41
7.3 Appendix C – Sample XML Password File for
Unattended SAP HANA Installation

Below you can find an example password file for the unattended SAP HANA installation. All passwords are
written in plain text in this file.

To avoid that others are able to gain access to your freshly installed SAP HANA systems by reading the
contents of this file some precautions should be taken:

● Set the access permission of the file as restrictive as possible.


● Remove the file immediately after it is no longer used (by default automatically done by kickstart).
● If used in a kickstart file get that file over a secure transmission path.

The contents of the file should look similar to the following:

<?xml version="1.0" encoding="UTF-8"?>


<Passwords>
<password>XYZABC</password>
<sapadm_password>XYZABC</sapadm_password>
<system_user_password>XYZABC</system_user_password>
<root_password>ZYXCBA</root_password>
</Passwords>

The following explains for which user the password is set and what function the user have. Replace <SID> with
the one you choose for your SAP HANA installation.

Keyword User name Remark

password <sid>adm Operating system administrator of the


SAP HANA system

sapadm_password sapadm SAP host agent user

system_user_password SYSTEM Administrative user for SAP Database

root_password root Linux root user

7.4 Appendix D – Sample Kickstart File

In the box below you find a sample kickstart file for the setup of a SAP HANA suited system.

Make sure to replace all occurrences of the hostnames/IP addresses in this file by the corresponding host
names/IP addresses in your network. Note that in RHEL7 The service NetworkManager can be used in place
of network and so nmcli can be used to persistently configure the network interfaces.

# Sample Kickstart file for automated RHEL nad SAP HANA installations.
install
url --url ftp://192.168.0.254/pub/rhel7/dvd
text
lang en_US.UTF-8
keyboard de-latin1-nodeadkeys
network --onboot no --device eth0 --bootproto dhcp --noipv6 --hostname
pxeclient.example.com

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
42 PUBLIC Appendix
rootpw --iscrypted $6$2F5oFvoOo2rbhKJL
$dn2hYW3cPE6OFaxP3lLD.kkSQ1U5COINoKYUT0VuTuZpRmz.ckJfP5XcTJAc5I6OWASUxSe/
Tf2QbN6arA6m//
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --disabled
timezone --utc Europe/Berlin
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
zerombr
clearpart --all
reboot
part /boot --fstype=xfs --size=1024 --ondisk=/dev/vda
part pv.00 --size=10240 --grow --ondisk=/dev/vda
part pv.01 --size=10240 --grow --ondisk=/dev/vdb
volgroup vg00 --pesize=4096 pv.00
volgroup vg01 --pesize=4096 pv.01
logvol swap --name=lv_swap --vgname=vg00 --grow --size=1024 --maxsize=1024 --
fstype=xfs
logvol / --fstype=ext4 --name=lv_root --vgname=vg00 --grow --size=8192 --
fstype=xfs
#logvol /usr/sap --fstype=ext4 --name=lv_usr_sap --vgname=vg00 --grow --
size=51200 --fstype=xfs
logvol /hana --fstype=xfs --name=lv_hana --vgname=vg01 --grow --size=10240 --
fstype=xfs

%packages
@base
@x11
@graphical-admin-tools
@internet-browser
vsftpd
httpd
tftp-server
syslinux
gtk2
libicu
xulrunner
sudo
tcsh
libssh2
expect
cairo
graphviz
iptraf
krb5-workstation
krb5-libs
nfs-utils
lm_sensors
rsyslog
openssl
PackageKit-gtk3-module
libcanberra-gtk2
libtool-ltdl
xorg-x11-xauth
numactl
%end

%post --interpreter /bin/bash


# Change runlevel and disable services
systemctl set-default graphical.target
systemctl disable kdump
systemctl disable rhsmcertd
systemctl disable network
systemctl enable ntpd

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Appendix PUBLIC 43
# Set the repository to point to the PXE-server
cat > /etc/yum.repos.d/rhel.repo << EOF
[rhel]
name=Red Hat Enterprise Linux Server
baseurl=ftp://192.168.0.254/pub/rhel7/dvd
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
EOF
cat > /etc/yum.repos.d/rhel-sap.repo << EOF
[rhel-sap]
name=Red Hat Enterprise Linux for SAP HANA
baseurl=ftp://192.168.0.254/pub/rhel7/sap
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
EOF
# Define the network interface in DHCP mode
systemctl start NetworkManager
systemctl enable NetworkManager
nmcli con add type ethernet con-name eth0 ifname eth0
%end

%post --interpreter /bin/bash


# Disable IPv6
echo >> "install ipv6 /bin/true" > /etc/modprobe.d/noipv6.conf
%end

# Configuration of the network time protocol (NTP)


%post --interpreter /bin/bash
NTP=192.168.0.254

cat > /etc/ntp.conf << EOF


driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server ${NTP}
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
EOF

# Set the time manually


systemctl stop ntpd
ntpdate 192.168.0.254
systemctl start ntpd
%end

# Create a link because hdbnsutil crashes otherwise


%post --interpreter /bin/bash
ln -s /usr/lib64/libssl.so.1.0.1e /usr/lib64/libssl.so.1.0.1
ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8
ln -s /usr/lib64/libcrypto.so.1.0.1e /usr/lib64/libcrypto.so.1.0.1
%end

# Get password.xml and the database software. Extract it.


%post --interpreter /bin/bash
SERVER=192.168.0.1
ARCHIVE=IMDB_SERVER100_112_1-10009569.SAR
SAPCAR=SAPCAR_617-80000935.EXE
PASSWORD=/root/password.xml
wget ftp://${SERVER}/pub/hana/password.xml -O ${PASSWORD}
chmod 400 ${PASSWORD}
mkdir -p /hana/install
cd /hana/install
wget ftp://${SERVER}/pub/hana/${ARCHIVE}
wget ftp://${SERVER}/pub/hana/${SAPCAR}

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
44 PUBLIC Appendix
chmod +x ${SAPCAR}
./${SAPCAR} -manifest SIGNATURE.SMF -xvf ${ARCHIVE}
mv SIGNATURE.SMF SAP_HANA_DATABASE
#mount -t nfs4 -o ro ${SERVER}:/install /mnt
%end

# Install the HANA database software


%post --interpreter /bin/bash
cat /root/password.xml | /hana/install/SAP_HANA_DATABASE/hdblcm --
read_password_from_stdin=xml --sid=ANA \
--number=00 --sapmnt=/hana/shared --datapath=/hana/data --logpath=/hana/log --
shell=/bin/bash \
--hostname=$(hostname) -b --system_usage=test --autostart=1 --components=server
--system_usage=test \
--timezone=CET
%end

# Clean up
%post --interpreter /bin/bash
rm -f /root/password.xml
rm -fr /hana/install
%end

7.5 Appendix E – Installation in a Virtual Machine (VMware)

SAP HANA in combination with RHEL for SAP HANA 7.x can be installed in a virtual machine operated by a
VMware Hypervisor.

The following prerequisites must be fulfilled:

● The underlying hardware must be certified by SAP's ICC for SAP HANA
● Do not use memory compression techniques like KSM.
● The maximum memory reserved for the virtual machines should not exceed 90% of the physical memory
of the hypervisor.
● SAP HANA needs the full instruction set of the host CPU(s), therefore the latest VM Hardware version
supported by the ESXi should/must be used
● For monitoring and system management purposes the open-vm-tools packages provided as part of
RHEL 7 must be installed and running as well.
● To obtain the best manageability, use the paravirtualization drivers included in RHEL 7.x for SAP HANA
instead of PCI passthrough (VT-d).
● For performance reasons, the SAP HANA file systems should reside on separate VMDK files.

Refer to the following documentation for further details:

● SAP Note 1995460 - Single SAP HANA VM on VMware vSphere in production


● SAP Note 2024433 - Multiple SAP HANA VMs on VMware vSphere in production
● VMware Best Practices on SAP HANA

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Appendix PUBLIC 45
Important Disclaimers and Legal Information

Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:

● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:

● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.

● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such
links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.

Beta and Other Experimental Features


Experimental features are not part of the officially delivered scope that SAP guarantees for future releases. This means that experimental features may be changed by
SAP at any time for any reason without notice. Experimental features are not for productive use. You may not demonstrate, test, examine, evaluate or otherwise use
the experimental features in a live operating environment or with data that has not been sufficiently backed up.
The purpose of experimental features is to get feedback early on, allowing customers and partners to influence the future product accordingly. By providing your
feedback (e.g. in the SAP Community), you accept that intellectual property rights of the contributions or derivative works shall remain the exclusive property of SAP.

Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.

Gender-Related Language
We try not to use gender-specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.

Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
46 PUBLIC Important Disclaimers and Legal Information
Red Hat Enterprise Linux (RHEL) 7.x Configuration Guide for SAP HANA
Important Disclaimers and Legal Information PUBLIC 47
go.sap.com/registration/
contact.html

© 2018 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP SE
or an SAP affiliate company. The information contained herein may
be changed without prior notice.
Some software products marketed by SAP SE and its distributors
contain proprietary software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company
for informational purposes only, without representation or warranty
of any kind, and SAP or its affiliated companies shall not be liable for
errors or omissions with respect to the materials. The only
warranties for SAP or SAP affiliate company products and services
are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein
should be construed as constituting an additional warranty.
SAP and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks of
SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the
trademarks of their respective companies.
Please see https://www.sap.com/about/legal/trademark.html for
additional trademark information and notices.

You might also like