All Products
Search
Document Center

Cloud Storage Gateway:Configure express synchronization

Last Updated:Feb 14, 2025

The express synchronization feature of a file gateway in Cloud Storage Gateway (CSG) allows you to efficiently synchronize changes in an Object Storage Service (OSS) bucket to all local clients that are connected to the bucket.

Prerequisites

  • A file gateway is created, and a cache disk is attached to it. For more information, see Manage file gateways and Attach a cache disk.

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

  • A Network File System (NFS) or Server Message Block (SMB) share is created and configured for the file gateway. For more information, see Manage shares.

  • Simple Message Queue (SMQ) is activated. For more information, see Activate SMQ and authorize RAM users to access SMQ.

Background information

When you configure the express synchronization feature, you can add one or more shares that are connected to the same OSS bucket to an express synchronization group. All data changes in the bucket are synchronized to local clients that are associated with shares in the express synchronization group. You do not need to separately synchronize data changes from the bucket. This improves the efficiency and accuracy of synchronization.

The express synchronization feature relies on Simple Message Queue (formerly MNS) and incurs SMQ fees. For more information, see Billing rules.

Create a synchronization group

Important

If you delete an object from a versioning-enabled bucket without specifying a version ID, the DeleteObject and DeleteObjects event notifications are not triggered. This is because a request to delete an object from a versioning-enabled bucket without a version ID specified does not actually delete any object version. Instead, the current version of the object is made a previous version and a delete marker is added as the current version of the object. As a result, CSG detects no deletion operation on the object.

To enable express synchronization, you must create a synchronization group and add shares to the group. To create a synchronization group, perform the following steps:

  1. In the left-side navigation pane of the CSG console, click Express Sync. On the Sync Groups page, click Create.

  2. In the Basic Information step of the Create Sync Group wizard, configure the parameters described in the following table and click Next.

    Parameter

    Description

    Sync Group Name

    Enter the name of the synchronization group.

    Note

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

    OSS Region

    Specify the region where the OSS bucket resides.

    Bucket Name

    Select the name of the OSS bucket. You can select only one OSS bucket for an express synchronization group. All data changes in the bucket are synchronized to the local clients that are associated with shares in the group.

    Note

    If no share is connected to the OSS bucket, no OSS bucket is available in the drop-down list. In this case, you must create a share that connects to the OSS bucket. For more information, see Manage shares.

    Bucket Subdirectory

    Select a specific subdirectory of the bucket from which you want to synchronize data.

  3. In the Sync Group Settings step of the Create Sync Group wizard, select the shares to be added from the Available Shares section and click the > icon. The shares are displayed in the Selected Shares section. Click Next.

    To remove a share from the selected shares, select the share in the Selected Shares section and click the < icon.

    Note

    After you add an NFS share to a synchronization group, you can specify the noac parameter when you mount the share to a local directory. This allows you to view the synchronization result at the earliest opportunity. For more information, see Access an NFS share.

Manage a synchronization group

After you create a synchronization group, all data changes in the OSS bucket are automatically synchronized to local clients that are associated with the shares in the synchronization group. You can perform the following operations to manage a synchronization group:

  • View the details of the synchronization group

    1. On the Sync Groups page, click the synchronization group name in the Sync Group Name column or click Details in the Actions column.

    2. In the Sync Group Details dialog box, you can view the details of the synchronization group. You can also click the icon to view the details in a list, or click the icon to view the details on a map. The Sync Group Details dialog box shows the basic information of the synchronization group and the shares in the group. You can also view the following information from the list.

      Parameter

      Description

      Message Topic Name

      The name of the SMQ topic for the synchronization group.

      Shared Status

      The status of the share in the synchronization group. The share can be in one of the following states:

      • Full Data Sync Awaiting: indicates that the share is waiting for the initial full synchronization.

      • Full Data Sync in Progress: indicates that the share is in the progress of full synchronization.

      • Sync Normal: indicates that no synchronization error has occurred to the share.

      • Express Sync Disabled: indicates that the express synchronization feature is disabled for the share.

      • Message Queue Inaccessible: indicates that the queue that corresponds to the share cannot be accessed.

      • Message Topic Inaccessible: indicates that the topic corresponding to the share cannot be accessed.

      • Message Queue and Topic Inaccessible: indicates that the queue and topic that correspond to the share cannot be accessed.

      Message Queue Name

      The name of the queue that is used by the synchronization group.

  • Add a share to or remove a share from a synchronization group

    Find the synchronization group and click Settings in the Actions column. In the Set Sync Group dialog box, add a share to or remove a share from the synchronization group. For more information, see Step 3 in the Create a synchronization group section.

  • Delete a synchronization group

    To delete a synchronization group, find the synchronization group on the Sync Groups page and click Delete in the Actions column. In the message that appears, click OK.