Our last post can be found here, where we described why did we chose DRBD along with heartbeat, lighttpd and NFS. It is recommended to read that first to have idea why we are setting up this.
In this article i will explain how to configure it step by step. This is copy, paste HowTo you will need to replace the IPs and other information according to your requirements.
Example scenario :
node1.hackersgarage.com - 192.168.0.61 node2.hackersgarage.com - 192.168.0.62 LAN Virtual IP for NFS Service Virtual IP for LAN - 192.168.0.63 Internet Virtual IP for Lighttpd Service static.hackersgarage.com - 184.108.40.206
On node1 & node2 :
Install NTP – Network Time Protocol Service
yum install ntp
Sync time instantly
chkconfig ntpd on
Setting up Ethernet Bonding for LAN Ethernet cards
Now here we have three Ethernet cards installed in each server. eth1, eth2 will be use for LAN connectivity and eth0 for Internet Traffic.
Here We are considering eth1 and eth2 for bonding. and bond0 as virtual interface.
Add following in the bottom of this file.
alias bond0 bonding options bond0 mode=2 miimon=100
Load bond0 interface.
## Note update the MAC address. ##
DEVICE=eth1 BOOTPROTO=none HWADDR=00:1B:71:d9:3A:16 ONBOOT=yes MASTER=bond0 SLAVE=yes
DEVICE=eth2 BOOTPROTO=none HWADDR=00:27:8g:4c:3a:71 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes
DEVICE=bond0 BOOTPROTO=none ONBOOT=yes USERCTL=no NETMASK=255.255.255.0 IPADDR=192.168.0.61
Note : Now here repeat this for node2 make sure you put 192.168.0.62 as mentioned above.
In next phase, we will move forward to setup DRBD along with Heartbeat. Stay tune!