NFS server-client delegation
Delegation is the ability of the server to delegate certain responsibilities to the client.
Beginning with AIX 5L Version 5.3 with the 5300-03 Recommended Maintenance package, you can use delegation. When the server grants a delegation for a file to a client, the client is guaranteed certain semantics with respect to sharing that file with other clients. When a file is opened, the server can provide the client a read delegation for the file. If the client is granted a read delegation, it is assured that no other client has the ability to write to the file for the duration of the delegation. If the client is granted a write delegation, the client is assured that no other client has read or write access to the file. The AIX server only grants read delegations. The AIX server only supports delegation with the 64-bit AIX kernel. The AIX client supports both read and write delegations.
In order for the server to grant a delegation to the client, the client must first provide a callback address to the server. When a delegation is recalled, the server will send the recall request to this address. By default, the client will indicate the IP address that is being used for normal communication with the server. For clients with multiple network interfaces, a specific address can be specified in the /etc/nfs/nfs4_callback.conf file. The format of the entries in this file is:
server-host client-ip-address
Where server-host is the name or address of an NFSv4 server and client-ip-address is the client address to be used when providing the server callback information. If the server-host name is the IPv4 address 0.0.0.0 or the IPv6 address 0::0, the specified client-ip-address will be used for all servers that are not listed in the file. If this file does not exist, or if an entry for the server (or a default entry) is not found, the client selects an address based on the existing connection to the server.
Delegations can be recalled by the server. If another client requests access to the file in such a way that the access conflicts with the granted delegation, the server is able to notify the initial client and recall the delegation. This requires that a callback path exists between the server and client. If this callback path does not exist, then delegations cannot be granted. If a file delegation has been granted, access from other NFSv4 clients, NFS versions 2 and 3 clients, and local accesses to the file at the file server can cause the delegation to be recalled. If GPFS is being NFSv4 exported, an access at a GPFS node in the network may cause the delegation to be recalled.
The essence of a delegation is that it allows the client to locally service operations such as OPEN, CLOSE, LOCK, LOCKU, READ, and WRITE without immediate interaction with the server.
Server delegation is enabled by default. Server delegation can be disabled with the nfso -o server_delegation=0 command. Administrators can use the exportfs deleg=yes | no option to disable or enable the granting of delegations on a per-file system basis, which will override the nfso setting.
Client delegation can be disabled with the nfso -o client_delegation=0 command. Client delegation must be set before any mounts take place on the client.
If the administrator is exporting a file system where many clients will be writing to many common files, the administrator may want to disable delegations for that file system.
If the client cannot be contacted (for example, if the network or client is experiencing an outage) other clients may be delayed in accessing the data.