All Products
Search
Document Center

Cloud Storage Gateway:Create a cross-zone high-availability file gateway

Last Updated:Jun 22, 2026

Create a cross-zone high-availability (HA) file gateway and configure a share on the Cloud Storage Gateway (CSG) console.

Prerequisites

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

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

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

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

  5. An OSS bucket is created.

    Important
    • For the redundancy type, we recommend that you select zone-redundant storage (ZRS). ZRS ensures data access even if an availability zone becomes unavailable.

    • File gateways support only Standard, Infrequent Access (IA), and Archive storage classes for OSS buckets. Buckets that have back-to-origin routing enabled are not supported.

    • Do not connect a gateway directly to an Archive storage bucket. If files written to a gateway will not be modified for a long period, use a Standard or Infrequent Access bucket and apply lifecycle rules to transition the files to the Archive or Cold Archive storage class. This avoids unnecessary restoration operations and is more cost-effective.

    • When a client writes a file to a gateway, the gateway records at least two actions: writing the file and setting the modification time. The gateway tries to merge these actions but may still initiate multiple operations on the bucket object. Setting the modification time calls the CopyObject API to modify the object metadata. If the object is in the Archive or Cold Archive storage class, a time-consuming restoration is required, which slows uploads and can cause failures if the cache disk fills up.

Create a cross-zone high-availability file gateway

  1. On the CSG console, go to the Gateways page and click Create.

  2. On the Create Gateway page, configure the parameters as described in the following table. Use the default values for other parameters.

    Configuration example

    Section

    Parameter

    Description

    Gateway Information

    Name

    Enter a name for the gateway. The name must be up to 60 characters long and 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 where you want to deploy the file gateway.

    Important

    Cross-availability zone high-availability file gateways are available only in the China (Beijing), China (Shanghai), China (Hangzhou), China (Shenzhen), and China (Hong Kong) regions.

    Cross-zone high availability

    Select Yes to enable this feature.

    Gateway Configurations

    VPC

    Select the VPC where you want to deploy the gateway.

    Note

    The VPC must be the same one that contains your client, such as an ECS instance or on-premises host.

    vSwitch of primary node

    Select a vSwitch for the primary node.

    Important
    • The vSwitch of primary node and vSwitch of secondary node must be in different availability zones.

    • The cross-zone high-availability gateway is deployed across the two availability zones that correspond to the vSwitch of primary node and vSwitch of secondary node.

    • If gateway resources are unavailable in the vSwitch's availability zone, create a vSwitch in a different one.

    vSwitch of secondary node

    Select a vSwitch for the secondary node.

    Important
    • The vSwitch of primary node and vSwitch of secondary node must be in different availability zones.

    • The cross-zone high-availability gateway is deployed across the two availability zones that correspond to the vSwitch of primary node and vSwitch of secondary node.

    • If gateway resources are unavailable in the vSwitch's availability zone, create a vSwitch in a different one.

    Edition

    Gateway editions include Basic, Standard, Enhanced, and Performance Optimized.

    OSS endpoint

    The endpoint of the region where the OSS bucket is located.

    Bucket name

    Select an existing OSS bucket or specify a subdirectory within a bucket.

    • A subdirectory name can contain only letters and digits.

    • The subdirectory can be an existing directory or a directory that has not yet been created. After the share is created, this subdirectory becomes the root directory for all subsequent files and folders.

    • OSS buckets with back-to-origin routing enabled are not supported.

    • CSG cannot guarantee that a file is written in a single operation. Therefore, OSS buckets with a retention policy enabled are not supported.

    Protocol

    Select NFS or SMB based on your requirements.

    • NFS: for accessing the mounted OSS bucket from Linux clients.

    • SMB: for accessing the mounted OSS bucket from Windows clients.

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

    Note

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

    User mapping

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

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

    • root_squash: Maps requests from the root user on an NFS client to the nobody user on the NFS server.

    • all_squash: Maps requests from all users on an NFS client to the nobody user on the NFS server.

    • all_anonymous: Maps requests from all users on an NFS client to the anonymous user on the NFS server.

    Note

    This parameter is available only when Protocol is set to NFS.

    Reverse sync

    This feature synchronizes metadata from the OSS bucket to the local gateway cache. Useful for disaster recovery, data recovery, and data sharing.

    Note

    A reverse sync scans all objects in the bucket. If the bucket contains a large number of objects, this can incur costs for OSS API requests.

    Reverse sync interval

    If you set reverse sync to Yes, you must set the reverse sync interval. The value can range from 15 to 36,000 seconds.

    Note

    If the bucket contains a large number of objects, we recommend that you set the interval to more than 3,600 seconds to avoid high costs from frequent OSS API calls.

    Cache disk type

    Only ESSD are supported. The performance level (PL) can be PL1, PL2, or PL3. Select a PL based on your performance requirements. For more information, see ESSDs.

    Cache Capacity

    • Basic edition: 100 GB to 4,096 GB.

    • Standard edition: 100 GB to 8,192 GB.

    • Enhanced and Performance Optimized editions: 100 GB to 32,768 GB.

    Billing Information

    Billing method

    Select pay-as-you-go. For more information, see Billable items.

  3. On the Confirmation tab, review your settings. If they are correct, click Complete.

    Important
    • Automatic deployment takes 5 to 10 minutes. When the gateway status changes to Healthy, the cross-zone high-availability file gateway is ready.

    • After the gateway is created, the system automatically creates a share and configures a virtual IP for the primary node. If this default share does not meet your needs, you can create a new one. For more information, see Add a cache and Create a share.

Add a cache

  1. On the Gateways page, find and click the target gateway. Then, click Create Cache.

  2. Select a method to configure the cache.

    • Cache Calculator: The system recommends a cache size and type based on your business needs.

    • Custom Cache: Manually set the cache size and type to meet specific requirements.

      Note
      • Cache size

        The supported cache disk capacity depends on the gateway edition:

        • Basic edition: 100 GB to 4,096 GB.

        • Standard edition: 100 GB to 8,192 GB.

        • Enhanced and Performance Optimized editions: 100 GB to 32,768 GB.

      • Cache type

        Only ESSD are supported. The performance level (PL) can be PL1, PL2, or PL3. Select a PL based on your performance requirements. For more information, see ESSDs.

Create a share

  1. On the Gateways page, find and click the target file gateway. Then, click Shares.

  2. On the Bucket Settings page, configure the following parameters and click Next.

    Bucket settings

    Parameter

    Description

    OSS endpoint

    The endpoint of the region where the OSS bucket is located.

    Bucket name

    Select an existing OSS bucket or specify a subdirectory within a bucket.

    Note
    • A subdirectory name can contain only letters and digits.

    • The subdirectory can be an existing directory or a directory that has not yet been created. After the share is created, this subdirectory becomes the root directory for all subsequent files and folders.

    • OSS buckets with back-to-origin routing enabled are not supported.

    • CSG cannot guarantee that a file is written in a single operation. Therefore, OSS buckets with a retention policy enabled are not supported.

    Use SSL to connect to bucket

    If you select Yes, connections to the bucket are made over SSL.

  3. On the Basic Information page, configure the following parameters and click Next.

    Basic information

    Parameter

    Description

    Mount IP

    Specify the mount IP for the share.

    Note

    This refers to the virtual IP of the vSwitch for the primary node.

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

    Note

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

    Protocol

    Select NFS or SMB based on your requirements.

    • NFS: for accessing the mounted OSS bucket from Linux clients.

    • SMB: for accessing the mounted OSS bucket from Windows clients.

    Cache

    Select an existing cache disk.

    Note

    Cache disk space is distributed based on the following rules:

    • For cache disks up to 5 TB, 20% of the space is reserved for metadata. For example, if you create a 40 GB cache disk, 32 GB is available for data.

    • For cache disks larger than 5 TB, 1 TB is reserved for metadata. For example, if you create a 20 TB cache disk, 19 TB is available for data.

    User mapping

    Specifies the mapping between NFS client users and NFS server users.

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

    • root_squash: Maps requests from the root user on an NFS client to the nobody user on the NFS server.

    • all_squash: Maps requests from all users on an NFS client to the nobody user on the NFS server.

    • all_anonymous: Maps requests from all users on an NFS client to the anonymous user on the NFS server.

    Note

    This parameter is available only when Protocol is set to NFS.

    Browsable

    Allows the share to be discovered in Network Neighborhood.

    Note

    This parameter is available only when Protocol is set to SMB.

    Windows permission support

    Enables access-based enumeration for the share when the share is mounted on a client through SMB.

    Note

    Add to Sync Group

    When you add a share to an express synchronization group, the system automatically disables its reverse sync feature. Any changes to the data in the share's bucket are automatically synchronized to the local client.

    Note
    • To use this option, you must first create a sync group. The bucket for the sync group must be the same as the bucket for the share.

    • Currently, only Standard, Enhanced, and Performance Optimized gateways support express synchronization.

    • The express synchronization feature relies on Alibaba Cloud Simple Message Queue (formerly MNS), and this feature incurs usage fees.

    Advanced settings

    Select this checkbox to display the Advanced Settings page.

  4. On the Advanced Settings tab, configure the following parameters and click Next.

    Advanced settings

    Parameter

    Description

    Mode

    Cache Mode: The local cache stores all metadata and frequently accessed user data. The complete dataset is stored in OSS.

    Bypass Cache Read

    By default, on a cache miss the gateway downloads data from the OSS bucket and prefetches it to the cache disk. If read requests are random and the cache disk is much smaller than the bucket data, prefetching may not be effective. Enable this option only when necessary.

    Upload optimization

    Enables real-time cache reclamation. This is suitable for data backup-only scenarios.

    Reverse sync

    Synchronizes metadata from the OSS bucket to the local gateway cache. Useful for disaster recovery, data recovery, and data sharing.

    Note
    • A reverse sync scans all objects in the bucket. If the bucket contains a large number of objects, this can incur costs for OSS API requests.

    • If you selected Add to Sync Group on the Add to Sync Group tab, this option is unavailable.

    Reverse sync interval

    If you set reverse sync to Yes, you must set the reverse sync interval. The value can range from 15 to 36,000 seconds.

    Note

    If the bucket contains a large number of objects, we recommend that you set the interval to more than 3,600 seconds to avoid high costs from frequent OSS API calls.

    Ignore deletions

    This option prevents file deletion operations from being synchronized to OSS, which helps prevent accidental data loss. The full dataset is retained in the OSS bucket.

    NFS v4 optimization

    Improves upload performance for NFSv4 mounts. If you enable this option, you can no longer mount the share by using NFSv3.

    Note

    This parameter can be configured only when Protocol is set to NFS on the Basic Information page.

    Sync latency

    Specifies a delay before uploading a closed file, preventing frequent local modifications from creating fragments in OSS. The default is 5 seconds, and the maximum is 120 seconds.

  5. On the confirmation page, review the configuration information. If the information is correct, click Complete to create the share.

Access the share

After the share is created, you can access it from a client.