This topic describes how to create a cross-zone high availability (HA) file gateway and configure shares for the file gateway in the Cloud Storage Gateway (CSG) console.
Prerequisites
An Alibaba Cloud account is created and real-name verification for the account is complete. For more information, see Create an Alibaba Cloud account.
NoteWe recommend that you create a RAM user and log on to the CSG console as the RAM user.
CSG is activated. If CSG is not activated, follow the on-screen instructions in the CSG console to activate CSG.
A virtual private cloud (VPC) is available in the region where you want to create the file gateway. For more information, see Create a VPC with an IPv4 CIDR block.
An ECS instance is created on the VPC in the region where you want to create the file gateway.
NoteIf your on-premises host is connected to the VPC over an Express Connect circuit, you can also perform the steps by using the host.
An Object Storage Service (OSS) bucket is created. For more information, see Get started with the OSS console.
ImportantWe recommend that you use a zone-redundant storage (ZRS) bucket, which ensures continuous data access even if a zone becomes unavailable.
File 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 never associate a gateway with an Archive bucket. If files written from a file gateway to OSS are expected to be infrequently modified, we recommend that you store the files in a Standard or IA bucket first and move them to Archive or Cold Archive by using a lifecycle rule. 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 can even cause upload failures if not enough time is left to upload data from the cache.
Create a cross-zone HA file gateway
On the Gateways page of the CSG console, click Create.
In the Create Gateway wizard, configure parameters as described in the following table and retain default settings for unmentioned parameters.
In the Confirmation step, verify your settings and click Completed.
ImportantThe automatic gateway deployment takes about 5 to 10 minutes to complete. When the gateway status is Healthy, the cross-zone HA file gateway is deployed.
After the cross-zone HA file gateway is created, the share specified in the gateway creation process is created, and a virtual IP address is automatically configured for the primary node. If the share no longer meets your requirements, create another share. For more information, see Attach a cache disk and Create a share.
Attach a cache disk
On the Gateways page, click the ID of the gateway. On the page that appears, click .
Specify cache disk specifications by using Cache Calculator or Custom Cache settings.
Cache Calculator: Cache disk settings are automatically recommended based on your application requirements.
Custom Cache: You need to manually configure a cache disk type and capacity.
NoteCapacity
The supported capacity range of a cache disk varies with the gateway edition:
Basic: 100 GB to 4,096 GB
Standard: 100 GB to 8,192 GB
Enhanced or Performance Optimized: 100 GB to 32,768 GB
Type
Only ESSD is supported. You can choose from three performance levels (PLs): PL1, PL2, and PL3. For more information, see ESSDs.
Create a share
On the Gateways page, click the ID of the file gateway. On the tab, click Create.
In the Bucket Settings step, configure the parameters described in the following table and click Next.
In the Basic Information step, configure the parameters described in the following table and click Next.
In the Advanced Settings step, configure the parameters described in the following table and click Next.
In the Confirmation step, check the configuration information. If nothing is wrong, click Completed.
Access a share
After creating a share, access it from the client. For more information, see Access shares.