Showing results for 
Search instead for 
Do you mean 

NFS V4 locking

Valued Contributor Valued Contributor

NFS V4 locking

  Have been testing some NFS version 4 exports from a RHEL 4.8 server

and its quckly become apparent that there are issues with locking.


  Basically the fcntl(2) and lockf(2) system call interfaces don't work.

On an V4 mount these calls always fail with errno ENOLCK - no

locks available.


 Contrary to what is stated by its man page, flock(2)  does work over

NFS V3  or V4, at least from version FC13 and Scientific Linux clients.


Can anyone shed any light on the basic issue?  I am wondering

if I need some Kernel update or other.. Currently running 2.6.18-164

Acclaimed Contributor Acclaimed Contributor

Re: NFS V4 locking

Do you have to have a demon running on the server like HP-UX?

Valued Contributor Valued Contributor

Re: NFS V4 locking

Yes the rpc.nfsd demons are still there under NFS Version 4 .


Anyway, I have tried V4 locking on a RHEL5 test server

and that all works as expected..


 Someone related to me  on the Red Hat forums that

they had had to revert to NFS V3 under RHEL4.


 So I guess it is some sort of kernel issue, that

will,likely, never be resolved by now.