Last post we discussed about, How to deploy vCD Primary cell.
In this post we will:
- Deploy Standby Cell in the same server group
- Check the Embedded PostgreSQL Database is enabled with High Availability
- Check Connectivity Status, Replication Status and HA Status
Purpose of the Standby Cell is provide High Availability for the PostgreSQL.
“The embedded database in a standby cell is configured in a replication mode with the primary database.”
According to the architecture we need to deploy 2 StandBy cell in the server group which has Primary Cell already.
Deployment of StandBy Cell:
Note: The deployment procedure is not that different from primary cell only difference will be configuration size and instance ID.
After fulfilling the same prerequisites of primary cell, we can start with deploying New VM using same OVA file.
- On the Configuration point, Choose the same size as primary. (i used Primary cell as small hence used Standby – Small)
- Select the Storage
- Same network as primary
- For “Customize Template” Option only change will be
- System Name
- Installation ID should be different from Primary. (Using 1 for Primary & 2 for Standby-1)
- Rest all steps is same as Primary.
- Click next and FINISH.
- Once the VM is created successfully, POWER-ON the VM and its process get completed.
Check vCD DataBase Availability:
As standby cell is only a Database cell, we can check the successful configuration by login into the appliance management port |:5480|
HTTPS://IP_address:5480
In Figure 3, we can check the successful completion of the standby cell and added to the Database HA cluster.
Check Connectivity Status between vCD cells in Database HA Cluster:
How to check:
1) SSH to any cell in cluster using IP of eth1 (i am connecting to Primary Cell)
2) Change to user to postgres:
sudo -i -u postgres
3) Check the connectivity of the cluster using below mentioned command:
/opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf cluster matrix
As shown in the above Figure 1, All 3 Cells in the cluster are successfully connected to each other. Now i will manually Power-Off the “nvcdst2” to see what changes !
-> Where (*) means communication is healthy
-> Where (x) means packets are dropped
-> Where (?) means communication is down
Observation 1: (Figure 3)
* nvcdp can communicate to nvcdst1 and vice versa
but nvcdst2 cannot communicate to nvcdp & nvcdst1
So using cluster matrix command we are able to check the cluster connectivity.
Check Replication status of a node in Database HA Cluster:
How to check if the replication is going in fine or not?
1) SSH to any cell in cluster using IP of eth1 (In this i am connecting to Primary Cell)
2) Change to user to postgres:sudo -i -u postgres
3) Check the replication status of any node, same command can be used on a standby node as well:
/opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf node check
Observation 2: (Figure 4) The replication for downstream server i.e, nvcdst2 is stopped as we have turned off the vm.
Check status of a Database HA Cluster:
In above both points we checked the connectivity and replication status, now is the time to confirm the health of the Cluster itself.
How to:
1) SSH to any cell in cluster using IP of eth1 (In this i am connecting to Primary Cell)
2) Change to user to postgres:sudo -i -u postgres
3) Health check of the cluster function:/opt/vmware/vpostgres/current/bin/repmgr cluster show
Observation 3: (Figure 5) We have 3 nodes in the cluster and their health status.
Final Conclusion:
Using repmgr tool suite in the database high availability cluster we can check the
* Connectivity status
* Replication Status
* Health Status
Hope this helps.
Cheers
Samesh Dhankhar
Source: VMware vCD 9.7 Documentation
- How to Implement Hytrust KMS and enable vSAN encryption? - 16/10/2022
- How to delete Inaccessible objects in vSAN datastore? - 16/09/2022
- Availability options with vROPs 8. - 04/07/2022