Skip to main content
NetApp solutions for SAP

Contributors netapp-mschoen

Multiple hosts setup

This chapter describes the setup of a 2+1 SAP HANA multiple host system as example.

LUN configuration for SAP HANA multiple-hosts systems

The Linux LVM is being used to increase performance and to address LUN size limitations.

At the SAP HANA host, volume groups and logical volumes need to be created and mounted, as indicated in the following table.

Logical volume (LV) Mount point at SAP HANA host Note

LV: FC5_data_mnt00001-vol

/hana/data/FC5/mnt00001

Mounted using storage connector

LV: FC5_log_mnt00001-vol

/hana/log/FC5/mnt00001

Mounted using storage connector

LV: FC5_data_mnt00002-vol

/hana/data/FC5/mnt00002

Mounted using storage connector

LV: FC5_log_mnt00002-vol

/hana/log/FC5/mnt00002

Mounted using storage connector

External NFS share: FC5_shared

/hana/shared

Mounted at all hosts using NFS and /etc/fstab entry

Note SAP HANA multiple-host systems require the /hana/shared file system connected to all hosts of a system. Usually this is a NFS share provided by by an NFS server.
It is recommended to use a high available NFS server e.g. such as an NetApp FAS ot AFF system. Another option is to use the build-in NFS server of a LINUX host for this.
Note With the described configuration, the /usr/sap/FC5 directory in which the default home directory of user FC5adm is stored, is on the local disk for each HANA host. In a disaster recovery setup with disk-based replication, NetApp recommends using four additional LUNs for /usr/sap/FC5 file system each host so that each database host has all its file systems on the central storage.

Create LVM volume groups and logical volumes

  1. Initialize all LUNs as a physical volume.

    pvcreate /dev/mapper/svm1-FC5_data_mnt00001_1
    pvcreate /dev/mapper/svm1-FC5_data_mnt00001_2
    pvcreate /dev/mapper/svm1-FC5_data_mnt00002_1
    pvcreate /dev/mapper/svm1-FC5_data_mnt00002_2
    pvcreate /dev/mapper/svm1-FC5_log_mnt00001_1
    pvcreate /dev/mapper/svm1-FC5_log_mnt00001_2
    pvcreate /dev/mapper/svm1-FC5_log_mnt00002_1
    pvcreate /dev/mapper/svm1-FC5_log_mnt00002_2
  2. Create the volume groups for each data and log partition.

    vgcreate FC5_data_mnt00001 /dev/mapper/svm1-FC5_data_mnt00001_1 /dev/mapper/svm1-FC5_data_mnt00001_2
    vgcreate FC5_data_mnt00002 /dev/mapper/svm1-FC5_data_mnt00002_1 /dev/mapper/svm1-FC5_data_mnt00002_2
    vgcreate FC5_log_mnt00001 /dev/mapper/svm1-FC5_log_mnt00001_1 /dev/mapper/svm1-FC5_log_mnt00001_2
    vgcreate FC5_log_mnt00002 /dev/mapper/svm1-FC5_log_mnt00002_1 /dev/mapper/svm1-FC5_log_mnt00002_2
  3. Create a logical volume for each data and log partition. Use a stripe size that is equal to the number of LUNs used per volume group (in this example, it is two) and a stripe size of 256k for data and 64k for log. SAP only supports one logical volume per volume group.

    lvcreate --extents 100%FREE -i 2 -I 256k --name vol FC5_data_mnt00001
    lvcreate --extents 100%FREE -i 2 -I 256k --name vol FC5_data_mnt00002
    lvcreate --extents 100%FREE -i 2 -I 64k --name vol FC5_log_mnt00002
    lvcreate --extents 100%FREE -i 2 -I 64k --name vol FC5_log_mnt00001
  4. Scan the physical volumes, volume groups, and vol groups at all other hosts.

modprobe dm_mod
pvscan
vgscan
lvscan
Note If these commands do not find the volumes, a restart is required.

To mount the logical volumes, the logical volumes must be activated. To activate the volumes, run the following command:

vgchange -a y

Create file systems

Create the XFS file system on all data and log logical volumes.

mkfs.xfs FC5_data_mnt00001-vol
mkfs.xfs FC5_data_mnt00002-vol
mkfs.xfs FC5_log_mnt00001-vol
mkfs.xfs FC5_log_mnt00002-vol

Create mount points

Create the required mount point directories, and set the permissions on all worker and standby hosts:

sapcc-hana-tst:/ # mkdir -p /hana/data/FC5/mnt00001
sapcc-hana-tst:/ # mkdir -p /hana/log/FC5/mnt00001
sapcc-hana-tst:/ # mkdir -p /hana/data/FC5/mnt00002
sapcc-hana-tst:/ # mkdir -p /hana/log/FC5/mnt00002
sapcc-hana-tst:/ # mkdir -p /hana/shared
sapcc-hana-tst:/ # chmod –R 777 /hana/log/FC5
sapcc-hana-tst:/ # chmod –R 777 /hana/data/FC5
sapcc-hana-tst:/ # chmod 777 /hana/shared

Mount file systems

To mount the /hana/shared file systems during system boot using the /etc/fstab configuration file, add the /hana/shared file system to the /etc/fstab configuration file of each host.

sapcc-hana-tst:/ # cat /etc/fstab
<storage-ip>:/hana_shared /hana/shared nfs rw,vers=3,hard,timeo=600, intr,noatime,nolock 0 0
Note All the data and log file systems are mounted through the SAP HANA storage connector.

To mount the file systems, run the mount –a command at each host.