Manage file gateways

Updated at:

This topic describes how to create, delete, and rename file gateways on the Cloud Storage Gateway (CSG) console.

Prerequisites

  • You have registered an Alibaba Cloud account and completed identity verification.

    Note

    We recommend using a Resource Access Management (RAM) account to perform operations on the Cloud Storage Gateway console.

  • The Cloud Storage Gateway service is activated. When you log on to the Cloud Storage Gateway console for the first time, follow the on-screen instructions to activate the service.

  • A VPC is available in the region where you want to create the file gateway.

  • An ECS instance is available to serve as a client and is associated with the created VPC.

    Note

    You can also use an on-premises host if it is connected to the VPC through a dedicated connection.

  • An OSS Bucket is created.

    Important
    • A file gateway supports only OSS Buckets of the Standard, Infrequent Access (IA), and Archive storage classes. OSS Buckets with the back-to-source feature enabled are not supported.

    • Avoid connecting a gateway directly to an Archive OSS Bucket. If files will not be modified for a long time after being written, consider using a Standard or IA bucket. You can then use lifecycle rules to transition the storage class of the objects to Archive or Cold Archive. This approach is more cost-effective and efficient because it avoids unnecessary restore operations.

    • When a client writes a file to the gateway, the gateway records at least two actions: writing the file and setting the file's modification time. The gateway attempts to merge these actions, but may still initiate multiple operations on the OSS Bucket for a single file. Setting the modification time translates to modifying the object's metadata in the OSS Bucket by using the CopyObject API. For Archive or Cold Archive objects, this requires a time-consuming restore operation, which can slow down uploads and even cause write failures if the cache disk does not have enough space to upload the data in time.

Create a file gateway

  1. Go to the Gateway List page on the Cloud Storage Gateway console, and click Create.

  2. On the configuration page, use the following settings to create a cloud-based file gateway. Keep the default values for any settings not mentioned.

    Configuration example

    Section

    Parameter

    Description

    Gateway information

    Name

    The name can be up to 60 characters long and must start with a letter or a Chinese character. It can contain letters, Chinese characters, digits, underscores (_), hyphens (-), and periods (.).

    Location

    Select Alibaba Cloud.

    Type

    Select File Gateway.

    Region

    Select the region for the file gateway.

    Configure gateway

    VPC

    Select the desired VPC.

    Note

    You must select the same VPC as your ECS instance or on-premises host.

    vSwitch

    Select the desired vSwitch.

    Note
    • You must select the same vSwitch as your ECS instance or on-premises host.

    • If the selected vSwitch is in an availability zone with no available gateway resources, create a vSwitch in a different one.

    Gateway edition

    The available gateway editions are basic, standard, enhanced, and performance.

    Configure protocol

    Cross-region binding

    • Select Yes to allow the Cloud Storage Gateway to access OSS Buckets in different regions.

    • Select No to restrict the Cloud Storage Gateway to accessing only OSS Buckets in its region.

    Bucket region endpoint

    The region endpoint of the selected bucket.

    Bucket name

    Select an existing bucket or enter a subdirectory within a bucket.

    • Subdirectories can contain only letters and digits.

    • Starting from version 1.0.38, you can map the root directory of the file system to a subdirectory in an OSS Bucket for access isolation.

    • The subdirectory can be an existing directory or a new one. After the share is created, this subdirectory becomes the root directory, and all subsequent files and directories are created within it.

    • OSS Buckets with the back-to-source feature enabled are not supported.

    • Cloud Storage Gateway cannot guarantee a single write operation per file, so it does not support OSS Buckets with a compliance retention policy enabled.

    Public bandwidth

    This option is visible only when Cross-region binding is set to Yes. The default free tier is 5 Mbps. Upgrade the public bandwidth to improve gateway transfer performance.

    Note
    • To use a gateway for cross-region access or real-time synchronization, you must configure public bandwidth.

    • The public bandwidth can be set from 5 Mbps to 200 Mbps.

    Protocol

    Choose NFS or SMB.

    • NFS protocol: Suitable for accessing mounted OSS Buckets from Linux systems.

    • SMB protocol: Suitable for accessing mounted OSS Buckets from Windows systems.

    Share name

    The name of the NFS or SMB share. If you select the NFS protocol, this name also serves as the virtual path for NFSv4.

    Note

    The name must start with a letter, be no more than 32 characters long, and can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    User mapping

    Configures the mapping between NFS client users and NFS server users. This is only available when the Protocol is set to NFS.

    • none: NFS client users are not mapped to the nobody user on the NFS server.

    • root_squash: Restricts the root user. When an NFS client accesses as root, it is mapped to the nobody user on the NFS server.

    • all_squash: Restricts all users. All NFS client users are mapped to the nobody user on the NFS server, regardless of their original identity.

    • all_anonymous: Restricts all users. All NFS client users are mapped to the anonymous user on the NFS server, regardless of their original identity.

    Reverse synchronization

    Synchronizes metadata from OSS to the local gateway. This is useful for gateway disaster recovery, data restoration, and data sharing scenarios.

    Note

    Reverse synchronization scans all objects in the OSS Bucket. A large number of objects incurs OSS API request fees.

    Reverse synchronization interval

    If you set Reverse synchronization to Yes, you can set the Reverse synchronization interval. The minimum value is 15 seconds and the maximum is 36,000 seconds.

    Note

    If the bucket contains a large number of objects, set the interval to more than 3,600 seconds to avoid high OSS API request fees from frequent scanning.

    Cache disk specification

    Only ESSDs are supported, with performance levels PL1, PL2, and PL3. Choose a level based on your performance requirements. For more information, see ESSD.

    Cache disk capacity

    • Basic gateway: 40 GB to 4,096 GB.

    • Standard gateway: 40 GB to 8,192 GB.

    • Enhanced and performance gateways: 40 GB to 32,768 GB.

    Billing

    Billing method

    Options include pay-as-you-go and subscription. For more billing details, see Billable items.

    If you choose subscription, you are redirected to the Purchase Cloud Storage Gateway page after creating the file gateway. Follow the on-screen instructions to complete the payment.

    Upon expiration

    Options include Convert to Pay-As-You-Go and Release Directly.

  3. Review your configuration on the summary page and click Finish.

Important
  • Automatic deployment takes about 5 to 10 minutes. When the status changes to Running, the file gateway is activated and the deployment is complete.

  • The gateway creates a default share. If this share does not meet your needs, see Add a cache and Create a share to create a new one.

Related operations

On the Gateway List page, you can also perform the following operations.

Actions

Description

Delete a gateway

Find the target file gateway and click Delete.

Note
  • You can delete only pay-as-you-go file gateways.

  • Before deleting a gateway with an NFS share, unmount the share on the client.

    If you delete a share or gateway before you unmount it on the client, the client's mount point may fail to unmount. Subsequent operations on the mount directory may then hang or become unresponsive.

Rename a gateway

Find the target file gateway and choose More to rename the gateway.

Switch to subscription

After creating a pay-as-you-go gateway, you can switch its billing method to subscription.

Choose More > Switch to Subscription and complete the purchase as needed. For more information, see Switch from pay-as-you-go to subscription.

Important

Do not modify any configuration settings other than the billing cycle.

Upload support data

After creating the gateway, choose More to upload gateway logs for troubleshooting.

Purchase

If you have an unpaid subscription gateway, choose More to return to the purchase page and complete the payment.

Change expiration policy

For a subscription gateway, choose More to change its expiration policy. For more information, see Change an expiration policy.

Next steps

Add a cache disk

Create a share