Troubleshooting "No locks available" errors on NFS v3 shares
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
flockcommand 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.