The VAST NFSv4 server can optionally grant a read or write delegation to the client opening a file.
If the server grants a read delegation, the client can cache the data and read from the cache, while the server assures that no other client can modify the file for the duration of the delegation.
If the server grants a write delegation, the client can cache data and metadata, and perform both read and write operations on it, while the server assures that no other client can write to the file or read from it for the duration of the delegation.
Read delegations for a file can be granted to multiple clients at the same time. A write delegation can be granted to a single client only.
The VAST cluster lets you configure NFSv4 file delegations per tenant and per view.
In case of nested views, delegation configuration set on the closest parent view applies. For example, if the view /a is configured to grant read delegations and its nested view /a/b is configured to grant write delegations, a client accessing the file at /a/b/filename will be granted write delegations.
A delegation can be recalled or revoked in case of a conflict. For example, opening a file for a read operation results in recall of an existing write delegation.
Use of file delegations may significantly reduce the amount of client-server communication for the files being delegated, boosting VAST cluster performance for specific types of workloads, such as running SQLite over NFS, compilation tasks, or extracting data from very large ZIP or TAR archives.
Requirements and Limitations
The following requirements and limitations apply when using NFSv4 file delegations:
The NFSv4 protocol requires Network Time Protocol (NTP) to be configured on both the VAST cluster and the client. While VAST does not enforce this requirement, the absence of proper time synchronization may, in rare cases, result in unexpected behavior.
The client must establish an NFSv4 backchannel connection.
For multi-protocol views with NFSv4 delegations enabled, close-to-open consistency is only preserved between NFSv4 clients, but not between NFSv4 clients and other protocols (including NFSv3). For example, if a non-NFSv4 client modifies a file on such a view, the modification may not become immediately visible to an NFSv4 client holding an active delegation on the file.
Restoring a snapshot on a tenant that has NFSv4 delegations enabled, may cause unexpected behavior with regard to delegated files. It is recommended to revoke existing delegations before restoring a snapshot.
SUSE Linux Enterprise Server 12.x and CentOS 7.x clients are not supported with NFSv4 delegations enabled.
NFSv4 delegations require mounting the client at least as NFS version 4.1. It is recommended to mount as NFS version 4.2 for additional performance improvements. Linux kernels 6.11+ on a client provide more performance advantages (RFC9754), which get backported to older kernels through VAST-NFS.
If you are using VAST-NFS, note that NFSv4 delegations are supported with VAST-NFS 4.0.32 and later. VAST-NFS 4.5 includes enhancements related to support of NFSv4 delegations.
Configuring NFSv4 File Delegations
NFSv4 file delegations can be configured both per tenant and per view. Settings made at the tenant level can be used as defaults for all the views within the tenant. Settings made per view override the tenant-level settings for that view (with the exception of the setting that disables NFSv4 file delegations for the tenant).
Enabling and Disabling NFSv4 File Delegations for a Tenant
Enabling NFSv4 file delegations at the tenant level allows granting of new delegations of the specified type (read and/or write) for all the tenant's views, with an ability to override the settings at the view level.
Disabling tenant-level setup for NFSv4 file delegations disallows granting of new delegations for all tenant views. Existing delegations are recalled as needed. If NFSv4 file delegations are disabled for a tenant, they cannot be enabled for any view within that tenant.
To enable NFSv4 file delegations for a tenant:
In VAST Web UI:
Navigate to Element Store -> Tenants -> choose to create or edit a tenant -> Advanced Protocol Settings tab -> Access Delegation Policy.
Ensure that Enable tenant level delegations option is selected (by default).
Use the Enable default read delegations and Enable default write delegations options to specify the type of delegations (read and/or write) to be enabled at the tenant level. All new views created within the tenant will allow granting delegations of the specified type(s), unless overridden by configuration of a particular view. By default, both options are selected.
Note that you can refrain from enforcing the delegation type at the tenant level by selecting the None (no tenant default) option. If this option is set, the delegation type is to be specified per view.
In VAST CLI, run the
tenant createortenant modifycommand and specify the type of delegations you need (read, write, read and write, or none) on the--allowed-delegationsoption.
To disable NFSv4 file delegations for a tenant:
In VAST Web UI, navigate to Element Store -> Tenants -> choose to create or edit a tenant -> Advanced Protocol Settings tab -> Access Delegation Policy and select Disable tenant level delegations.
In VAST CLI, specify
--allowed-delegations DISABLEDon thetenant createortenant modifycommand.
By default, the cluster grants allowed delegations even when the client does not explicitly request a delegation. (This is useful for older Linux clients that do not ask for delegations but take advantage of them if granted by the server.) You can disable this behavior as follows:
In VAST Web UI, toggle off the Enable unrequested file delegations by default option in tenant settings (Element Store -> Tenants -> choose to create or edit a tenant -> Advanced Protocol Settings tab -> Access Delegation Policy pane).
In VAST CLI, run the
tenant createortenant modifycommand with the--disable-grant-unrequested-delegations-by-defaultoption specified.
Enabling and Disabling NFSv4 File Delegations for a View
Configuring NFSv4 file delegations at the view level is only allowed when NFSv4 file delegations are enabled for the tenant.
By default, a view inherits NFSv4 file delegation settings from the tenant. If you want to override the tenant setup:
In VAST Web UI:
Navigate to Element Store -> Views -> choose to create or edit a view -> go to NFS -> Access Delegation Policy tab.
By default, the tab opens with the Set Tenant level delegations option selected.
Select Set View level delegations and use the Enable read delegations and Enable write delegations options to specify the type of delegations (read and/or write) to be enabled for the view.
Note that VAST Web UI displays the outcome of the current combination of tenant and view settings for NFSv4 file delegations in the Policy Preview (End result) pane below.
In VAST CLI, use the
--allowed-delegationsoption on theview createandview modifycommands.To verify the configuration result, run the
view showcommand and check theEffective Allowed NFSv4 File Delegationsfield in the command output.
Listing Granted NFSv4 File Delegations
You can list NFSv4 file delegations that are currently in effect for a particular file path on a specific tenant:
In VAST Web UI, go to Element Store -> Views, right-click the view and select Multi-Protocol File State -> NFSv4 Delegations. In the dialog that opens, enter the path to search for NFSv4 file delegations for the path you want. The delegations will be displayed in the grid.
In VAST CLI, run the
tenant nfs4-delegs-listcommand.
Recalling and Revoking NFSv4 File Delegations
A file delegation is recalled when the server receives a conflicting request for the same file, for example, a request to read from a file that is currently opened for writing, or a request to write to a file being read. The client needs to flush the cached data and return the delegation.
If a client does not return the delegation in response to a recall request within a reasonable timeframe, the server can decide to revoke its delegation.
You can revoke a specific delegation manually:
In VAST Web UI, go to Element Store -> Views, right-click the view and select Multi-Protocol File State -> NFSv4 Delegations. In the dialog that opens, enter the path to search for NFSv4 file delegations for the path you want. In the grid with the search results, right-click the delegation you want to revoke and select Revoke.
In VAST CLI, run the
tenant nfs4-delegs-removecommand.