【问题描述】
挂载nfs服务器提示:svc: failed to register lockdv1 RPC service (errno 111)。
【问题原因】
nfs mount 默认选项包括文件锁,依赖于portmap提供的动态端口分配功能。
【解决方案】
mount命令添加**-o nolock**选项。
Using file locks with NFS
The Network Lock Manager protocol is a separate sideband protocol used to manage file locks in NFS version 2 and version 3. To support lock recovery after a client or server reboot, a second
sideband protocol -- known as the Network Status Manager protocol -- is also required. In NFS version 4, file locking is supported directly in the main NFS protocol, and the NLM and NSM side‐
band protocols are not used.
In most cases, NLM and NSM services are started automatically, and no extra configuration is required. Configure all NFS clients with fully-qualified domain names to ensure that NFS servers
can find clients to notify them of server reboots.
NLM supports advisory file locks only. To lock NFS files, use fcntl(2) with the F_GETLK and F_SETLK commands. The NFS client converts file locks obtained via flock(2) to advisory locks.
When mounting servers that do not support the NLM protocol, or when mounting an NFS server through a firewall that blocks the NLM service port, specify the nolock mount option. NLM locking
must be disabled with the nolock option when using NFS to mount /var because /var contains files used by the NLM implementation on Linux.
Specifying the nolock option may also be advised to improve the performance of a proprietary application which runs on a single client and uses file locks extensively.