Formatting the Disks Attached to an NFS Server
Scenarios
If you use SFS Turbo to provide shared file storage, skip this section.
Format the shared volume planned for SAP NetWeaver on the NFS server to meet the requirements for installing the SAP NetWeaver system.
Procedure
- Log in to the active NFS server.
- Run the following command to query the disk to be formatted:
fdisk -l
Information similar to the following is displayed:
... Disk /dev/sde doesn't contain a valid partition table
- Format the disk and attach it to the specified directory based on information provided in Table 4.
Run the following command to format the disk (taking the dev/sde disk as an example):
fdisk /dev/sde
The following information is displayed:
Command (m for help):
- Enter n and press Enter to create partitions.
Information similar to the following is displayed:
... Command action e extended p primary partition (1-4)
- Enter p and press Enter.
Creating a primary partition is used as an example.
Information similar to the following is displayed:
Partition number (1-4, default 1):
- Enter the primary partition ID and press Enter.
Primary partition ID 1 is used as an example.
Information similar to the following is displayed:
... First sector (2048-259715199, default 2048):
- Press Enter.
The default start cylinder number is used as an example.
Information similar to the following is displayed:
... Using default value 2048 Last sector, +sectors or +sizeM or +size{K,M,G}(2048-259715199, default 2048):Press Enter.
The default end cylinder number is used as an example.
Information similar to the following is displayed:
.... Using default value 209715199 Command (m for help):
- Enter w and press Enter.
Enter the partition result into the partition table to complete partition creation.
- Create partitions sde2 and sde3 as required.
Run the partprobe command on the standby NFS server to update the partition table of the standby node.
- Run the following commands to create file systems on partitions:
mkfs.ext3 /dev/sde1
mkfs.ext3 /dev/sde2
mkfs.ext3 /dev/sde3
Formatting the disk requires a period of time. During this time, observe the system running status and do not exit disk formatting.
- Run the following commands to create directories:
mkdir /sapmnt
mkdir -p /usr/sap/A01/SYS
mkdir /sapcd
You also need to create directories on the standby NFS server.
- Run the following commands to attach the volumes to corresponding directories:
mount /dev/sde1 /sapmnt
mount /dev/sde2 /usr/sap/A01/SYS
mount /dev/sde3 /sapcd
- Run the following commands to create file systems on partitions:
- Open the /etc/exports file.
Edit the file to share the volumes on the NFS server to the active and standby ASCS nodes.
vi /etc/exports
Add the shared records of the active and standby ASCS nodes.
/sapmnt 10.0.5.11(rw,sync,no_root_squash,no_subtree_check) /usr/sap/A01/SYS 10.0.5.11(rw,sync,no_root_squash,no_subtree_check) /sapcd 10.0.5.11(rw,sync,no_root_squash,no_subtree_check) /sapmnt 10.0.5.12(rw,sync,no_root_squash,no_subtree_check) /usr/sap/A01/SYS 10.0.5.12(rw,sync,no_root_squash,no_subtree_check) /sapcd 10.0.5.12(rw,sync,no_root_squash,no_subtree_check)
Run the following command to make the /etc/exports configurations take effect:
exportfs -a
Run the following command to restart the NFS server:
systemctl restart nfsserver
Run the following command to check the NFS server status:
service nfsserver status
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
Last Article: Installing SAP NetWeaver
Next Article: Attaching NFS Server Volumes
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.