How to setup a redundant NFS server with DRBD and Heartbeat in CentOS 5

How to setup a redundant NFS server with DRBD and Heartbeat in CentOS 5

This tutorial will guide you through the entire process of setting up a highly available NFS server.  To proceed, you must have the following:

1. 2 servers with similar hard disk setup (These will be used to create a redundant nfs server)
2. atleast 1 server where the nfs share will be mounted.
3. Static IPs
4. Basic knowledge of vi (:q! = quit, :wq = write and then quit, i = insert mode, esc = leave insert mode, dd = delete line when not in insert mode)

First off, install CentOS on both machines.  During the install process, create a separate blank partition on both machines to be used as your nfs mount.  Set the mount point to /data during installation.

From this point on i’m going to be referring to both nfs servers by their IPs and hostnames.  Server1 will be nfs1 with ip 10.132.196.221 and server2 will be nfs2 with ip 10.132.196.222.  Your private IPs might be different so make sure to put in the correct IPs where necessary within this tutorial.

(more…)