Operating System Best Practice Configuration

SAP

Audience
Public
Product
FlashBlade
FlashArray
FlashStack
FlashBlade > Purity//FB
FlashArray > Purity//FA
Technology Integrations
SAP
Source Type
Documentation

Set the kernel parameter "elevator=noop" for virtual machines. This will avoid causing unnecessary overhead.

For SLES see SLES KB 7009616 (applies to all versions of SLES).

For RHEL see DOC 5428.

Note:

If the Operating System being used for SAP HANA is SLES for SAP Applications 12 SP4 or later or RHEL for SAP Applications 8 or later it is recommended to use the "none" io scheduler.

To enable none as an IO scheduler in SLES follow the below steps:

  1. Edit the /etc/default/grub file and add "scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=y" to GRUB_CMDLINE_LINUX_DEFAULT
    1. GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part2 quiet crashkernel=199M,high crashkernel=72M,low scsi_mod.use_blk_mq=1 elevator=none"
  2. Run the grub2-mkconfig command to ensure the new bootloader options are applied on the next reboot.
    1. grub2-mkconfig -o /boot/grub2/grub.cfg
  3. Reboot the system.

    To enable non as an IO scheduler in RHEL follow the below steps:

  4. Edit the /etc/default/grub file and add "scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=y " to GRUB_CMDLINE_LINUX_DEFAULT.
    1. GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part2 quiet crashkernel=199M,high crashkernel=72M,low scsi_mod.use_blk_mq=1 elevator=none"
  5. Run the grub2-mkconfig command to ensure the new bootloader options are applied on the next reboot.
    1. grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
  6. Reboot the system.

Format volumes with the xfs filesystem and use UUID identifiers to auto mount at system startup.

To identify device names use lsblk:


lsblk

vHANA01:~ # lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  960G  0 disk
├─sda1   8:1    0    4M  0 part
├─sda2   8:2    0   60G  0 part /
└─sda3   8:3    0    2G  0 part [SWAP]
sdb      8:16   0    1T  0 disk
sdc      8:32   0  512G  0 disk
sr0     11:0    1 1024M  0 rom 

To format the filesystem use the "mkfs.xfs" command with the device location:

Note:

Do not create a partition, instead the filesystem needs to consume the entire disk


vHANA01:~ # mkfs.xfs /dev/sdb
meta-data=/dev/sdb               isize=512    agcount=4, agsize=67108864 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0, rmapbt=0
         =                       reflink=0
data     =                       bsize=4096   blocks=268435456, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=131072, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
vHANA01:~ # mkfs.xfs /dev/sdc
meta-data=/dev/sdc               isize=512    agcount=4, agsize=33554432 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0, rmapbt=0
         =                       reflink=0
data     =                       bsize=4096   blocks=134217728, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=65536, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

To identify the filesystem UUIID for each device use "blkid".

Note:

Using the filesystem UUID to mount the device at startup ensures that if the virtual machine is ever migrated to another datastore or to virtual volumes (vVols) that the device names potentially changing does not become an issue.


blkid 

/dev/sda1: PARTUUID="1d27383e-c2f6-4b21-80d0-4ac2398fba3a"
/dev/sda2: UUID="999955a2-f616-4801-a843-76a0964d47af" TYPE="xfs" PARTUUID="2d9d1eb6-98c0-47cd-8f0e-bafcd4e87769"
/dev/sda3: UUID="2473f274-f269-4f06-b2d3-d933953d0641" TYPE="swap" PARTUUID="f08e0739-bd75-4509-ad59-eb2e459574d5"
/dev/sdc: UUID="133a1bf7-caa5-4424-bda5-0db3e23e568f" TYPE="xfs"
/dev/sdb: UUID="815ec4e5-9b55-4339-b919-ee0d818d9054" TYPE="xfs"

Now use the UUIDs to add the devices and mount points to the /etc/fstab file:


UUID=815ec4e5-9b55-4339-b919-ee0d818d9054       /hana/data      xfs     defaults        0  0
UUID=133a1bf7-caa5-4424-bda5-0db3e23e568f       /hana/log       xfs     defaults        0  0

Execute "mount -a" and then filesystems should mount to the correct locations.


mount -a

Use the df command to ensure everything is mounted correctly:


df

Filesystem                                         Size  Used Avail Use% Mounted on
devtmpfs                                           252G  4.0K  252G   1% /dev
tmpfs                                              380G     0  380G   0% /dev/shm
tmpfs                                              252G   26M  252G   1% /run
tmpfs                                              252G     0  252G   0% /sys/fs/cgroup
/dev/sda2                                           60G  5.2G   55G   9% /
fileserver.puredoes.local:/mnt/nfs/vHANA01_Shared  1.0T  105G  919G  11% /hana/shared
tmpfs                                               51G   24K   51G   1% /run/user/469
tmpfs                                               51G     0   51G   0% /run/user/468
tmpfs                                               51G     0   51G   0% /run/user/0
/dev/sdb                                           1.0T  1.1G 1023G   1% /hana/data
/dev/sdc                                           512G  555M  512G   1% /hana/log

The SAP HANA Platform can be virtualized on VMWare vSphere, this is known as a "vHANA" deployment.