1834244 Members
1962 Online
110066 Solutions
New Discussion

nfs lock question

 
SOLVED
Go to solution
lshu
Frequent Advisor

nfs lock question

Hi everyone,

I setup a NFS server and 2 clients, they are both HP-UX 11.23. The file system exported from server can be mounted on clients without any issue. Then I did a test like this:
logon to both clients and edited the same file on the mounted file system at the same time; to my surprise, there is no error reported and I don't see any lock file under /var/statmon/sm in nfs server.

I think it is an error in the system. Am I right? In what situation, should I see a lock file? If it is an error, how can I fix it?

any comment is appreciated.
Thanks
Lorne

2 REPLIES 2
Dennis Handly
Acclaimed Contributor
Solution

Re: nfs lock question

Just about nothing is locked by default.
On Unix, you are suppose to use tools like rcs(1), and permissions, before you edit a file.

Some editors may tell you that the file has changed before you save it.

To get locks, the application must call lockf(2) or other fancier locks for databases.
lshu
Frequent Advisor

Re: nfs lock question

Thanks!