Together with the lockdclnt daemon, lockdsrv implements the Network Lock Manager (NLM). NLM is a service that provides support for working with file locks via NFS. lockdsrv must be running on every NLM server and every NLM client. It processes NLM requests from remote clients. In addition, lockdsrv registers the clients with the statd status daemon.
One of the main tasks of lockdsrv is to manage blocked attempts to set a file lock. A process attempts to set a lock, this fails, and the process blocks. If a lock that was previously blocked can be obtained on the server, lockdsrv notifies the lockdsrv process running on the client. This in turn ensures that the client process which was blocked because it could not set the lock, can now continue.
During initialization, lockdsrv uses statd to provide information to all NLM clients registered on the server. During a "grace period", which can be defined by the system administrator, the clients can reestablish locks that have been lost on the server as a result of a crash, for example. Any NLM requests other than reestablishing locks will be rejected by lockdsrv during this period.
lockdsrv is started automatically when NFS is started. If the daemon is not running, the system log file should be checked for error messages from lockdsrv.
Path: /usr/lib/nfs
Syntax
lockdsrv[ -g grace_period][ -t retry_timeout][ -f nr_file][ -s] |
Grace period in seconds, during which NLM clients can reestablish lost locks. grace_period has the format:
Minimum total time of grace period.
Following each lock reestablishment, lockdsrv prolongs the grace period for at least another wait seconds, provided the maximum total time of the grace period will not be exceeded.
Maximum total time of grace period. The default value for grace_period is: |
When locks block, lockdsrv attempts to reestablish them all every retry_timeout seconds. The default value is 60 seconds. |
nr_file determines the number of files on the server that can be locked by NLM clients. The default value is 1024. |
A message is written to the system log file if conflicts arise when establishing file shares (usually by PC clients). |