Tearing Down the Cluster

If necessary, you can tear down the entire cluster to remove all replication configurations and to set both database nodes back to single Cloudpath Enrollment System mode.
Note: If you are going to tear down an active-active cluster that contains application nodes, you must first remove all APP nodes from the cluster by following the procedure in Removing an Application Node From a Cluster.

You can run the replication teardown command from either database node.

The following command (and corresponding output) is an example from the cluster that was shown in Configuring an Active - Standby Replication

# replication teardown
 ------------------------------------------------------------------------------
    * You will be prompted for the password of local system.
 ------------------------------------------------------------------------------

 ------------------------------------------------------------------------------
   WARNINGS:
     1.  Teardown cluster routine will disassemble the entire cluster.
     2.  After Cluster Teardown, all features that have been established to support
         replication cluster will be removed; however, the databasees on both primary
         and secondary nodes will be intact.
 ------------------------------------------------------------------------------

  Do you want to continue? [y/n] y


 ------------------------------------------------------------------------------
   WARNING:
   Cluster Database Nodes:
     Database node: 192.168.94.243   ssh port# 8022
     Database node: 192.168.94.244   ssh port# 8022

   During Cluster Teardown processing, with exception of the replicated
   secondary Database, all features that have been established to support
   replication cluster will be removed.
 ------------------------------------------------------------------------------

  Do you want to continue? [y/n] y


Checking remote host 192.168.94.244 ...
Will remove keepalived configuration on local node 192.168.94.243 ...
Removed symlink /etc/systemd/system/multi-user.target.wants/keepalived.service.
Will remove keepalived configuration on remote node 192.168.94.244 ...
Removed symlink /etc/systemd/system/multi-user.target.wants/keepalived.service.
Will reset web server cluster name on local node 192.168.94.243 ...
Will reset web server cluster name on remote node 192.168.94.244 ...
Will disable local cluster monitoring service on 192.168.94.243 ...
Removed symlink /etc/systemd/system/multi-user.target.wants/cloudpath-repld.service.
Will disable remote cluster monitoring service on 192.168.94.244 ...
Removed symlink /etc/systemd/system/multi-user.target.wants/cloudpath-repld.service.
Will stop replication on local node 192.168.94.243 ...
Will stop replication on remote node 192.168.94.244 ...
Remove Database repl_mon ...
Will remove database service permissions ...
Will revert database replication configuration ...
Will remove network configuration for replication ...
Will remove cluster configurations from all cluster nodes ...
Will restart local application services on 192.168.94.243 ...
Will restart remote application services on 192.168.94.244 ...
Cluster teardown completed.
#

You can now run a show-status command, and the output indicates that replication is not configured:

# replication show-status
Replication is not enabled on this system.