[Linux-HA] Dual DRBD/NFS question
jeff at jltnet.com
Thu Jun 3 21:48:31 MDT 2004
A couple months ago I asked about high reliability, fast fileservers. After
looking at the responses, I decided to build two very fast SCSI arrays and
mirror them via DRBD. All of this is working and I've read the information
that's been sent to the list in the last couple months about HA NFS. I do
have a couple questions, though.
I was hoping to balance the load between the two machines instead of having
a strict primary and backup. In my application, I can split the data into
two halves, say /data1 and /data2. I split the disk arrays into half and
configured DRBD to mount /data1 on one machine and /data2 on the other
machine by default. I have heartbeat controlling this and stopping one
machine correctly causes DRBD to pick up that resource so that /data1 and
/data2 are on the same machine. Obviously all writes still go to both
machines, but the idea here was that half the reads would happen on one
machine and half on the other (as long as /data1 and /data2 are being read
similarly). This is similar to a RAID-1 controller that is smart enough to
split up the reads between the two mirrors.
My questions relate to exporting these via NFS:
1. Everything I've read indicates that /var/lib/nfs needs to be on a shared
medium so it can move between the two machines. In my application, though,
I was hoping to have NFS running on both machines all the time. I'm not
going to be starting NFS on the second machine on a failover. It will
already be running but needs to pick up the data from the failed machine.
That would imply some kind of merging of the data between the two machines.
Any idea how to do that?
2. Similarly, when a machine fails, the other machine needs to export its
filesystem, not start the NFS server. So, I'm thinking that I need a script
that actually manipulates /etc/exports, then does an "exportfs -ra" or
something like that. Has anyone done this before and might have a script to
3. My idea was to have an IP address associated with /data1 and a different
IP with /data2. These IP's would fail over with the data and is how the
clients would mount the directories. So, again, when the system fails over
the NFS server would already be running. Will it answer queries on an IP
address that apears later after it has already been running a while?
If all of this is just too much, I can go back to a traditional system
where NFS runs on only one host at a time. It just seems that in any
application where you have a high proportion of reads, you'd be able to
improve performance (seeks / sec) by being able to read across all the
disks in the system and not just half of them.
p.s. If anybody is interested in the hardware specifics of the system, I'll
be glad to share those. The system is built to be as fast as possible in
terms of random seeks per second as well as no SPOF.
More information about the Linux-HA