This topic describes how to manage cloud resources in the on-premises file gateway console, including binding, unbinding, and speed testing.
Prerequisites
An on-premises file gateway client is created. For more information, see Deploy an on-premises console for a file gateway.
An OSS bucket is created. For more information, see Get started by using the OSS console.
ImportantFile gateways support the following storage classes of OSS buckets: Standard, Infrequent Access (IA), and Archive. File gateways do not support OSS buckets for which back-to-origin routing is configured.
We recommend that you do not associate a gateway with an Archive bucket. If files that are written from a file gateway to OSS are infrequently modified, we recommend that you store the files in a Standard or IA bucket first and configure a lifecycle rule that changes the storage class of the files to Archive or Cold Archive. This reduces unnecessary restoration operations and optimizes storage costs and efficiency.
When a client writes a file to a file gateway, the gateway records at least two actions: writing the file and setting the file modification time. The gateway merges the two actions where possible. However, the gateway may still initiate multiple operations on the object to the bucket where the object is stored. The CopyObject operation is called to store the file modification time as a piece of metadata of the object in the bucket. If the object is an Archive or Cold Archive object, this operation requires object restoration, which takes some time to complete. This increases the time required for object uploads and even causes upload failures if not enough time is left to upload data in the cache.
Bind a cloud resource
Create shared resources that use OSS buckets as backend storage. A file gateway supports multiple cloud resources, with each shared resource corresponding to one bucket.
By default, data written to a Cloud Storage Gateway by a client is uploaded in real time to an OSS bucket. You can also set a synchronization latency when you create a share. The maximum latency is 120 s.
Use the custom or non-custom method to bind a cloud resource as needed.
Non-custom method
In the left-side navigation pane of the on-premises gateway console, click Cloud Resources. Then click Bind.
In the Bind Cloud Resource dialog box, configure the following parameters.
Parameter
Description
Resource Name
Set a name for the cloud resource.
Cross-region Binding
Configure cross-region binding.
Select Yes to access an OSS bucket that is in a different region from the file gateway.
Select No to access only a bucket that is in the same region as the file gateway.
NoteTo ensure the accuracy of data synchronization, log recording, and operation management between the file gateway and the OSS bucket, you must make sure that their time zones are the same.
The time zone of an on-premises file gateway must be the same as the time zone of the OSS bucket.
Region
Select the region where the bucket is located.
Bucket Name
Select the bucket that you want to bind.
Use SSL
If you select Yes, you can use SSL to access the OSS bucket.
Click OK to bind the cloud resource.
Custom method
In the left-side navigation pane of the on-premises gateway console, click Cloud Resources. Then click Bind.
In the Bind Cloud Resource dialog box, configure the following parameters.
Parameter
Description
Resource Name
Set a name for the cloud resource.
Use Custom Region
Select Use Custom Region.
Endpoint
The endpoint of the OSS bucket. Example: oss-cn-hangzhou.aliyuncs.com
Bucket Name
Enter the name of the OSS bucket that you want to bind.
Access Key ID
Enter your AccessKey ID.
Access Key Secret
Enter your AccessKey secret.
Use SSL
If you select Yes, you can use SSL to access the OSS bucket.
Click Confirm to bind the cloud resource.
Related operations
On the Cloud Resources page, you can also perform the following operations.
Operation | Procedure |
Unbinding | Find the cloud resource and click Unbind. After the cloud resource is unbound, the data on the cloud resource is retained. You can access and delete the data in the Alibaba Cloud Object Storage Service (OSS) console. |
Speed testing | Find the cloud resource and click Speed Test to test the upload and download speed. |