Simple NFS failover solution with symbolic link?
I've been trying to find a high availability file storage solution without success. I tried GlusterFS which looks very promising but experienced problems with stability and don't want something I can't easily control and rely on. Other solutions are too complicated or have a SPOF.
So I'm thinking of the following setup:
Two NFS servers, a primary and a warm backup. The primary server will be rsynced with the warm backup every minute or two. I can do it so frequently as a PHP script will know which directories have changed recently from a database and only rsync those. Both servers will be NFS mounted on a cluster of web servers as /mnt/nfs-primary (sym linked as /home/websites) and /mnt/nfs-backup.
I'll then use Ucarp (http://www.ucarp.org/project/ucarp) to monitor both NFS servers availability every couple of seconds and when one goes down, the Ucarp up script will be set to change the symbolic link on all web servers for the /home/websites dir from /mnt/nfs-primary to /mnt/nfs-backup
The rsync script will then switch and the backup NFS will become primary and backup to the previous primary when it gets back online.
Can it really be this simple or am I missing something? Just setting up a trial system now but would be interested in feedback. :)
Also, I can't find out whether it's best to use NFS V3 or V4 these days?