I've been using NFS (and it is the only one i know well in Network Files) for a few years. But still can not able to find out ..

  • How to make NFS Servers in Clustered Design (or Load-balanced?)
  • Or at least to having it deployed on MORE-THEN-ONE Server and to "Automatic Failover".

The major objective is to NOT TO let my single running NFS Server a Single-point-of-Failure.

Since i do not know how to make it properly, so far i have invented on my own is:

  1. NFS on 2 Servers.
  2. RSYNC from 1st (assumed Master) Server to another 2nd Server.
  3. From Application (Web, etc) Servers, put a Shell Script to check the healthy state of NSF-Master Server Mount Point. And then if need, auto-unmount from it (leaving) and then auto-mount from 2nd one.
  4. The main function i used in my automatic Shell Script, is nfsstat -m .. to check the health of mount point.

(I'm using Redhat)

But anyway, i still DO NOT think it is the safe & standard way.

  • 1
    This question is a couple of years old but AFAIAC still a valid one. Are there any advances in creating fileserver redundancy over NFS since 2014 ?
    – Mausy5043
    Jan 9, 2022 at 8:55

6 Answers 6


This tutorial, titled: Highly Available NFS Cluster: Setup Corosync & Pacemaker shows how to setup a NFS active/active using NFS, Corosync, & Pacemaker. Alternatively you could follow this guide titled: Highly Available NFS Storage with DRBD and Pacemaker which shows setting up an active/active using DRDB & Pacemaker.

You'll also probably want to take a look at these other links to familiarize yourself with the various technologies and terminologies.

This ServerFault Q&A should also prove helpful, linux clustered Filesystem.

Additional references

  • @AndrewSavinykh - that link shows active/passive you shared if that's what you're looking for.
    – slm
    Aug 14, 2018 at 22:15
  • Nfs share communication happen over tcp layer ? Jan 2, 2021 at 0:50

This is just one of the many ways in which NFS sucks.

There is no way to do this just with NFS up to version 3. You are going to have to add on the functionality manually.

This probably means:

  • data replication or some shared storage
  • IP takeover
  • Some sort of heartbeat monitoring
  • Cluster management

There are packages out there to do all of this but you will have to integrate them for your organisation.

The Linux HA project was set up many years ago to implement some of these things. http://www.linux-ha.org/

You should find most of what they have done already packaged in whatever popular distribution you are using.

Worth noting... The single largest cause of failure of a system (by far) is administrative error and HA clusters are by definition a complex system and more prone to admin error.

OK beyond NFS v4, NFS v4 starts to implement some of the scalability, security and availability functionality which AFS has had for 20 years, it isn't by any means fully or widely implemented yet or even entirely compatible with various clients and servers, but if you are using NFS, start with v4 and check out what has been implemented already on your platform.

  • AFS was amazing, and is largely forgotten... +1 for it's honorable mention
    – glallen
    Jun 28, 2017 at 14:04

You cannot have NFS as active-active cluster as far as I know. Now, for Active-Passive there are certain tools that help you achieve this. I'm more familiar with Solaris OS and Solaris Cluster that provide you the possibility to create a high-availability NFS share/shares depending on your objective.

One thing that you will need is a shared storage that can be moved from Server A to Server B and vice versa in case of need. Ideally iSCSI or SAN Storage. And a IP associated with the NFS share.

The cluster will work like this. In case of failure of Server A, Server B will enable the IP associate with the NFS server and take ownership of the shared disk, mount it and start the NFS server. Same goes in case Server B fails and Server A is up.

If you want to this manually then as basic steps you will need, monitoring scripts and scripts to enable and disable the services automatically.

Take a look here for Redhat

  • I set up an active/active NFS cluster using a load balancer, CentOS, DRBD, GFS2, and Pacemaker. See my answer for more info. Feb 9, 2015 at 19:10

The Red Hat RHSS / RHGS (Red Hat Storage/Gluster Server) product, does this perfectly, using a FUSE-based GlusterFS client to proxy NFS connections to a running back-end server, while maintaining multiple server node back-end mirrored storage, all transparent to the client side. This is a very slick solution that will work for you. You can either install the EPEL / Extra RPM's solution, or buy it from Red Hat. The client side, you simply use FUSE/glusterfs or NFS as the mount type in fstab. No messy quarum/fencing issues what-so-ever.

  • I Agree ,Works fine and configuration is simple
    – elbarna
    Nov 20, 2018 at 8:29
  • Is there a how to link you recommend to get this setup followed?
    – laimison
    Jun 23, 2020 at 13:39

I set up a redundant pair of NFS file servers in an "dual primary" active/active configuration using a load balancer, CentOS, NFS, DRBD (replication), GFS2 (clustered file system) and Pacemaker (cluster management).

Here is a guide for this implementation at RackSpace, but it would be similar in any other environment.

Howto setup Dual Primary DRBD on CentOS 6: GFS2 & Pacemaker.


This is ultra nice and simple how-to,tried and works fine.


Personally i prefer lvs because combine ha with load balance,but i have tried with nfs+gfs2+drbd and works really bad. Maybe i need some how to,but i can't find none about lvs+nfs ha

  • But how do i Virtual IP as mentioned there, over the Servers? (I don't know) Feb 9, 2015 at 10:48
  • I'm setup atm a lvs server,for create a virtualip you need lvs,and if you want there is a nice web interface called pirahna gui for create virtualip.Read this pdf for example guug.de/lokal/hamburg/talks/Linux-Terminal-Cluster-UNIHH.pdf
    – elbarna
    Feb 9, 2015 at 15:11
  • I'm tryng now to setup lvs,virtualip..is near impossible,when nfs is mounted from a remote,and one server is down,nfs is blocked even in the last server and in remote client.
    – elbarna
    Feb 10, 2015 at 21:22
  • No way,is impossible active/active cluster with nfs
    – elbarna
    Feb 11, 2015 at 11:00
  • But fortunately we can have pnfs
    – elbarna
    Feb 11, 2015 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .