This topic describes how to install a Network File System (NFS) client in Linux and run the mount command to mount an NFS file system.

Prerequisites

The following operations are performed:

Step 1: Install an NFS client

Before you mount an NFS file system on a Linux Elastic Compute Service (ECS) instance, install an NFS client.

Step 2: Mount an NFS file system

You can use the domain name of the file system or the mount target to mount the NFS file system on the ECS instance. The domain name of the file system is translated to the IP address of the mount target in the zone where the ECS instance resides.

Mount the NFS file system.

The following table lists the parameters in the mount command.

Parameter Description
file-system-id.region.nas.aliyuncs.com:/ /mnt <Domain name of the mount target>:<Name of the shared directory> <Path of the mount directory>. Replace the domain name of the mount target, the name of the shared directory, and the path of the mount directory based on your business requirements.
  • The domain name of the mount target: The format is file-system-id.region.extreme.nas.aliyuncs.com. To view the ID and region of a file system, log on to the NAS console, find the target file system, and then click Management. On the page that appears, you can view the ID and region of the file system.
  • The name of the shared directory: specify the root directory (/) or a subdirectory. If you specify a subdirectory, for example, /share, make sure that the subdirectory exists.
  • The path of the mount directory: specify the root directory (/) or a subdirectory in the server, for example, a Linux ECS instance. If you specify a subdirectory, for example, /mnt, make sure that the subdirectory exists.
vers The protocol version of the file system.

NFSv3 and NFSv4 are supported.

Mount options

Multiple mount options are available when you mount a file system. For more information, see the following table.