All Products
Search
Document Center

Cloud Storage Gateway:Manage file gateways

Last Updated:Jan 17, 2025

This topic describes how to manage file gateways in the Cloud Storage Gateway (CSG) console. For example, you can create, delete, and rename a gateway.

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.

    Note

    We recommend that you log on to the CSG console as a RAM user. For more information, see Use RAM to implement account-based access control.

  • 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 Elastic Compute Service (ECS) instance is created on the VPC in the region where you want to create the file gateway. For more information about how to create an ECS instance, see Create an ECS instance.

    Note

    If 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 OSS bucket is created. For more information, see Get started by using the OSS console.

    Important
    • 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 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.

Create a file gateway

  1. On the Gateways page of the CSG console, click Create.

  2. In the Create Gateway wizard, configure parameters as described in the following table and retain default settings for other parameters.

    Example

    Step

    Parameter

    Description

    Gateway Information

    Name

    Specify a name for the gateway. The name must be 1 to 60 characters in length, and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter.

    Location

    Select Alibaba Cloud.

    Type

    Select File Gateway.

    Region

    Select the region of the file gateway.

    Gateway Configurations

    VPC

    Select the VPC in which you want to deploy the gateway.

    Note

    The VPC must be the one in which your ECS instance or on-premises host is located.

    VSwitch

    Select the vSwitch that is connected to the gateway.

    Note
    • The vSwitch must be the one that is connected to your ECS instance or on-premises host.

    • If no gateway resource is available in the zone where the specified vSwitch resides, create a vSwitch in another zone.

    Edition

    Select Basic, Standard, Enhanced, or Performance Optimized. For more information, see Specifications.

    Config Protocol

    Cross-region Binding

    • If you select Yes, you can access a bucket that resides in a different region from that of the gateway.

    • If you select No, you can only access a bucket that resides in the same region as the gateway.

    OSS Endpoint

    Select an endpoint for the region in which the bucket is located.

    Bucket Name

    Specify the bucket. You can select an existing bucket from the drop-down list. You can also select the Subdirectory check box and enter a subdirectory of the bucket in the text box that appears.

    • The name of a subdirectory can contain only letters and digits.

    • Starting from V1.0.38, you can map the root directory of a file system to a subdirectory of the bucket. This way, you can isolate file access requests.

    • The subdirectory can be an existing directory in the OSS bucket or a directory that has not yet been created in the OSS bucket. After you create a share, the specified subdirectory serves as the root directory and stores all related files and directories.

    • A file gateway does not support OSS buckets for which back-to-origin routing is configured.

    • CSG cannot guarantee that only one write operation is performed on an object. Therefore, buckets for which retention policies are configured are not supported.

    Public Network Bandwidth

    Specify the public bandwidth. This parameter is available only when Cross-region Binding is set to Yes. The default bandwidth is 5 Mbit/s. We recommend that you increase the bandwidth for better data transfer performance.

    Note
    • If you want to use the gateway or the express synchronization feature across regions, you need to configure this parameter. For more information, see Configure a public bandwidth limit.

    • The public bandwidth ranges from 5 Mbit/s to 200 Mbit/s.

    Protocol

    Specify the protocol that you use to connect to the OSS bucket. You can select NFS or SMB.

    • Use the NFS protocol if you need to access the bucket from a Linux system.

    • Use the SMB protocol if you need to access the bucket from a Windows system.

    Share Name

    Specify a name for the share. If you set the Protocol parameter to NFS, the share name is also used as the virtual path of the share when the mount operation is performed based on NFSv4.

    Note

    The name must be 1 to 32 characters in length, and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter.

    User Mapping

    Set the user mapping between the NFS client and the NFS server. This parameter is available only when you set Protocol to NFS. Valid values:

    • 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.

    Reverse Sync

    Select whether to synchronize metadata of objects in the bucket to your local device. The reverse synchronization feature is useful in scenarios such as disaster recovery, data recovery, and data sharing.

    Note

    During 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.

    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.

    Note

    If 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.

    Cache Disk Type

    Select Ultra Disk, Standard SSD, or ESSD based on your business requirements.

    Cache Capacity

    • The capacity of a cache disk for a Basic gateway ranges from 40 GB to 4,096 GB.

    • The capacity of a cache disk for a Standard gateway ranges from 40 GB to 8,192 GB.

    • The capacity of a cache disk for an Enhanced or Performance Optimized gateway ranges from 40 GB to 32,768 GB.

    Billing Information

    Billing Method

    Select Pay-as-you-go or Subscription. For more information, see Billable items and billing methods.

    If you select Subscription, you are redirected to the subscription purchase page after you create the file gateway. Complete the payment. For more information, see Purchase a gateway.

    Expiration Policy

    Select an expiration policy for the gateway subscription. You can select Switch to Pay-as-you-go or Release.

  3. In the Confirmation step, check the configuration information. If nothing is wrong, click Complete.

Important
  • After the gateway is created, the system automatically deploys and starts the gateway. It takes about 5 to 10 minutes to complete the process. The gateway enters the Running state if it is activated and deployed.

  • After the gateway is created, the share specified in the gateway creation process is created. If the share does not meet your requirements, you can create a new share. For more information, see Attach a cache disk and Create a share.

Related operations

After you create a gateway, you can perform the following operations on the Gateways page.

Operation

Description

Delete a gateway

Find the file gateway that you want to delete and click Delete.

Note

You can delete only pay-as-you-go gateways.

Rename a gateway

Find the file gateway that you want to rename and choose More > Edit in the Actions column.

Switch to subscription

You can switch the billing method of a gateway from pay-as-you-go to subscription.

To switch to the subscription billing method, find the gateway and choose More > Switch to Subscription. On the subscription page, purchase a subscription based on your requirements. For more information, see Switch the billing method from pay-as-you-go to subscription.

Important

On the subscription page, do not modify any configuration settings other than the subscription duration.

Upload supported data

To upload logs for troubleshooting, find the gateway and choose More > Upload Supported Data.

Purchase a subscription

If you create a subscription gateway but have not completed the subscription payment, find the gateway and choose More > Purchase.

Change the expiration policy

For a subscription gateway, you can choose More > Change Expiration Policy to change the action when the current subscription expires. For more information, see Switch the expiration policy.

What to do next

Add a cache disk

Create a share