title: Track changes in nfs / sync nfs over multiple datacenters
body: <p>We have two datacenters, each with a number of Linux servers that share a large EMC-based nfs.</p>
  
  <p>The challenge is to keep the two nfs' in sync. For the moment assume that writes will only occur to nfs1, which then has to propagate the changes to nfs2.</p>
  
  <p>Periodic generic rsyncs have proved too slow - each rsync takes several hours to complete, even with -az. We need to do specific syncs when a file or directory actually changes.</p>
  
  <p>So then the problem is, how do we know when a file or directory has changed? inotify is the obvious answer, but it famously does not work with nfs. (There is some chatter about inotify possibly working if it is installed on the nfs server, but that isn't an option for us - we only have control of the clients, not the server.)</p>
  
  <p>Does the linux nfs client allow you to capture all the changes it sends to the server, in a logfile or otherwise? Or could we hack the client to do this? We could then collect the changes from each client and periodically kick off targeted rsyncs.</p>
  
  <p>Any other ideas welcome. Thanks!</p>