This topic describes how to use the Cloud Storage Gateway console to manage shares, such as create and delete shares, and configure NFS and SMB shares.

Prerequisites

  1. You have created a gateway. For more information, see Create a file gateway.
  2. You have added a cache disk to the gateway. For more information, see Add a cache disk.
  3. You have created an Object Storage Service (OSS) bucket. For more information, see Create buckets.
    Note
    • File gateways support OSS buckets of Standard, Infrequent Access (IA), and Archive storage classes.
    • If you do not enable a share to support the Archive storage class when you create the share, to read archives from the buckets, you must restore the archives from these buckets.

Create a share

  1. Log on to the CSG console.
  2. Select the region where the target file gateway is located.
  3. Go to the Gateway Cluster page, find the target file gateway, and then click the name of the gateway to go to the Share tab.
  4. On the Share tab, click Create.
  5. On the Bucket Setting tab, set the following parameters, and click Next.
    Parameter Description
    Allow Cross-region Bucket
    • Yes: specifies that you can access the bucket that stays in the different region from the specified gateway.
    • No: specifies that you can access only the bucket that stays in the same region as the specified gateway.
    Bucket Endpoint Specify the endpoint of the target bucket.
    Bucket Name You can select an existing bucket from the drop-down list, or enter a subdirectory of the target bucket in the Path Prefix field.

    The Path Prefix field supports letters and digits only.

    Note For version 1.0.38 and later, you can map a root directory of the file system to a subdirectory of a bucket to isolate connections and secure data.

    You can specify an existing subdirectory or a subdirectory that does not exist in the bucket. After you create the share, the specified subdirectory works as the root directory, and stores all related files and directories in the follow-up management.

    Encryption Valid values: No Encryption and Server Encryption.

    If you select Server Encryption, you must set the CMK ID parameter. You can log on to the KMS console, and create a key. For more information, see Create a CMK.

    After you enable OSS server encryption, you can provide you own key. The system supports the key imported from Key Management Service (KMS).

    With OSS server encryption enabled, the system automatically uses the imported key to encrypt the files uploaded to OSS through the shared directory. You can call the Get Object API operation to check whether the specified file has been encrypted. In the response header, if the x-oss-server-side-encryption field value is KMS and the x-oss-server-side-encryption-key-id field value is the key ID, this response indicates that the file has been encrypted.

    Note
    • Only the users in a whitelist can use this feature.
    • When you create a key in the KMS console, you must select the same region as the target OSS bucket.
    Connect to Bucket over SSL Specify whether to connect to a bucket over SSL. Valid values: Yes and No.
  6. Click Next to go to the Basic Information tab, set the following parameters, and then click Next.
    Parameter Description
    File Share Name The name of the Network File System (NFS) and Server Message Block (SMB) share that you want to create. If you set the Protocol parameter to NFS, this parameter also specifies the pseudo path of Network File System version 4 (NFSv4).

    The value must be 1 to 32 characters in length, and can contain letters and digits. It cannot start with a digit.

    Note Versions earlier than 1.0.35 do not allow you to mount local directories to shares over NFSv3. You must run the showmount -e <IP address of the target gateway> command to obtain the path for mounting the share to the local directory.
    Protocol Specify the name of the protocol that you use to connect to OSS buckets. Valid values: NFS and SMB.
    • The NFS protocol is applicable to connection to Linux-based OSS resources.
    • The SMB protocol is applicable to connection to Windows-based OSS resources.
    Cache Specify the cache disk that you have created.
    Note For a cache disk of 5 TB or less, 20% of the space is used to store metadata. For a cache disk of 5 TB or more, the space of 1 TB is used to store metadata. For example, if you create a 40 GB cache disk, the actual available cache size is 32 GB. If you create a 20 TB cache disk, the actual available cache size is 19 TB.
    User Mapping

    Map an NFS client user to an NFS server user. This parameter is required only when you set the Protocol parameter to NFS.

    • none: specifies no mapping relationship between an NFS client user and the NFS server user nobody.
    • root_squash: maps only a root user of an NFS client to the NFS server user nobody.
    • all_squash: maps all NFS client users to the NFS server user nobody.
    • all_anonymous: maps all NFS client users to an anonymous NFS server user.
    Advanced Settings Select Advanced Settings to go to the Advanced Settings tab.
  7. On the Advanced Settings tab, set the following parameters, and then click Next.
    Parameter Description
    Cache Mode
    • Replication Mode: specifies that all data is stored with two backups. One backup is stored in a local cache and the other is stored in an OSS bucket.
    • Cache Mode: specifies that all metadata and frequently accessed user data are stored in the local cache. The OSS bucket retains all data.
    Optimize Fragments Specify whether to optimize the performance for some applications that frequently and randomly read and write small amounts of data. You can enable this feature as needed.
    Optimize Upload Release the cache in real time. You can enable this feature when you only synchronize backups to the cloud.
    Enable Remote Sync Refresh metadata stored in an OSS bucket to the local cache. This feature is applicable to such scenarios as disaster recovery, data restoration, and data sharing.
    Note During remote synchronization, the system scans all objects in the bucket. If a large number of objects exist, you have to pay for corresponding OSS API requests. For more information, see Pricing of OSS.
    Remote Sync Interval If you set the Enable Remote Sync parameter to Yes, you can set the Remote Sync Interval parameter. Valid values: 15 to 36000. Default value: 36000. Unit: seconds.
    Note If the bucket contains a large number of objects, we recommend that you specify a value higher than 3,600 seconds as the remote synchronization interval. Otherwise, periodic scans may cause a high cost of OSS API requests.
    Ignore Delete Ignore file deletion operations during data synchronization to OSS. The OSS bucket retains all data.
    Sync Delay Specify a delay before the system uploads the file that you have modified and closed. The Sync Delay feature avoids OSS fragments caused by frequent local modifications. Valid values: 0 to 120. Default value: 5. Unit: seconds.
  8. Click Next to go to the Summary tab, make sure that the specified information is correct, and then click OK.

Configure NFS settings

If you select the NFS protocol when you create a share, click Set in the Actions column to configure NFS settings.

  1. On the Share page, find the target share, and then click Set in the Actions column.
  2. In the NFS Share Setting dialog box, set the following parameters.
    • User Mapping: Select an NFS identity mapping to map NFS client users to NFS server users.
      • none: NFS client users are not mapped to nobody on the NFS server.
      • root_squash: Restrict root user permissions. NFS clients using the root identity are mapped to nobody on the NFS server.
      • all_squash: Restrict all user permissions. No matter what identity an NFS client uses, it is always mapped to nobody on the NFS server.
      • all_anonymous: Restrict all user permissions. No matter what identity an NFS client uses, it is always mapped to anonymous on the NFS server.
    • Read/Write Client IPs: Enter IP addresses or CIDR blocks that are allowed to read and write the NFS share.

      For example, 192.168.10.10 or 192.168.0.0/24. You can enter multiple IP addresses or CIDR blocks.

    • Read-only Client IPs: Enter IP addresses or CIDR blocks that are only allowed to read the NFS share.

      For example, 192.168.10.10 or 192.168.0.0/24. You can enter multiple IP addresses or CIDR blocks.

    • Max Write Speed: The maximum write rate is 1280 MB/s. The default value is 0, indicating that the write rate is not limited.
    • Max Upload Speed: The maximum upload rate is 1280 MB/s. The default value is 0, indicating that the upload rate is not limited
      Note When you customize the maximum write and upload rates, make sure that the maximum upload rate is not lower than the maximum write rate.

Configure SMB settings

If you select the SMB protocol when you create a share, click Set in the Actions column to configure SMB settings.

  1. On the Share page, find the target share and click Set in the Actions column.
  2. In the SMB Share Setting dialog box that appears, set the parameters.
    • Browsable: Specify whether the share can be discovered by Network Neighborhood.
    • Read/write Users: Specify the users that are allowed to read and write the SMB share.
    • Read-only Users: Specify the users that are only allowed to read the SMB share.
      Note If you assign the user both the read-only and read/write permissions, only the read-only permission takes effect.
    • Max Write Speed: The maximum write rate is 1280 MB/s. The default value is 0, indicating that the write rate is not limited.
    • Max Upload Speed: The maximum upload rate is 1280 MB/s. The default value is 0, indicating that the upload rate is not limited.
      Note When you customize the maximum write and upload rates, make sure that the maximum upload rate is not lower than the maximum write rate.

Other supported operations

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

Operation Description
Change advanced settings Find the target share and click Advanced Set in the Actions column. For more information, see Create a share.
Delete a share Find the target share and click Delete in the Actions column.
Note
  • This operation does not delete the data stored in the associated OSS bucket.
  • This operation does not remove the attached cache disk.
  • This operation does not delete the data stored in the attached cache disk.
  • When you create a new share, you must attach a cache disk and an OSS bucket to the share.
Restart NFS shares Click Restart NFS Shares to restart all the shares connected to the gateway.
Restart SMB shares Click Restart SMB Shares to restart all the SMB shares connected to the gateway.
Hide tasks Click Hide Tasks to hide the task list at the bottom of the page.

What to do next

Access shares