This topic describes how to delete a standby cluster.
Delete a standby cluster by using the REMOVE CLUSTER command
To delete a cluster during routine maintenance, you need to verify the cluster role and check whether the cluster is in the primary/standby cluster configuration.
To delete a standby cluster from the primary/standby cluster configuration, you need to run the REMOVE CLUSTER command in the primary cluster to remove the target cluster.
The REMOVE CLUSTER command is as follows:
obclient> ALTER SYSTEM REMOVE CLUSTER cluster_name CLUSTER_ID cluster_id [FORCE];
Notes:
cluster_nameandcluster_idindicate the cluster name and ID of the cluster to be deleted.To delete a standby cluster, we recommend that you run the command in the primary cluster. If you want to run the command in a standby cluster, add the
FORCEkeyword to the command, and make sure that the standby cluster is in the primary/standby cluster configuration and is not the cluster to be deleted.Standby clusters in
SYNCmode cannot be deleted in maximum protection or maximum availability mode.
The target cluster to be deleted does not necessarily play a standby role. For example, after a failover, both the new primary cluster and the original primary cluster play the primary role, and both clusters are in the primary/standby cluster configuration. For more information, see Failover.
You can retain one of the primary clusters as the target primary cluster and delete the other one. For example, you can retain the new primary cluster as the target primary cluster and delete the original primary cluster, or you can restore the services of the original primary cluster and delete the new primary cluster. When you delete one of the primary clusters, you must run the REMOVE CLUSTER command in the retained primary cluster to remove the other primary cluster from the primary/standby cluster configuration, thus clearing the related cluster configuration.