Special requirements apply to configuring the persistence (data and log) of an SAP HANA VM.
To achieve maximum SAP HANA scalability and performance for four HANA VMs on the P-Series models, we recommend using Linux Logical Volume Manager (LVM) devices for the SAP HANA persistence. LVM enables a striping of the logical volumes across multiple vSAN devices, which provides better performance and flexible administration. If capacity adjustments are required, LVM also enables resizing of logical volumes.
Note: Using Linux LVM is optional. Use it to achieve maximum scalability and performance. Single devices can also be created for each SAP HANA VM that match the required capacity for data and log files and are formatted for XFS.
The following sections provide step-by-step instructions for configuring the SAP HANA persistence on Linux LVM devices.
A VMware best practice is to use a dedicated SCSI controller for the SAP HANA data and log devices. Configure the SCSI controller as VMware Paravirtual. The example shown in the following figure uses SCSI Controller 0 for the system device, SCSI Controller 1 for the LVM data devices, and SCSI Controller 2 for the LVM log devices:
Use the SAP Quick Sizer tool to determine the required capacity for the SAP HANA data and log devices.
If the sizing details are not available, configure the sizes of the data and log devices based on the memory size of the SAP HANA VM. For data, configure 2 x RAM. For log, configure 0.5-1 x RAM (512 GB maximum).
Add the capacity of the data and the log device to get the total capacity required for the SAP HANA persistence of the VM.
Define a storage policy for the SAP HANA physical devices that are deployed on the vSAN data store. While the default vSAN storage policy is adequate for the system device, the SAP HANA persistence devices must have a dedicated storage policy to meet the SAP performance requirements. The following figure shows the rules that we defined in the storage policy for the SAP HANA persistence:
The vSAN storage policy requirements are:
Note: With RAID 1, each storage object has two replicas.
The optimal number depends on the number of available disk groups and capacity disks. The minimum (default) is 1 and the maximum is 12.
Linux LVM distributes the logical volumes that the application uses across multiple physical devices, in this case, vSAN devices. We recommend distributing the persistence for the data device across eight physical devices and distributing the persistence for the log device across four physical devices.
In the following example, we need 500 GB capacity for the SAP HANA data device and 200 GB for the SAP HANA log device, giving a total of 700 GB for the SAP HANA persistence. We therefore create eight 62 GB vSAN devices for data and four 52 GB devices for log.
Note: Using Linux LVM enhances performance but is optional. Single devices matching the required capacity can be created for data and log files and formatted for XFS for each SAP HANA VM.
Every volume uses the VM storage policy HANA PERSISTENCE and is assigned to the dedicated SCSI controller, as shown in the following figure:
After the devices have been added to the VM, perform the following steps in Linux to partition the devices and add them to LVM:
cat fdin.txt | fdisk /dev/sdb
This command creates LVM partitions on the devices, for example, /dev/sdb1. The partitions can be used as physical devices in LVM.
Repeat this command for every device that you create for the SAP HANA persistence.
pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1
vgcreate hana-data /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1
vgcreate hana-log /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1
lvcreate --name data --size 500G --stripes 8 --stripesize 64 hana-data
lvcreate --name log --size 200G --stripes 4 --stripesize 64 hana-log
mkfs.xfs /dev/mapper/hana--data-data and mkfs.xfs /dev/mapper/han--log-log
mount /dev/mapper/hana-data /hana/data and mount /dev/mapper/hana-log /hana/log