O'Reilly logo

PostgreSQL Cookbook by Chitij Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 a cluster IP. These steps are carried out in a CentOS Version 6 machine. Having covered the PostgreSQL setup in the 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.example.org uses the LAN's IP address 10.0.0.181 and uses 172.16.0.1 for crossovers
  • Node2.example.org uses the LAN's IP address 10.0.0.182 and the IP address 172.16.0.2 for crossovers
  • dbip.example.org uses the cluster IP address 10.0.0.180

How to do it...

Perform ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required