root@ocp-db-02:~# patronictl -c /etc/patroni/patroni.yml list
+ Cluster: cluster_1 (7329905842172713072) --------+----+-----------+
| Member        | Host         | Role    | State   | TL | Lag in MB |
+---------------+--------------+---------+---------+----+-----------+
| ocp-db-dev-01 | 10.30.11.118 | Replica | stopped |    |   unknown |
| ocp-db-dev-02 | 10.30.11.119 | Replica | stopped |    |   unknown |
| ocp-db-dev-03 | 10.30.11.120 | Replica | stopped |    |   unknown |
+---------------+--------------+---------+---------+----+-----------+
root@ocp-db-02:~#

Remove cluster_1

root@ocp-db-02:~# patronictl -c /etc/patroni/patroni.yml remove cluster_1
+ Cluster: cluster_1 (7329905842172713072) --------+----+-----------+
| Member        | Host         | Role    | State   | TL | Lag in MB |
+---------------+--------------+---------+---------+----+-----------+
| ocp-db-dev-01 | 10.30.11.118 | Replica | stopped |    |   unknown |
| ocp-db-dev-02 | 10.30.11.119 | Replica | stopped |    |   unknown |
| ocp-db-dev-03 | 10.30.11.120 | Replica | stopped |    |   unknown |
+---------------+--------------+---------+---------+----+-----------+
Please confirm the cluster name to remove: cluster_1
You are about to remove all information in DCS for cluster_1, please type: "Yes I am aware": Yes I am aware
root@ocp-db-02:~# patronictl -c /etc/patroni/patroni.yml list
+ Cluster: cluster_1 (7329925063638867100) --------+----+-----------+
| Member        | Host         | Role    | State   | TL | Lag in MB |
+---------------+--------------+---------+---------+----+-----------+
| ocp-db-dev-01 | 10.30.11.118 | Leader  | running |  1 |           |
| ocp-db-dev-03 | 10.30.11.120 | Replica | stopped |    |   unknown |
+---------------+--------------+---------+---------+----+-----------+
root@ocp-db-02:~#

Beberapa saat kemudian

root@ocp-db-02:~# patronictl -c /etc/patroni/patroni.yml list
+ Cluster: cluster_1 (7329925063638867100) ----------+----+-----------+
| Member        | Host         | Role    | State     | TL | Lag in MB |
+---------------+--------------+---------+-----------+----+-----------+
| ocp-db-dev-01 | 10.30.11.118 | Leader  | running   |  1 |           |
| ocp-db-dev-02 | 10.30.11.119 | Replica | streaming |  1 |         0 |
| ocp-db-dev-03 | 10.30.11.120 | Replica | streaming |  1 |         0 |
+---------------+--------------+---------+-----------+----+-----------+
root@ocp-db-02:~#

Leave a Reply

Your email address will not be published. Required fields are marked *