Help Center > > Getting Started> Example: Mounting an NFS File System to ECSs

Example: Mounting an NFS File System to ECSs

Updated at: Jan 10, 2020 GMT+08:00
  • You can create a file system and mount it to multiple ECSs for shared access.

  • Before creating a file system, ensure that at least a VPC and an ECS have been created and the ECS belongs to the created VPC.

  • This document uses the file storage of a company as an example to describe how to implement shared file storage.

Step 1: Log In to SFS Console

1. Log in to HUAWEI CLOUD console. Choose Storage > Scalable File Service.
2. Select the region where the ECS resides in. A file system can be mounted to an ECS only when the file system and ECS belong to the same region and VPC. In this example, Hong Kong is selected. 


1. The company has purchased ECSs in the Hong Kong region.
2. All ECSs of the company belong to the VPC vpc-3114.


Log in to SFS console.

Apply for a VPC.


Select the region.

Apply for an ECS.

View Image

Step 2: Create a File System

1. Click Create File System. In the Create File System dialog box, set parameters for the file system.
2. Read the service agreement and select the checkbox, click Create Now.


1. You are advised to select the same AZ as that of the ECSs.
2. Click View VPC to view detailed information about existing VPCs or apply for a new VPC.


Create a file system.

Select the charging mode.


Set parameters.


View Image

Step 3: Mount the File System

1. Log in to ECS. You can log in to a purchased ECS using the management console or a cross-platform remote access tool (such as PuTTY).
2. Check whether an NFS client is installed on the ECS by running the rpm -qa|grep nfs command.
3. Check whether the domain name of the file system can be parsed on the ECS by running the nslookup Domain name of the file system command.
4. Mount the file system. Make a local directory for mounting the file system by running the mkdir A local directory command. Run the mount -t nfs -o vers=3,timeo=600,nolock Shared path Local directory command to mount the file system. Run the mount -l command to check whether the file system is mounted successfully.


1. You can obtain the file system domain name from the file system shared path.
2. If information similar to " on /local_path type nfs (rw, vers=3, timeo=600, nolock, addr=)" is returned, the file system is mounted successfully.


Log in to ECS.

Obtain the instance's connection address.


Check whether an NFS client is installed on the ECS.

Download and install a client.


Check whether the domain name of the file system can be parsed on the ECS.

Access the cache instance.


Mount the file system.

Read and write cached data.

View Image

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel