Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Locking a file in NFS with proper exception handling

by bluto (Curate)
on Jun 20, 2005 at 19:32 UTC ( [id://468464]=note: print w/replies, xml ) Need Help??


in reply to Locking a file in NFS with proper exception handling

File locking on NFS has a very checkered past. I've heard of cases where an NFS vendor claimed to have something working when in reality it didn't. IMHO, even if a vender gets locking to work all of the time, if you write data through NFS then it is only a matter of time before you see data corruption, and this includes lock files, but YMMV.

There are some interesting hacks for NFS that try to get around this that tend to rely on knowing that there are certain atomic operations in the NFS server like rename/link. Look at CPAN's File::NFSLock if you are interested in this. FWIW, I've never used it, but it sounds like it does something like this. Whatever solution you use make sure you test it thoroughly on the machine/server you expect it to work on.

  • Comment on Re: Locking a file in NFS with proper exception handling

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://468464]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found