How to use NFS locks or any other mechanism to keep data in sync on multiple mountpoints

24 Views Asked by At

I have few nodes which reads/writes some data from/to its own nodes. This data somehow has to be replicated to all the other nodes and be in sync at any given time, be it read or write operation.

As I see it there is two issues here:

  1. Sharing the data
  2. Keeping the data in sync wrt all the nodes

The solution I am thinking of is to have each node to have mount points from other nodes. Whenever there is write request on one node, the node in question writes data to all the remaining nodes i.e., on all the mountpoints. Similar operation could be think of for reads. This solves one problem. But how do I keep the data on all the mount points (i.e., on all the nodes) in sync?

Does NFS provide any locking mechanism which could be utilized here?

Also, the shared mountpoints' directories can have multiple sub-dir's and the files under it needs to be in same across all the nodes.

0

There are 0 best solutions below