This topic describes how to configure a share in the Cloud Storage Gateway (CSG) console.
Prerequisites
A share is created. For more information, see Create a share.
Configure basic share settings
On the Gateways page of the CSG console, click the ID of the gateway.
On the Shares tab, find the share and click Settings in the Actions column.
In the dialog box that appears, configure the parameters described in the following table.
Parameter
Description
User Mapping
Specify the user mapping between the Network File System (NFS) client and the NFS server.
none: The NFS client user is not mapped to the nobody user on the NFS server.
root_squash: The NFS client that uses the root identity is mapped to the nobody user on the NFS server.
all_squash: The NFS client is mapped to the nobody user on the NFS server regardless of the identity that the client uses.
all_anonymous: The NFS client is mapped to the anonymous user on the NFS server regardless of the identity that the client uses.
NoteYou can configure this parameter only for an NFS share.
Browsable
Specify whether the Server Message Block (SMB) share can be discovered by network neighbors.
NoteYou can configure this parameter only for an SMB share.
Read/write Clients
The IP address or CIDR block of the client that can read data from or write data to the NFS share.
Example: 192.168.10.10 or 192.168.0.0/24. You can specify more than one IP address or CIDR block.
NoteYou can configure this parameter only for an NFS share.
Read-only Clients
The IP address or CIDR block of the client that can only read data from the NFS share.
Example: 192.168.10.10 or 192.168.0.0/24. You can specify more than one IP address or CIDR block.
NoteYou can configure this parameter only for an NFS share.
Read/Write Users
The users who have read and write access to the SMB share.
NoteYou can configure this parameter only for an SMB share.
Read-only Users
The users who have read-only access to the SMB share.
NoteYou can configure this parameter only for an SMB share.
If you grant both the read-only and read/write permissions to a user, only the read-only permission takes effect.
Write Speed Limit
The limit on the write speed. Valid values: 0 to 1280. Unit: MB/s. The default value 0 indicates that the write speed is unlimited.
Upload Speed Limit
The limit on the upload speed. Valid values: 0 to 1280. Unit: MB/s. The default value 0 indicates that the upload speed is unlimited.
Configure advanced share settings
On the Gateways page of the CSG console, click the ID of the gateway.
On the Shares tab, find the share and click Advanced Settings in the Actions column.
In the dialog box that appears, modify the settings described in the following table.
Parameter
Description
Transfer Acceleration
This feature accelerates data transfer across regions by using the public bandwidth of the gateway. Before you use this feature, make sure that the transfer acceleration feature is enabled for the associated OSS bucket.
Bypass Cache Read
By default, if a cache miss occurs for a read request to a gateway, the gateway downloads the requested data from the associated OSS bucket to the cache disk. This process involves a certain level of data prefetching. However, if read requests are completely random and the size of the cache disk is far smaller than the size of data in the OSS bucket, prefetching data to the cache disk may not deliver satisfactory performance. In this case, consider enabling this feature. We recommend that you enable this feature only when it is necessary.
Upload Optimization
If you select Yes, cached data is cleared in real time. This feature is suitable for cloud backup scenarios.
Reverse Sync
Specify whether to synchronize metadata of objects in the OSS bucket to the on-premises cache disk. This feature is suitable for disaster recovery, data restoration, and data sharing.
NoteDuring a reverse synchronization process, the system scans all objects in the bucket. If the bucket contains a large number of objects, you are charged for calling the OSS API. For more information, see Pricing.
If you select the Add to Sync Group check box in the Basic Information step of the share creation process, this parameter is unavailable.
Reverse Sync Interval
If you set Reverse Sync to Yes, you must set the Reverse Sync Interval parameter. Valid values: 15 to 36000. Unit: seconds.
NoteIf the bucket contains a large number of objects, we recommend that you set the interval to a value greater than 3,600 seconds. Otherwise, repeated scans result in frequent OSS API calls. This causes an increase in fees generated by OSS API calls.
If you enable the cache mode and data download for the share, you must specify an interval within the range from 3,600 seconds and 36,000 seconds.
Reverse synchronization is triggered only when you access the directory. To make sure that the data in other directories can be downloaded and new data can be downloaded in real time, we recommend that you use express synchronization.
Ignore Deletions
If you select Yes, the data that is deleted from the on-premises cache disk is not deleted from the OSS bucket. The bucket stores full data.
NFS V4 Optimization
Select whether to optimize the upload efficiency if an NFSv4 file system is mounted. If you select Yes, you cannot mount an NFSv3 file system.
NoteThis parameter is available only to an NFS share.
Sync Latency
Specify a period of time to delay the upload of files. The Sync Latency feature prevents frequent on-premises modifications from creating a large number of fragments in OSS. Default value: 5. Maximum value: 120. Unit: seconds.
Configure Directory in Replication Mode
Select the directories to which the replication mode applies.
If you do not configure directories, the replication mode applies to all data in the share.
To configure directories in replication mode, select the check box, click Add Directory, and specify the directories to which you want the replication mode to apply. Directories other than the specified ones use the cache mode.
NoteYou can configure this parameter only when the share runs in replication mode.
If you change the mode of a directory from cache to replication, the files in the directory can be synchronized only when the data download feature is also enabled. We recommend that you enable the data download feature if you use the replication mode.
To specify a directory, use its path relative to the mount point of the share. For example, if the directory to which you want to apply the replication mode is /mnt/myshare/mydir/ and the mount point is /mnt/myshare, you can enter /mydir/.
Data Download
If you enable the data download feature, reverse synchronization or express synchronization synchronizes both data and metadata. If you do not enable the data download feature, only metadata is synchronized.
NoteYou can configure this parameter only when the share is in replication mode.
If you download data in replication mode, the capacity of the cache disk must be greater than 1.1 times the total size of the files that you want to replicate. Plan the cache capacity based on the expected growth of the bucket usage.
The first time you enable the data download feature, a full scan is triggered. This process may affect the performance of the gateway. We recommend that you enable the data download feature during off-peak hours and wait for the system to replicate all the data.
The data download feature supports only write-once-read-many storage. If multiple users access the bucket at the same time (including but not limited to direct access or access through the gateway), only one user can upload files to the bucket, and other users can only download data. Data loss may occur if multiple users write data to and read data from the bucket at the same time.
Download Speed Limit
After you enable data download, you must set this parameter. You can specify a speed limit within the range of 0 MB/s to 1,280 MB/s. If you set this parameter to 0 MB/s, the download speed is unlimited.