Skip to main content

Mount a NFS file system on an ECS instance

Procedure

fg-dc-nas-3.2.1-1

  1. Log in to ECS (Linux system).
  2. Install Client for NFS.
  • If you use CentOS, Redhat , and Aliyun Linux operating systems, run the command: sudo yum install nfs -utils
  • If you use the Ubuntu or Debian operating system, run the command:
    • sudo apt-get update
    • sudo apt-get install nfs -common
  1. Mount the NFS file system.

    You can refer to the command to mount the NFS file system, where " file-system-id.region.nas.aliyuncs.com :/ / mnt " should be replaced according to the actual situation.

  • If you want to mount the NFSv4 file system, refer to the command:
    • sudo mount -t nfs -o vers= 4.0,minorversion =0,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id.region.nas.aliyuncs.com : // mnt.
  • If you want to mount the NFSv3 file system, refer to the command:
    • sudo mount -t nfs -o vers= 3,nolock ,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport file-system-id.region.nas.aliyuncs.com : // mnt.
  1. Execute the mount -l command to view the mount results.
    If the echo contains similar information as follows, the mount is successful.
    fg-dc-nas-3.2.1-2
    After the mount is successful, you can also view the current capacity information of the file system through the df -h command.
  2. After the mount is successful, you can access the NAS file system on ECS to perform read or write operations.
    You can access and use the NAS file system as a common directory, for example: fg-dc-nas-3.2.1-3