I'm wanting to use lockd on my nfs server, but first I'm trying to make sure it will do exactly what I'm thinking it will do. I haven't been able to find a good concise writeup on it and the manpage isn't too helpful, so I thought I'd ask the forum.
The setup:
*NFS server and two NFS clients with their shares mounted at all times (SERVER, CLIENT0, CLIENT1
*One service on the server which has to be able to read any file on the share at any given time
*The same service also needs to be able to create new files in the directory at any given time.
So, what I am expecting to happen with lockd is that I could have any file on the mount open on CLIENT0, and SERVER and CLIENT1 cannot make edits to that open file. Both, however, can interact with file as read-only while CLIENT0 has it open. Meaning, the service on SERVER can read whatever it needs to read, and CLIENT1 can simultaneously just view the contents.
So to summarize, my basic understanding is that the files all just sit there on the server, and whoever opens them first locks it for editing, but anyone can still read the file (although without any changes being made by the opener). Is this correct?
The setup:
*NFS server and two NFS clients with their shares mounted at all times (SERVER, CLIENT0, CLIENT1
*One service on the server which has to be able to read any file on the share at any given time
*The same service also needs to be able to create new files in the directory at any given time.
So, what I am expecting to happen with lockd is that I could have any file on the mount open on CLIENT0, and SERVER and CLIENT1 cannot make edits to that open file. Both, however, can interact with file as read-only while CLIENT0 has it open. Meaning, the service on SERVER can read whatever it needs to read, and CLIENT1 can simultaneously just view the contents.
So to summarize, my basic understanding is that the files all just sit there on the server, and whoever opens them first locks it for editing, but anyone can still read the file (although without any changes being made by the opener). Is this correct?