Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: NFS locking with Fcntl

by mr_mischief (Monsignor)
on May 10, 2016 at 22:04 UTC ( #1162670=note: print w/replies, xml ) Need Help??


in reply to NFS locking with Fcntl

What exactly is wrong with File::NFSLock that you have to find an alternative?

What type of locking do you need or want? Do you want atomic, mandatory locking? Do you want advisory locking for a single application?

Why are you using a filesystem that's long been known to have problems with this sort of thing when there are many shared filesystems and clustered, more reliable filesystems that don't?

Replies are listed 'Best First'.
Re^2: NFS locking with Fcntl
by taint (Chaplain) on May 11, 2016 at 01:00 UTC
    +1, mr_mischief.

    Thanks for saying that, as it got me to thinking that maybe Preceptor might be even better off trying something like Fuse. I think it matches his requirements to-the-letter. Albeit completely without nfs; it's written in Perl, and is OS agnostic. Well tested, and requires little effort on his part.

    Seems a perfect fit! :)

    --Chris

    °λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

      There's alternatives, but my actual requirement was to verify whether 'filesystem locking' works on NFS. Which is really vague, I know. But that was why I was seeking a system call based option, as that gives me a basis to say "it works" in at least an approximately language agnostic way.

      FWIW - on a 2.6.12+ Linux kernel, both flock and fcntl work. You will still have platform specific issues doing it regardless, but that isn't a new storage when it comes to NFS.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2020-09-29 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (145 votes). Check out past polls.

    Notices?