1. Help Center
  3. User Guide (Single Node)
  4. Deployment
  5. Installing SAP HANA (Single-Node Deployment with HA Required)
  6. Formatting a Disk

Formatting a Disk

In single-node deployment scenarios, the data volumes of SAP HANA nodes can be used only after they are formatted and attached to required directories.


  1. Log in to an SAP HANA node.

    Use PuTTY to log in to the NAT server with an elastic IP address bound. Ensure that user root and the key file (.ppk file) are used for authentication. Then, use SSH to switch to the SAP HANA nodes.

  2. Check the disks that have not been formatted.

    Run the following command to query the disks to be formatted:

    fdisk -l

    Determine the disks of the /usr/sap volumes, data volumes, log volumes, shared volumes, and swap volumes according to the disk capacity.

  3. Run the following command to create a disk directory:

    mkdir -p /hana/log /hana/data /hana/shared /hana/backup /usr/sap

  4. Create and enable the swap partition. dev/xvdf is used as an example.

    mkswap /dev/xvdf

    swapon /dev/xvdf

  5. Format disks and logical volumes. dev/xvdbdev/xvdcdev/xvdd, and dev/xvde are used as examples.

    mkfs.xfs /dev/xvdb

    mkfs.xfs /dev/xvdc

    mkfs.xfs /dev/xvdd

    mkfs.xfs /dev/xvde

  6. Write disk attaching relationships into the /etc/fstab file.

    1. Run the following command to check the UUID of the disk:


    2. Obtain the shared path in Creating an SFS File SystemPublicCloudAddress:/share-d6c6d9e2 is used as an example.
    3. Write the attaching relationships between the disk UUID and shared path to the /etc/fstab file. UUID is used as an example here.

      echo "UUID=ba1172ee-39b2-4d28-89b8-282ebabfe8f4 /hana/data xfs defaults 0 0" >>/etc/fstab

      echo "UUID=d21734c9-44c0-45f7-a37d-02232e97fd3b /hana/log xfs defaults 0 0" >>/etc/fstab

      echo "UUID=191b5369-9544-432f-9873-1beb2bd01de5 /hana/shared xfs defaults 0 0" >>/etc/fstab

      echo "UUID=5591b568-6324-475d-9654-1e97fbd02eba /usr/sap xfs defaults 0 0" >>/etc/fstab

      echo "UUID=1b569544-1225-44c0-4d28-2e97fdeb2bd swap swap defaults 0 0" >> /etc/fstab

      echo "PublicCloudAddress:/share-d6c6d9e2 /hana/backup nfs noatime,nodiratime,rdirplus,vers=3,wsize=1048576,rsize=1048576,noacl,nocto,proto=tcp,async 0 0" >>/etc/fstab

  7. Run the following command to attach all disks:

    mount -a

  8. Format disks of the other ECS.

    Switch to the other SAP HANA node using SSH and format disks of the node by repeating Step 2 to Step 7.