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 shared, 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
- 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.
- Log in to the management console, click Service List and choose Computing > Elastic Cloud Server.
- According to the ECS name, locate the ECS where the NFS server with disks attached is deployed and click the ECS name.
- On the page displayed for the ECS details, click the Disks tab and then the first data disk.
- In the expanded data disk pane, take note of the Device Name and click the link following the data disk ID.
- On the displayed page, click Attach. The Attach Disk page is displayed.
- 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.
- Repeat 1.b to 1.f to attach all disks to the NFS server.
- Format the disks attached to an NFS server.
- Log in to the active NFS server.
- Run the following command to check the disks that are not formatted:
Determine the disk type (shared, backup, or SBD volume) according to the disk size.
fdisk -l
- 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):
- Enter n and press Enter to create partitions.
- Press Enter until the following information is displayed:
....
Using default value 209715199
Command (m for help):
- Enter w and press Enter.
- Create partitions for the shared and backup volumes.
The following commands assume that /dev/sdb and /dev/sdc are the drive letters of shared and backup volumes, respectively.
parted /dev/sdb mklabel gpt y
parted /dev/sdb mkpart primarty 0% 100%
parted /dev/sdc mklabel gpt y
parted /dev/sdc mkpart primarty 0% 100%
- Set the file system of the created partition. The file system format of the shared volume is xfs, and that of the backup volume is ext3.
mkfs -t xfs /dev/sdb1
mkfs -t ext3 /dev/sdc1
Run the partprobe command on the standby NFS server to update its partition table.
- Create the /shared and /backup directories.
mkdir /backup
mkdir /shared
You also need to create the /shared and /backup directories on the standby NFS server.
- Configure both the active and standby NFS servers and restart them.
- Open the /etc/sysconfig/nfs file and enter the editing mode to configure the ports of the NFS servers.
vi /etc/sysconfig/nfs
- Configure the ports as follows.
....
MOUNTD_PORT="4002"
....
STATD_PORT="4000"
....
LOCKD_TCPPORT="4001"
....
LOCKD_UDPPORT="4001"
- 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
- 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.
/shared 10.0.3.2(rw,sync,no_root_squash,no_subtree_check)
/backup 10.0.3.2(rw,sync,no_root_squash,no_subtree_check)
- Run the following command to restart the NFS server:
systemctl restart nfsserver
- Run the following command to make the configuration in the /etc/exports file take effect:
exportfs -a
- 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
- 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
- Open the /etc/sysconfig/nfs file and enter the editing mode to configure the ports of the NFS servers.
Last Article: Installing SAP HANA (Cluster Deployment)
Next Article: Configuring HA on NFS Servers
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.