NFS lock not working properly

9,992

Check your logs for messages containing locking. If there are problems setting up logging, then it should should be locked.

Is statd running? It is needed for locking to work on NFS versions before 4.

Alternatively, you may try mounting with the option for local lock management. This is not recommended if you have remote clients for the file systems.

Share:
9,992

Related videos on Youtube

Daniel Stolf
Author by

Daniel Stolf

Updated on September 18, 2022

Comments

  • Daniel Stolf
    Daniel Stolf almost 2 years

    I'm getting the following error on an oracle database.

    ORA-27086: unable to lock file - already in use
    

    It tries to lock a file that resides in an NFS mount.

    The NFS is on a loopback setup (long story short, I need it this way because of direct nfs) and I traced the error to nlockmgr not going up, even when I restart nfs, nfslock and rpcbind.

    Does anybody knows how to get nlockmgr up again?

    p08[oracle] () /$ cat /etc/issue
    Red Hat Enterprise Linux Server release 6.5 (Santiago)
    

    Here's the exit for rpcinfo -s:

    [root@p08 init.d]# rpcinfo -s
       program version(s) netid(s)                         service     owner
        100000  2,3,4     local,udp,tcp,udp6,tcp6          portmapper  superuser
        100011  2,1       tcp,udp                          rquotad     superuser
        100005  3,2,1     tcp6,udp6,tcp,udp                mountd      superuser
        100003  4,3,2     udp6,tcp6,udp,tcp                nfs         superuser
        100227  3,2       udp6,tcp6,udp,tcp                nfs_acl     superuser
        100024  1         tcp6,udp6,tcp,udp                status      29
    

    EDIT:

    I found a script executed by the sysadmin after every reboot. After the reboot, nlockmgr is running. After executing this script, it vanishes from rpc.

    service xinetd stop
    service rpcbind stop
    service nfslock stop
    service nfs stop
    service xinetd start
    service rpcbind start
    service nfslock start
    service nfs start
    
  • Daniel Stolf
    Daniel Stolf over 9 years
    Hi, statd is running [root@p08 ~]# service nfslock status rpc.statd (pid 17649) is running... Additionally, on /var/log/message I see Oct 2 08:54:41 p08 rpc.statd[19005]: Version 1.2.3 starting I couldn't find anything with 'lock' on /var/log/message. Mounting with the option for local lock management would be the nolock option? I tried that, but oracle is very sensitive of the mount options and it didn't work properly. I really need the nlockmgr up and running.