Replication using DRBD
In this recipe, we are going to cover block level replication using DRBD for Postgresql.
Getting ready
A working Linux machine is required for this setup. This setup requires network interfaces and the cLusterIP. These steps are carried out in a CentOS version 6 machine. Having covered the PostgreSQL setup in previous chapters, it is assumed that the necessary packages and prerequisites are already installed.
We will be using the following setup in our hierarchy:
Node1.author.orguses the LAN IP address10.0.0.181and uses172.16.0.1for crossoverNode2.author.orguses the LAN IP address10.0.0.182and uses the IP address172.16.0.2for crossoverdbip.author.orguses the cluster IP address10.0.0.180
How to do it...
The following are the steps for block level replication using DRBD:
First, temporarily disable
SELINUXand setSELINUXtodisabledand then save the file:     vi /etc/selinux/config      SELINUX=disabled
In the next step, change the
hostnameand gateway...