All Products
Search
Document Center

Cloud Storage Gateway:Manage NFS shares

Last Updated:Sep 21, 2026

Cloud Storage Gateway (CSG) acts as a Network File System (NFS) server, letting clients on your local network access shared storage on the gateway like a local file. This topic explains how to create, disable, modify, and delete NFS shares on the on-premises file gateway console.

Prerequisites

  1. A cache has been added. For more information, see Add a cache.

  2. Cloud resources have been bound. For more information, see Manage cloud resources.

How NFS shares work

Network File System (NFS) allows computers to share files over a TCP/IP network. CSG acts as an NFS server. Before clients can access a share, you must create it on the gateway, specify which clients can connect, and configure their access permissions.

Install an NFS client

Install an NFS client on each client machine that will mount the share.

  1. Log on to the client machine.

  2. Run the installation command for your operating system.

    • Ubuntu:

      apt-get install nfs-common
    • CentOS:

      yum install -y nfs-utils

    For other operating systems, see the official NFS documentation.

Create an NFS share

  1. In a web browser, enter https://<IP address of your file gateway> to access the on-premises console for the file gateway.

  2. Enter your username and password, and then click OK.

  3. Select NFS and click Create.

  4. In the Create NFS Share dialog box, configure the following parameters, and then click OK.

    Parameter

    Description

    Share name

    The virtual path for the NFS protocol.

    For NFSv4, you can mount the share directly by using this name. For NFSv3, you must run the showmount -e <gateway IP address> command to obtain the virtual path.

    Read/write client IPs

    The IP addresses or CIDR blocks of clients granted read/write access to the NFS share.

    Example: 192.168.10.10 or 192.168.0.0/24. You can enter multiple IP addresses or CIDR blocks.

    The IP addresses or CIDR blocks of clients granted read-only access to the NFS share.

    Example: 192.168.10.10 or 192.168.0.0/24. You can enter multiple IP addresses or CIDR blocks.

    Read-only client IPs

    User mapping

    Sets the mapping between users on the NFS client and users on the NFS server.

    Note

    This parameter is configurable only when the Protocol is set to NFS.

    • none: An NFS client user is not mapped to the nobody user on the NFS server.

    • root_squash: Restricts the root user. When an NFS client accesses the share as the root user, the client is mapped to the nobody user on the NFS server.

    • all_squash: Maps all users from an NFS client to the nobody user on the NFS server.

    • all_anonymous: Maps all users from an NFS client to the NFS server's anonymous user.

    Enable

    Enable the NFS share.

    To disable the NFS share, select No.

    Mode

    Includes cache mode and replication mode.

    • Replication mode: All data is saved in two copies: one in the offline cache and the other in OSS.

    • Cache mode: Caches all metadata and frequently accessed user data locally. OSS retains the complete dataset.

    Reverse Sync

    Synchronizes metadata from OSS back to a local environment. This applies to gateway disaster recovery, data recovery, and data sharing scenarios.

    Note

    A reverse sync operation scans all objects in a bucket. This process incurs OSS API request fees if the bucket contains a large number of objects.

    Bucket Name

    Select the created Bucket.

    Path prefix

    Enter the path prefix in the bucket.

    Path prefixes support only English letters and numbers.

    Note

    Starting from version 1.0.38, you can mount the root directory of a file system to a specific path prefix in an OSS bucket to facilitate access isolation.

    The path prefix can be an existing directory or a new directory in the OSS bucket. After the share is created, this path prefix will serve as the root directory, and all subsequent files and directories will be created under it.

    Using a metadata disk

    Using a metadata disk separates the data disk from the metadata disk. The metadata disk is used to store metadata for shared folders.

    • If you select Yes, you must select the corresponding metadata disk and data disk.

    • If you select No, you must select the corresponding cache disk.

    Note

    Only whitelisted users can use this feature.

    Ignore Deletion

    File deletions are not synchronized to OSS to prevent accidental operations. OSS retains the complete dataset.

    NFS v4 optimization

    Improves upload efficiency for NFSv4 mounts. After you enable this option, you can no longer mount by using NFSv3.

    Synchronization Delay

    Set Sync Delay. This setting delays file uploads for a period of time after the files are closed to prevent frequent offline modifications from creating OSS fragments. The default value is 5 s, and the maximum value is 120 s.

    Maximum Write Speed

    The maximum write speed is 1280 MB/s. The default value is 0, which indicates that the speed is unlimited.

    Maximum Upload Speed

    The maximum upload speed is 1280 MB/s. The default value is 0, which indicates no speed limit.

    Note

    When speed is limited, the maximum upload speed cannot be less than the maximum write speed.

    Fast Cache Reclaim

    Real-time cache reclamation is suitable for backup-only cloud scenarios.

  5. Click Confirm to create the share.

Manage existing NFS shares

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

Actions

Description

Disable an NFS share

To disable all NFS shares on the gateway, turn off the switch in the upper-left corner of the NFS page.

You can also disable shares individually.

To do so, find the share on the NFS page, click Settings, and set Enabled to No.

Delete an NFS share

On the NFS page, find the target share and click Delete.

Note

If a share is mounted on a client when you delete it, there is a short delay before the mount point is unmounted. If you create a new NFS share with the same ID during this delay, the original mount point will not be unmounted. After deleting a share, run the df -h command on the client to confirm that the mount point is removed before you create another share with the same name.

Modify an NFS share

On the NFS page, find the target share, and click Settings or Advanced Settings to modify it.

Next steps

Access an NFS share