[DRBD-user] Mirroring between NFS servers

Kelsey Cummings kgc at corp.sonic.net
Fri Oct 26 19:22:08 CEST 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Fri, Oct 26, 2007 at 07:07:33PM +0200, Bernd Schubert wrote:
> On Friday 26 October 2007 18:47:23 Kelsey Cummings wrote:
> > On Fri, Oct 26, 2007 at 05:54:38PM +0200, Bernd Schubert wrote:
> > > On Friday 26 October 2007 16:51:00 Andreas Haase - evolver group wrote:
> > > > On Fri, 26 Oct 2007, Mark Watts wrote:
> > > > > DRBD could be used as the backing store for an HA NFS pair, but I
> > > > > believe NFS clients would have to reconnect on fail-over since
> > > > > file-handle state is stored in memory, not on disk.
> > > >
> > > > you can replace /var/lib/nfs by a sombolic link to a directory inside
> > > > your drbd filesystem. Then switching over to standby node is possible
> > > > without remounting filesystems from nfs clients. Depending on used
> > > > hardware it could also be necessary to provide as fsid in /etc/exports.
> > >
> > > In principle not neccessary any more with linux-2.6.x, you need to have
> > > mounted /proc/fs/nfsd.
> >
> > What do you mean by 'in principle' not neccessary anymore with 2.6?  I've
> > just finished an active/active NFS cluster with DRBD and heartbeat and had
> 
> Active/active with NFS? How are you doing that? Your clients mount from *one* 
> IP, but this IP can't be set on both servers at the same time?
> Well, one drbd point of view it can be active/active using gfs or ocfs2, but 
> from from clients point of view there always can be only one nfs server per 
> export.

Let me clarify: active-active as a pair of servers each with a pair of drbd
volumes.  Heartbeat does the work of keeping two virtual nfs servers up and
prefers to have one on each node.  So far, it seems to work, but I have to
confess that heartbeat gives me headaches and I'm not convinced my fencing
is properly setup but I'm going to production anyway.  As for the rest of
the config, it's my intention to put a howto together since nothing that I
found specifically covered how to do it but I'm not that good at
documentation.

> > trouble with 'stale nfs filehandles' until I moved the nfs state dir to
> > something inside the export.
> 
> Is /proc/fs/nfsd mounted on your servers? If not, you need to do something 
> like "mount -t nfsd nfsd /proc/fs/nfsd", or at it to you fstab.

Yep:
a.store# nfsd on /proc/fs/nfsd type nfsd (rw)
b.store# nfsd on /proc/fs/nfsd type nfsd (rw)

I think my problem was fixed by keeping the rmtabs on the servers in sync
(so both node's exports show up.)

-- 
Kelsey Cummings - kgc at corp.sonic.net      sonic.net, inc.
System Architect                          2260 Apollo Way
707.522.1000                              Santa Rosa, CA 95407



More information about the drbd-user mailing list