--- title: "Managing Byte-Range Locks and Open File Handles" slug: "managing-file-locks-tg" tags: ["5.4"] updated: 2026-10-28T01:54:33Z published: 2026-10-28T01:54:33Z canonical: "docs.vastdata.com/managing-file-locks-tg" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Managing Byte-Range Locks and Open File Handles # Use the following procedures to list and release byte-range locks and open file handles for a certain file. - [List and Release Byte-Range Locks for a File (VAST Web UI)](/docs-5-4/docs/managing-file-locks-tg#list-and-release-byterange-locks-for-a-file-vast-web-ui) - [Release All Byte-Range File Locks for a View (VAST Web UI)](/docs-5-4/docs/managing-file-locks-tg#release-all-byterange-file-locks-for-a-view-vast-web-ui) - [List and Close Open File Handles for a File (VAST Web UI)](/docs-5-4/docs/managing-file-locks-tg#list-and-close-open-file-handles-for-a-file-vast-web-ui) - [List and Recall NFSv4 Delegations for a File (VAST Web UI)](/docs-5-4/docs/managing-file-locks-tg#list-and-recall-nfsv4-delegations-for-a-file-vast-web-ui) ## List and Release Byte-Range Locks for a File (VAST Web UI) To list and release byte-range locks for a file: 1. From the left navigation menu, select **Element Store** and then **Views** to open the **Views** page. 2. Right-click a view, select **Multi-Protocol File State** and then **Byte-range locks**. **NOTE**: If you running a version prior to VAST Cluster 5.4.1: select **Locks** and then **File Byte-range locks and open handles and file delegations**. The **Byte-Range Locks, Open Handles, and Delegations on a File** dialog is displayed with the **Byte-Range Locks** tab opened. 3. In the **Full path** field, enter the path to the locked file. This is formed as: `<view>/<filename>`, where `<view>` is the view you selected (relative to the preselected tenant), and `<filepath>` is the path to the file locked by the client, relative to the path of the view. For example, supposing we created a view named `/Export` and we mounted the view onto an NFS client directory named `/Directory`. Suppose we create and lock a file under `/Directory` named `examplefile`. To search for that lock, we need to search for the file path `/Export/examplefile`. 4. Click **Show Locks, Open Handles, And Delegations**. The grid below is populated with byte-range locks on the specified file. The following information is displayed for each lock: | **Lock Path** | The path to the locked file. | | --- | --- | | **Lock Type** | The lock type: - NLM4 locks taken by NFSv3 clients - NFS4 locks taken by NFSv4 clients - SMB locks | | **Creation Time** | The time the lock was acquired. | | **Caller** | An identifier of the the client that acquired the lock. This could be an IP or host name of the client. | | **Owner** | An identifier internal to the client kernel for the specific process that owns the lock. | | **Exclusive** | Whether the lock is an exclusive (write) lock or a shared (read) lock. - **Yes**. The lock is an exclusive or write lock acquired by the client. - **No**. The lock is a shared, or read, lock. Many clients can access the file to read it, but no client may write to the locked byte range. | | **Granted Type** | The type of delegation granted to the client. - **READ**. No other client has the ability to write to the file for the duration of the delegation. - **WRITE**. no other client has read or write access to the file for the duration of the delegation. | | **Length** | The number of bytes of the file locked by the lock. A length of 0 means the lock reaches until the end of the file. If both offset and length are `0`, the entire file is locked. | | **Offset** | The number of bytes from the beginning of the file's byte range from which the lock begins. | | **Svid** | A kernel identifier of the owning process on the client machine. | | **State** | The lock's state ID. | | **Client ID** | The lock's client ID. | | **Open ID** | The lock's open ID. | | **Lock ID** | The lock's lock ID. | 5. If you want to release locks on the selected file, click **Release All File Locks**. All the byte-range locks for the file are removed from the VAST Cluster server. ## Release All Byte-Range File Locks for a View (VAST Web UI) To release all byte range file locks under a view's directory and recursively in all its subdirectories: 1. From the left navigation menu, select **Element Store** and then **Views** to open the **Views** page. 2. Right-click the view for which you want to release locks and click **Release All Locks from Directory and Sub Directories**. 3. Confirm the action in the confirmation prompt. ## List and Close Open File Handles for a File (VAST Web UI) **NOTE**: This feature is available starting with VAST Cluster 5.4.1. To list and close open file handles for a file: 1. From the left navigation menu, select **Element Store** and then **Views** to open the **Views** page. 2. Right-click a view, select **Multi-Protocol File State** and then **Open Protocol Handles**. The **Byte-Range Locks, Open Handles, and Delegations on a File** dialog is displayed with the **Open Protocol Handles** tab opened. 3. In the **Full path** field, enter the path to the open file. This is formed as: `<view>/<filename>`, where `<view>` is the view you selected (relative to the pre-selected tenant), and `<filepath>` is the path to the file opened by the client, relative to the path of the view. For example, supposing we created a view named `/ExportExample` and we mounted the view onto an NFS client directory named `/DirectoryExample`. Suppose we create and open a file under `/DirectoryExample` named `examplefile`. To search for that open file handle, we need to search for the file path `/ExportExample/examplefile`. 4. Click **Show Locks, Open Handles, And Delegations**. The grid below is populated with open file handles for the specified file. The following information is displayed for each open file handle: | **Protocol** | The protocol used to open the file (SMB or NFS). | | --- | --- | | **Client IP** | The IP address of the client. | | **Username** | The name of the user for which the handle was created. | | **Session ID** | The ID of the session where the handle was created. | | **Unique ID** | The unique ID of the handle. | | **Share Access** | SMB share permissions. | | **Access mask** | A list of SMB access masks. | | **Lease** | Indicates whether there is an SMB lease on the file. | | **File Mode** | NFS file permissions. | | **NFSv4 sequence ID** | The NFSv4 sequence number used in the lock request. | 5. Select a handle you want to close and choose **Close** in the context menu. Note that this action is supported for SMB handles only. ## List and Recall NFSv4 Delegations for a File (VAST Web UI) To list and recall NFSv4 delegations for a file: 1. From the left navigation menu, select **Element Store** and then **Views** to open the **Views** page. 2. Right-click a view, select **Multi-Protocol File State** and then **Byte-range locks** or **Open Protocol Handles**. **NOTE**: If you running a version prior to VAST Cluster 5.4.1: select **Locks** and then **File Byte-range locks and open handles and file delegations**. The **Byte-Range Locks, Open Handles, and Delegations on a File** dialog is displayed. 3. In the **Full path** field, enter the path to the locked file. This is formed as: `<view>/<filename>`, where `<view>` is the view you selected (relative to the pre-selected tenant), and `<filepath>` is the path to the file locked by the client, relative to the path of the view. For example, supposing we created a view named `/ExportExample` and we mounted the view onto an NFS client directory named `/DirectoryExample`. Suppose we create and lock a file under `/DirectoryExample` named `examplefile`. To search for that lock, we need to search for the file path `/ExportExample/examplefile`. 4. Click **Show Locks, Open Handles, And Delegations** to start the query. 5. Go to **NFSv4 Delegations** tab, which now displays NFSv4 file delegations for the specified file. The following information is displayed for each delegation: | **Client IP** | The IP address of the client. | | --- | --- | | **Delegation Type** | The delegation type (such as read or write). | | **Delegation StateID** | The stateID used to manage the delegation. | | **Revoke in Progress** | Indicates whether the delegation is being revoked. | 6. If you want to revoke a delegation, right-click it and select **Revoke**.