Formatting the Disks Attached to an NFS Server

Scenarios

If you use SFS Turbo to provide shared file storage, skip this section.

The disks attached to an NFS server must be formatted to comply with the SAP system installation requirements.

This section uses the formatting of backup and SBD volumes as an example. The shared volume on the active NFS server planned for the SAP NetWeaver system needs to be bound to the standby NFS server and then be formatted. For details about how to format disks, see section Formatting the Disks Attached to an NFS Server.

Procedure

  1. Bind the shared disk to the standby NFS server.

    This operation is performed only when two NFS servers are deployed to work in active/standby mode. The reason is as follows: When one NFS server is created, the shared volume is attached to it. The volume must be attached to the other NFS server.

    1. Log in to the management console, click Service List and choose Computing > Elastic Cloud Server.
    2. According to the ECS name, locate the ECS where the NFS server with disks attached is deployed and click the ECS name.
    3. On the page displayed for the ECS details, click the Disks tab and then the first data disk.
    4. In the expanded data disk pane, take note of the Device Name and click the link following the data disk ID.
    5. On the displayed page, click Attach. The Attach Disk page is displayed.
    6. On the page, select the ECS used by the NFS server to be bound, and ensure that Mount Point bound to the ECS is the same as Device Name in 1.d.
    7. Repeat 1.b to 1.f to attach all disks to the NFS server.

  2. Format the disks attached to the active NFS server.

    1. Log in to the active NFS server.
    2. Run the following command to check the disks that are not formatted:

      Determine the backup volume based on the disk size.

      fdisk -l

    3. Create partitions for the SBD volume.

      Assume that /dev/sdd is the drive letter of the SBD volume.

      fdisk /dev/sdd

      The following information is displayed:

      Command (m for help):

      1. Enter n and press Enter to create partitions.
      2. Press Enter until the following information is displayed:
        ....
        Using default value 209715199
        
        Command (m for help):
      3. Enter w and press Enter.
    4. Create partitions for the backup volume.

      The following commands assume that /dev/sdb is the drive letter of the backup volume.

      parted /dev/sdb mklabel gpt y

      parted /dev/sdb mkpart primarty 0% 100%

    5. Set the file system of the created partition. Run the following command to set the file system format of the created partition to ext3:

      mkfs -t ext3 /dev/sdb1

      Run the partprobe command on the standby NFS server to update its partition table.

  3. Run the following command to create the /backup directory:

    mkdir /backup

    You also need to create the /backup directory on the standby NFS server.

  4. Configure both the active and standby NFS servers and restart them.

    1. Open the /etc/sysconfig/nfs file and enter the editing mode to configure the ports of the NFS servers.

      vi /etc/sysconfig/nfs

    2. Configure the ports as follows.

      ....

      MOUNTD_PORT="4002"

      ....

      STATD_PORT="4000"

      ....

      LOCKD_TCPPORT="4001"

      ....

      LOCKD_UDPPORT="4001"

    3. Open the /etc/exports file.

      The purpose of editing the file is to share the disks on NFS servers to all SAP HANA nodes.

      vi /etc/exports

    4. Add shared records of all SAP HANA nodes.

      The format is Shared directoryHosts that can access the shared directory (option).

      Assume that the IP address of the server or backup plane of SAP HANA nodes is 10.0.3.2.

      /backup 10.0.3.2(rw,sync,no_root_squash,no_subtree_check)

    5. Run the following command to restart the NFS server:

      systemctl restart nfsserver

    6. Run the following command to make the configuration in the /etc/exports file take effect:

      exportfs -a

    7. Run the following command to check whether the shared directory is successfully set. If the directory information is displayed in the command output, the setting is successful.

      showmount -e

    8. Run the following command to disable the automatic startup of the NFS server. Perform this operation on both the active and standby NFS servers.

      systemctl disable nfsserver