Setting Up A Highly Available NFS Server - Page 3
6 Configure DRBDNow we load the DRBD kernel module on both server1 and server2. We need to do this only now because afterwards it will be loaded by the DRBD init script. server1/server2: modprobe drbd Let's configure DRBD: server1/server2: drbdadm up all The last command should show something like this (on both server1 and server2):
You see that both NFS servers say that they are secondary and that the data is inconsistant. This is because no initial sync has been made yet. I want to make server1 the primary NFS server and server2 the "hot-standby", If server1 fails, server2 takes over, and if server1 comes back then all data that has changed in the meantime is mirrored back from server2 to server1 so that data is always consistent. This next step has to be done only on server1! server1: drbdadm -- --do-what-I-say primary all Now we start the initial sync between server1 and server2 so that the data on both servers becomes consistent. On server1, we do this: server1: drbdadm -- connect all The initial sync is going to take a few hours (depending on the size of /dev/sda8 (/dev/hda8...)) so please be patient. You can see the progress of the initial sync like this on server1 or server2: server1/server2: cat /proc/drbd The output should look like this:
When the initial sync is finished, the output should look like this:
7 Some Further NFS ConfigurationNFS stores some important information (e.g. information about file locks, etc.) in /var/lib/nfs. Now what happens if server1 goes down? server2 takes over, but its information in /var/lib/nfs will be different from the information in server1's /var/lib/nfs directory. Therefore we do some tweaking so that these details will be stored on our /data partition (/dev/sda8 or /dev/hda8...) which is mirrored by DRBD between server1 and server2. So if server1 goes down server2 can use the NFS details of server1. server1/server2: mkdir /data server1: mount -t ext3 /dev/drbd0 /data server2: rm -fr /var/lib/nfs/
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com
Red Hat Virtual Experience - a free virtual event. Dec. 9th





print: 
Recent comments
16 hours 1 min ago
19 hours 37 min ago
21 hours 35 min ago
1 day 6 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 14 hours ago
1 day 19 hours ago