tab of the previous dialog box. Notice that the Network lock manager daemon is
stopped. This could indicate that it encountered a problem by trying to start up.
Alternately, it could mean that the administrator chose to end it specifically because
of no need for byte range locking.
Both NFS and RPC share the same Remote Procedure Call Binder daemon.
Starting or stopping NFS will start or stop RPC, and vice versa. For example,
stopping the RPC server will end the Remote procedure call NFS daemon and may
cause NFS to stop functioning correctly.
Locks and Recovery
Clients can also introduce locks onto mounted server file systems. Locks will give a
user shared or exclusive access to a file or part of a file. When a user locks a file,
any process requiring access to the file must wait for the lock to be released before
processing can continue.
There are two kinds of locks that clients can establish on all or part of a file:
exclusive and shared. When a client obtains an exclusive lock, no other processes
can obtain a lock on that portion of the file. When a client obtains a shared lock,
other processes can obtain a shared lock to the same portion of the file.
Why Should I Lock a File?
A user or application can use byte-range locks through NFS to improve NFS
performance. Because the NFS protocol is stateless, a given client may not be
aware of changes made on the server (due to client caches). Locking ensures that
this problem will not occur during critical times when the server updates files.
How Do I Lock A File?
An application at the client, controlled by the user, can start a lock request against a
remote file that is mounted with NFS. The client will then send the operation to its
local network lock manager Daemon through an RPC request. The client-side NLM
daemon will then forward the request to the corresponding server-side NLM through
RPC.
Users can call the fcntl() API (application program interface) to lock parts of files
and specify lock parameters. For a complete description of the fcntl() API, see
System API Reference,
SC41-4801.
The server NLM daemon will then perform the lock operation against the
corresponding file. The server NLM daemon generates a response that the client
NLM daemon receives. The client NLM daemon generates a response for the NFS
client with the results of the lock request. The NFS client will then return the result
to the user through the application.
Stateless System Versus Stateful Operation
The statelessness of the Network File System does not integrate well with the
statefulness of file locks. Problems can occur in releasing locks if either the client or
server fails while their respective daemons hold a lock or locks.
74 OS/400 Network File System Support V4R4
|
|
|
|
|
|
|
|