Skip to main content
NetApp solutions for SAP

Contributors netapp-mschoen

Single host setup

This chapter describes the setup of an SAP HANA single host using Linux LVM.

LUN configuration for SAP HANA single-host systems

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

Logical volume/LUN Mount point at SAP HANA host Note

LV: FC5_data_mnt0000-vol

/hana/data/FC51/mnt00001

Mounted using /etc/fstab entry

LV: FC5_log_mnt00001-vol

/hana/log/FC5/mnt00001

Mounted using /etc/fstab entry

LUN: FC5_shared

/hana/shared/FC5

Mounted using /etc/fstab entry

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. In a disaster recovery setup with disk-based replication, NetApp recommends creating an additional LUN within the FC5_shared volume for the /usr/sap/FC5 directory so that all file systems are on the central storage.

Create LVM volume groups and logical volumes

  1. Initialize all LUNs as a physical volume.

    pvcreate /dev/mapper/hana-FC5_data_mnt00001
    pvcreate /dev/mapper/hana-FC5_data2_mnt00001
    pvcreate /dev/mapper/hana-FC5_log_mnt00001
    pvcreate /dev/mapper/hana-FC5_log2_mnt00001
  2. Create the volume groups for each data and log partition.

    vgcreate FC5_data_mnt00001 /dev/mapper/hana-FC5_data_mnt00001 /dev/mapper/hana-FC5_data2_mnt00001
    vgcreate FC5_log_mnt00001 /dev/mapper/hana-FC5_log_mnt00001 /dev/mapper/hana-FC5_log2_mnt00001
  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 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 and the hana shared LUN.

mkfs.xfs /dev/mapper/FC5_data_mnt00001-vol
mkfs.xfs /dev/mapper/FC5_log_mnt00001-vol
mkfs.xfs /dev/mapper/svm1-FC5_shared

Create mount points

Create the required mount point directories, and set the permissions on the database host:

sapcc-hana-tst:/ # mkdir -p /hana/data/FC5/mnt00001
sapcc-hana-tst:/ # mkdir -p /hana/log/FC5/mnt00001
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 file systems during system boot using the /etc/fstab configuration file, add the required file systems to the /etc/fstab configuration file:

# cat /etc/fstab
/dev/mapper/hana-FC5_shared /hana/shared xfs defaults 0 0
/dev/mapper/FC5_log_mnt00001-vol /hana/log/FC5/mnt00001 xfs relatime,inode64 0 0
/dev/mapper/FC5_data_mnt00001-vol /hana/data/FC5/mnt00001 xfs relatime,inode64 0 0
Note The XFS file systems for the data and log LUNs must be mounted with the relatime and inode64 mount options.

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