This topic describes how to manage Network File System (NFS) shares in the local file gateway console, including how to create, delete, close, and modify NFS shares.

Prerequisites

  1. You have added a cache disk to the gateway. For more information, see Add a cache disk.
  2. You have bound the cloud resources. For more information, see Bind a cloud resource.

Background information

NFS enables computers in a network to share resources over TCP/IP communications. In a scenario where NFS is applied, the local client directly reads files from and writes files to the remote NFS server.

Cloud Storage Gateway (CSG) operates like an NFS server and provides the file sharing service. Before you can use a shared directory, you must create a shared directory on the CSG, set the users that are allowed to access the shared directory, and set access permissions.

Install an NFS client

Before you create an NFS share, you must install an NFS client on the client.

  1. Log on to the client.
  2. Use the following command to install the NFS client.

    This topic describes how to install NFS clients in Ubuntu and CentOS. For more information about how to install NFS clients for other operating systems, see the official NFS documentation.

    • If you are using Ubuntu, run the following command.
      sudo apt-get install nfs-common
    • If you are using CentOS, run the following command.
      yum install -y nfs-utils

Create an NFS share

Click NFS, and click Create.

Other supported operations

On the NFS page, you can also perform the following operations.

Operation Description
Disable NFS sharing On the NFS page, you can click the button on the upper-left side of the page to disable NFS sharing.

If you want to disable a single NFS share, you can use the following method.

On the NFS page, find the target NFS share. Click Settings, and set Enabled to No.

Delete an NFS share On the NFS page, find the target NFS share, and click Delete to delete the NFS share.
Note If the NFS share has been previously mounted to a client, it takes some time for the mount point to be unmounted from the client after the share is deleted. During this period, if you create an NFS share with the same ID, the mount point will not be unmounted from the client. Therefore, after you delete an NFS share, run the df -h command to confirm that the file is successfully unmounted before you perform other operations.
Modify an NFS share On the NFS page, find the target NFS share, and click Settings or Advanced Settings to modify the NFS share.

What to do next

Access NFS shares