I'm building a somewhat minimalistic system that collects serial port data and shoves it into a logfile on an NFS mount.
In an effort to reduce the system somewhat I decided to disable RPC as I couldn't see the use for it, and this resulted in the following warning:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
No suprise that RPC was involved in NFS, really, so my next step is to remove the warning. I have the choice of either re-enabling RPC, or use -o nolock
as suggested.
So the question is then, what does remote locking do, exactly? In this particular case, the NFS mount is only written to by the machine in question, and there is no potential for conflicts such as multiple processes writing to the same file. (although, there are several processes writing to each their own logfile)
Running debian buster, kernel 4.19
EDIT: I tried -o nolock
, and things seem to be working fine, so at first glance, there are no adverse effects.
The answer lies in the good old man page of rpc.statd:
So basically, rpc.statd running on the NFS server prevents processes running on other NFS clients from accessing files you've locked from your client machine. As long as there's only one client, local locks are fine. But usually NFS is all about sharing.