1

What is the basic process behind high availability nfs over 2 servers? Let's say that I'm using heartbeat to fail over a floating IP between the 2. I then have a third party server that mounts an nfs share based off that IP. The idea being that I can manipulate files and then if a fail over occurs, the nfs will remain active and it will be temporarily unavailable as the nfs and IP is switched to the other server.

However, I'm wondering about the workflow. At the moment with manual fail over, I can have node1 as drbd primary and mount the drbd as nfs export with floating IP. Then if I want to fail over, I can unmount the drbd drive, set the server to secondary, then set node2 to primary, mount drbd nfs and then the new IP will come up on node2.

Is this the right idea? If I try and unmount the nfs/drbd mount gracefully, it can fail because nfs is still accessing it (aka if the third party server is accessing the share).

Is there a way to have a similar process with manual failover but quickly fail over?

1
  • don't use heartbeat if you are starting with new project, because is deprecated, any way is more easy if you try to read the cluster labs clusterlabs.org docs.
    – c4f4t0r
    May 15 '15 at 10:03
2

Following your approach you need to take in mind to stop the nfs service when you perform the failover, so the steps should be:

  1. Stop NFS service on node2
  2. Umount the NFS drive on node2
  3. Float the service IP address from node2 to node1
  4. Mount the NFS drive on node1
  5. Start the NFS service on node1

You have other alternatives, for example you can use a cluster FileSystem (like RedHat's GFS), this way you can have mounted the NFS drive on both servers. Then is up to you if you want to just move from node to node in case of failure or even balance them in some way so they are Active/Active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.