You can select desired replication clusters and configure the primary/standby relationship and backup policy between the replication clusters to create a replication group. The namespace bound to the replication group backs up data based on the configuration of the replication group.
Prerequisites
- You have finished setting the default cluster.
- Replication groups can be created only in the default cluster.
Procedure
- Choose Data Protection > Configuration > Cross-Site DR > Replication Group.
- Click Create.
The Create Replication Group page is displayed on the right.
- Set a name for the replication group.
- The name contains 1 to 255 characters.
- The name contains letters, digits, hyphens (-), and underscores (_), and must start with a letter and cannot end with a hyphen (-) or underscore (_).
- Select a policy type for the replication group.
- Replica: Complete data is replicated to all clusters.
For example, if a replication group has three clusters, data of all buckets in the replication group is stored at these clusters.
- EC: Data is divided into multiple data blocks and stored at the data fragment clusters. If you select this option, you need to specify the number of parity fragments. The number of parity fragments is the number of nodes that can be faulty in a replication group. If a cluster is faulty, data of the faulty cluster can be calculated by reading data of other clusters. EC reduces storage space occupation and saves costs.
For example, three clusters are selected, including two data fragment clusters for storing data and one parity fragment cluster for storing parity data. If a cluster that stores data is faulty, the data of the faulty cluster can be calculated based on the data of the parity cluster and the data of the other data cluster.
- In the Available Replication Clusters list, select desired replication clusters and set the cluster role types in the Selected Replication Clusters list. If only one active cluster is selected, you can specify a passive cluster among all selected passive clusters to automatically take over services in case of a fault of the active cluster. The sequence of selecting replication clusters will serve as the default DNS scheduling sequence, in which the first healthy active cluster receives services. In the Selected Replication Clusters list, you can click the up or down arrow to adjust the sequence of replication clusters to adjust the DNS scheduling sequence of the replication group.
- If you select Replica for the policy type, select at least two clusters (containing at least one active cluster).
- If you select EC for the policy type, select at least (2 + the number of parity fragments) clusters (containing at least one active cluster).
- By default, the passive cluster (auto takeover) is in the read-only state, and the namespace associated with the replication group of the passive cluster (auto takeover) is also in the read-only state. If the active cluster is faulty, the cluster (auto takeover) automatically switches from the read-only state to the read/write state, so do the associated namespace.
- Only one replication group can be created for same-type clusters with the same DNS scheduling sequence, while different replication groups can be created for same-type clusters with different DNS scheduling sequences.
- Click OK.
Follow-up Procedure
For a replication group of the EC policy type, you can run the
change rgm rg_bkts command on the CLI to change the retention period of a local copy. The default value is
0, indicating that the local copy of an object will be deleted immediately after cross-site EC is complete. If the retention period is too long, the amount of data written to the site increases excessively. Set this parameter based on the customer's service scenario.
admin:/>change rgm rg_bkts fs_id=37 bkt_name=bkt1 retention_time=30
Command executed successfully.