Use the following procedures to see list byte range locks and file handles per view, and to release locks and open handles.
Managing File Locks and Open Handles in VAST Web UI
Listing file handles and byte-range locks
From the left navigation menu, select Element Store and then Views to open the Views page.
Right-click a view, select Locks and then File Byte-range locks and open handles.
In the Full file 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 called
/ExportExampleand we mounted the view onto an NFS client directory called/DirectoryExample. Suppose we create and lock a file under/DirectoryExamplecalledexamplefile. To search for that lock, we need to search for the file path/ExportExample/examplefile.Click Show locks and handles.
Any byte-range locks on the specified file are listed in the Byte Range Locks table.
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
Create 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.
Tenant Name
The lock's tenant.
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.
For a view that is enabled for NFSv4 and/or SMB access, select the Open Protocol Handles tab to list open protocol handles. The list shows you which protocol holds the open handle (SMB or NFSv4), which client IP and user, the session ID and additional protocol specific information.
To release an open SMB protocol handle, right-click the open handle and select close. (You cannot do this for NFSv4).
Releasing Byte Range File Locks
To release all byte range file locks under a view's directory and recursively in all its subdirectories:
From the left navigation menu, select Element Store and then Views to open the Views page.
Click Release all locks from directory and sub directories.
Click Release All Locks.
Click Yes, Delete to confirm the action.
Managing File Locks and Open Handles in VAST CLI
To list open protocol handles per file path, use the cluster list-open-protocol-handles command.
To close a protocol handle, use the cluster close-protocol-handle command.
To list byte range locks per file path, use the cluster list-locks command.
To release byte range locks, use the cluster release-lock command.