Is it possible to create a fault tolerant, redundant NFS server (e.g. master/slave)?

Several of my web servers mount their WEBroot directories from a single NFS server (which is regularly backed up). Just trying to remove any SPOFs.


Yes, it's fairly simple. You just need to have some sort of shared storage (DRBD works well, although on EC2, an EBS could work too), store the NFS lock state on said shared storage (so locks are maintained across failover), and then run something to detect failure and transition resources to the standby node (LinuxHA, in the form of heartbeat, works well for this).

On EC2, though, it's largely unnecessary -- just have something detect that your NFS server instance isn't running right (or has crashed out completely) and fire up a new one from scratch. Much cleaner.

Oh, and mounting roots from NFS in EC2 is a spectacularly bad idea -- far better to use AMIs.

  • Thanks! Yea this is on EC2. My apologies, I meant to write that I'm mounting the "webroots". How do you implement "lock state" storage with NFS? What do you think is the best way to manage launching the new instance + reattaching the EBS volume? Auto-scaling? – Trent Scott Sep 19 '11 at 2:49

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.