Re: [LIP] problem with fcntl while locking file on NFS

[email protected]
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Gaurav Varshney posted in linux-india-programmers:
> Binand,
> 
> I tried with "ssll" instead of "ssLL" but still 
> facing the same problem -
> 
>   "INFO    >> Could not lock file Invalid argument"
> 
> 
> I am not sure about nfs server, but i am not dealing
> with large files. BTW, i tried handling the EINVAL in
> the same way as i am handling EINTR, but this ended 
> up in an infinite loop and process got hung (strace
> showed it was in an infinite loop).

You didn't mention your NFS server/client versions.

Further, do you have the nfslock service running to the server and
client? Run rpcinfo -p and look for nlockmgr. The NFS protocol itself
has no support for file locking, you need this additional RPC service
to implement file locking over NFS.

http://www.hn.edu.cn/book/NetWork/NetworkingBookshelf_2ndEd/nfs/ch11_02.htm

(Looks like an illegal copy of the book, please buy an O'Reilly book today!)

Binand

-- 
Hanlon's Razor: Never attribute to malice that which can be adequately
explained by stupidity.
Bruce's Razor: Never attribute to stupidity that which can be adequately
explained by Microsoft funding.


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.