Linux – redundant nfs share

debianfilesystemslinuxnfsredundancy

We are storing files on a network share, our application is mountig this drive using nfs. Now we have the requirement to have this drive redundant.

  1. We can add a second server and then synchronize the direcory with this server. What are the best approaches to do the synchronisation?

  2. If one server is out of order, how can we do the failover? Is there a way in nfs to specify a backup drive and nfs is automatically getting the data from the backup drive? If this is not possible with nfs, is there another filesystem which supports something like that?

Best Answer

It looks like this is a good candidate for HA Cluster with DRB. Something like this:

http://www.howtoforge.com/highly-available-nfs-server-using-drbd-and-heartbeat-on-debian-5.0-lenny

Not the best description, though, so I would suggest going here as a starting point.

http://www.drbd.org/

Essentially, you have two servers and the drive is being replicated from server to another. that drive is exported via NFS, which is then mounted by the client via dedicated IP on one of the servers. If one server fails, , failover will be almost transparent, as it is just the matter of making the other server the primary and moving that IP from one server to another (manually or automatically).