Help Center> Scalable File Service> Getting Started> Example: Mounting an NFS File System to ECSs
Updated on 2024-01-03 GMT+08:00

Example: Mounting an NFS File System to ECSs

  • A Scalable File Service (SFS) file system can be created and mounted to multiple servers. This allows for shared access to the same file system from multiple servers.
  • Before creating a file system, make that a VPC and ECSs are available, and the ECSs are in this VPC. If the ECSs are not in this VPC, communication between SFS Turbo and the ECSs can be established using VPC peering connections.
  • This guide describes how to establish the shared file storage for a company using SFS.

Step 1: Log In to the Console

  1. Log in to the Huawei Cloud console. In the service list, click Scalable File Service under Storage.

    Figure 1 Logging in to the SFS console

  2. Select the region where the ECSs are deployed. A file system can be mounted to an ECS only when they are in the same region and VPC. In this example, select CN-Hong Kong.

    Figure 2 Selecting a region

  1. This company has purchased ECSs in the CN-Hong Kong region.
  2. All the company's ECSs are in the vpc-3114 VPC.
  3. For the detailed creation procedure, see Create a File System.

Step 2: Create a File System

  1. Click Create File System.

    Figure 3 Creating a file system

  2. On the displayed page, configure file system parameters and click Create Now.

    Figure 4 Configuring parameters

  1. You are advised to select the same AZ as the ECSs.
  2. You can view existing VPCs or create a new VPC.
  3. For the detailed creation procedure, see Create a File System.

Step 3: Mount the File System

  1. Log in to an ECS. You can log in to an ECS using the console or a remote access tool (such as PuTTY).

    Figure 5 Logging in to an ECS

  2. Run rpm -qa|grep nfs to check whether the NFS client is installed on the ECS.

    Figure 6 Checking whether the NFS client is installed

  3. Run mkdir Local path to create a local path. Then run mount -t nfs -o vers=3,timeo=600,noresvport,nolock,tcp Mount point Local path to mount the file system. Run mount -l to check whether the file system is successfully mounted.

    Figure 7 Mounting the file system

  1. You can copy the shared path from the file system details page on the console.
  2. If information similar to "IP address on /local_path type nfs (rw,vers=3,timeo=600,nolock,addr=)" is returned, the file system is mounted successfully.
  3. For details about the creation procedure, see Mounting an NFS File System to ECSs (Linux).