Good NFS multipath solution

Solution 1:

Have a look at the RedHat Cluster Suite NFS Cookbook, subtitled "Setting up a Load­Balanced NFS Cluster with Failover Capabilities". I think this may have some good suggestions, if it's not exactly what you're looking for.

You can take the ideas presented in that document and implement them using Pacemaker/Corosync, which I find much easier to work with than the legacy RedHat cluster tools.

You're basically asking for an active/active cluster with automatic failover. Since you're serving out from two independent -- but synchronized -- copies of the data, you've actually sidestepped most of the complicating issues that crop up (involving locking and other state synchronization) if you're actually trying to create a load-balancing NFS front-end to some sort of shared storage (e.g., a cluster filesystem like GFS).

Solution 2:

You could use CTDB to do that. It supports NFS with correct file locking behaviour and lock recovery. Also, it is an active-active solution i.e. all NFS servers are active at the same time and the clients access them via service IP addresses (DNS round-robin) which can move from server to server in case of a node failure.

However, it a) is a server-side solution and b) requires a cluster filesystem like e.g. GPFS or GFS (which OTOH could be an advantage in comparison to your unison solution).