Updated on 2023-05-29 GMT+08:00

Creating a File System

  1. Run the fdisk -l command to check the unformatted disks.
  2. Format disks and logical volumes.

    mkfs.xfs /dev/vdb

    mkfs.xfs /dev/vdc

    mkfs.xfs /dev/vde

    Create a file system directory.

    mkdir -p /usr/sap /hana/log /hana/data /hana/share

    Run the blkid command to obtain the UUID of the disk.

    Create mount points in /etc/fstab.

    echo "UUID=662******81dbf9783 /usr/sap xfs defaults 0 0" >>/etc/fstab

    echo "UUID=0c5********19734f /hana/log xfs defaults 0 0" >>/etc/fstab

    echo "UUID=3ae******05166 /hana/share xfs defaults 0 0" >>/etc/fstab

  3. Create LVM volumes.

    Run the following commands:

    pvcreate /dev/vdd /dev/vde

    vgcreate vghana /dev/vdd /dev/vde

    vgdisplay vghana

    lvcreate -i 2 -l 100%VG -n lvhanadata vghana

    mkfs.xfs /dev/mapper/vghana-lvhanadata

    uuid3=`blkid /dev/mapper/vghana-lvhanadata | awk '{print $2}'|awk -F"\"" '{print $2}'`

    echo "UUID=$uuid3 /hana/data xfs defaults 0 0" >> /etc/fstab

    Run the mount -a command to mount all disks and run the df -h command to check the disk mounting results.