In our environment we use redundant (and even load balanced) RO NFS servers with CARP.
To archieve this, FreeBSD currently does not offer any help, because it lacks shared (cluster) filesystems, or any other tools to achieve inode consistency between the nodes.
This patch adds a new mount option, named norandom, which -when enabled- removes arc4random calls in the inode creation path.
When a filesystem is mounted with norandom, and exactly the same modifications happen on two machines, the resulting file system state will be the same.
This means if you have two (or more) -shared nothing- NFS servers with norandom mounted file systems and you do -for example as we do- svn updates to each, the inodes will match across the nodes, so it is possible to build redundant (read only from the client side of course, but if you can replicate the NFS operations to each nodes, even RW is possible) NFS servers with an IP failover mechanism (like CARP) without the danger of getting "Stale NFS file handles" at switchover time.
Matching inodes also make possible to use load balanced (also with CARP) NFS servers too.
We have several redundant NFS file servers spread across multiple physical locations running with this patch without any ill effects in the last two years.
Fix: See the attached patch.
Patch attached with submission follows:
Not sure of the best mailing list to pass this to, make a guess that -fs
is probably a good guess.
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped