1

So I am trying to set up a redundant NFS share in a cloud environment(all links internal, half gig links), and I am looking into using heartbeat for failover, but all the guides seem to be about combining DRBD and heartbeat to create a robust environment. If need be I can do that, but since my content is almost completely static, I would like to avoid the extra overhead and complexity of DRBD if possible, but still be able to fail over if one of the NFS servers fails. Is it possible to use heartbeat with NFS to achieve high-availability without using DRBD to copy the blocks? I am not married to NFSv4, so if NFSv3 over UDP is necessary, that won't be a problem(only a very small number of clients will be connecting to the share)

Any comments are appreciated.

2
  • Yes, you create a floating IP and have heartbeat attach it to the server that is "up." You want to be sure not to enable auto fall-back and set up a system to ensure the current active NFS server syncs it's changes to the slave as often as needed (rsync is easy for this task). Jul 3, 2012 at 1:49
  • @MarkWagner that should be an answer, not a comment.
    – Nils
    Oct 11, 2012 at 21:19

1 Answer 1

1

I don't think NFS supports accessing files in the share when the server is offline. If eventual consistency is good enough for your application, you could use a tool like csync2 to synchronize the static files between servers.

In our environment, cron starts csync2 every minute on a pair of web servers to sync the files in /var/apps/nimbus/files. Configuration follows:

group files {
    host    [email protected];
    host    [email protected];
    key     /etc/csync2_ssl_cert.key;

    include /var/apps/nimbus/files/;

    auto    younger;
}

You must log in to answer this question.

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