Multiple clients are connected to an Object Storage Service (OSS) bucket through a file gateway. If data changes occur in the OSS bucket, you can use the express synchronization feature to integrate these changes into all the connected clients at the same time.
- You have created a file gateway and added a cache. For more information, see Create a file gateway and Add a cache disk.
- You have created an OSS bucket. For more information, see Create a bucket.
- You have created and configured a Network File System (NFS) or Server Message Block (SMB) share between a file gateway and an OSS bucket. For more information, see Manage shares.
- You have activated and authorized Alibaba Cloud Message Service (MNS).
- Only standard, enhanced, and advanced gateways support the express synchronization feature.
- Express synchronization must be used in combination with Alibaba Cloud MNS. If you enable express synchronization, fees for MNS are incurred. A bill is generated for MNS topics and queues on a daily basis. Each synchronization group is billed as one topic, and each share added to the synchronization group is billed as one queue. For example, if less than 20 million MNS API requests are made and the service region is US (Virginia), the price of each topic is USD 0.45 per day, and that of each queue is USD 0.11 per day. In this case, if you create one synchronization group and add two shares to the group, the monthly fee is USD 20.10. The fee is calculated as follows: (0.45 + 0.11 × 2) × 30 = 20.10. For more information, see Pricing of MNS.
Create a synchronization group
To enable express synchronization, you must create a synchronization group and add shares to the group. Data is synchronized through these shares.
- Log on to the Cloud Storage Gateway console.
- In the upper-left corner of the console, select the region where the target file gateway is deployed.
- In the left-side navigation pane, select Express Sync to go to the Sync Group List page.
- On the Sync Group List page, click Create.
- In the Create Sync Group wizard, configure the following parameters on the Basic Information tab, and click Next to proceed.
Parameter Description Sync Group Name Enter a name of the synchronization group.Note The synchronization group name must be 1 to 128 characters in length, and can contain letters, Chinese characters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character. OSS Region Select the region of the OSS bucket from which you want to synchronize data. Bucket Name Select the name of the OSS bucket. You can select only one OSS bucket for a synchronization group. All data changes in the bucket are synchronized to the clients that are mapped to the 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 on the file gateway to map a client to the OSS bucket. For more information, see Manage shares. Bucket Path Prefix Select a path prefix if you want to synchronize data from a specific subdirectory of the bucket. This is an optional parameter.
- On the Set Sync Group tab of the Create Sync Group wizard, select the target shares in the Optional Shares section and click the > icon to add the shares to the synchronization group. These shares are displayed in
the Selected Shares section. Afterward, click Next to proceed.
To remove a share from the synchronization group, you can select the share in the Selected Shares section and click the < icon.Note After adding an NFS share to a synchronization group, if you want to see the synchronized data changes on the local client in a more timely manner, add the noac parameter when mounting the share to the client. For more information about the parameter, see Access NFS shares.
- On the Summary tab of the Create Sync Group wizard, confirm the information of the synchronization group, and click OK.
Manage a synchronization group
After you create a synchronization group, all data changes in the OSS bucket are automatically synchronized to the clients that are mapped to the shares in the synchronization group. You can manage the synchronization group in the following ways:
- View the details of a synchronization group.
Go to the Sync Group List page, and click the target synchronization group name in the Sync Group Name column or click Details in the Actions column for the target synchronization name.In the Sync Group Detail dialog box that appears, you can view the details of the synchronization group. You can also click the List icon to view the details in a list, or click the Map 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.
Item Description MNS Topic The name of the MNS topic used by the synchronization group. Share Status The status of a share in the synchronization group. The statuses include:
- Full sync pending: indicates that the share is added to the synchronization group for the first time and is waiting for an initial full synchronization.
- Full sync in progress: indicates that the share is being used for the first time to synchronize full data from the OSS bucket.
- Express sync is healthy: indicates that no synchronization error has occurred to the share.
- Express sync not enabled: indicates that the express synchronization feature is disabled for the share.
- MNS queue unreachable: indicates that the queue corresponding to the share cannot be accessed.
- MNS topic unreachable: indicates that the topic corresponding to the share cannot be accessed.
- MNS topic and queue unreachable: indicates that the queue and topic corresponding to the share cannot be accessed.
MNS Queue The name of the MNS queue used by the synchronization group.
- Add a share to or remove a share from a synchronization group.
You can click Set in the Actions column for the target synchronization group. In the Set Sync Group dialog box that appears, add a share to or remove a share from the synchronization group. To add a share, follow the instructions in step 6 in the Create a synchronization group section.
- Delete a synchronization group.
If you want to delete a synchronization group, clickDelete in the Actions column for the target synchronization group. In the dialog box that appears, click OK.