Bug 129231

Summary: [ufs] [patch] New UFS mount (norandom) option - mostly useful for building redundant NFS servers
Product: Base System Reporter: nagy.attila
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: rew
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt none

Description nagy.attila 2008-11-27 13:30:01 UTC
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:
Comment 1 Gavin Atkinson freebsd_committer freebsd_triage 2008-11-27 22:33:24 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Not sure of the best mailing list to pass this to, make a guess that -fs 
is probably a good guess.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:33 UTC
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