Troubleshooting "No locks available" errors on NFS v3 shares

Solution Verified - Updated -

Issue

  • Why acquiring an exclusive lock on a NFS share, returns "No locks available"?
    • NFS client can not lock files using NFSv3.
    • NFS client can lock a file using NFSv4.x
    • Packet capture shows no NLM LOCK Calls.
  • The flock command fails to find locks.

    # flock  "/mnt/test.txt" --command "echo file locked"
    flock: /mnt/test.txt: No locks available
    

Environment

  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • NFS v3
  • NLM

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content