You can view and release SMB byte range locks similar to NFS locks.
To list all locks held by SMB clients on a given path and to release them:
-
From the left navigation menu, select Element Store.
-
On the Element Store page, select the Locks tab.
-
If you want to list locks for a non-default tenant, select the relevant tenant from the Tenant dropdown.
-
In the Enter Lock Path field, enter the path to the locked file. The path is in the format:
<view>/<filename>
, where<view>
is the SMB-enabled view on the tenant, and<filepath>
is the path to the file locked by the client, relative to the mount point.For example, supposing we created a view called
/ExportExample
and we mounted the view onto a client directory called/DirectoryExample
. Suppose we create and lock a file under/DirectoryExample
calledexamplefile
. To search for that lock, we need to search for the file path/ExportExample/examplefile
. -
Click Find Locks.
Any locks on the specified file are listed.
For each lock, the following details can be displayed:
Field
Description
Lock Path
The path to the locked file.
Lock Type
The lock type:
-
SMB locks
-
NLM4 locks taken by NFSv3 clients
-
NFS4 locks taken by NFSv4.1 clients
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.
Offset
The number of bytes from the beginning of the file's byte range from which the lock begins.
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.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 path, click Release all locks on the given path.
All the locks listed are removed.
To manage SMB locks via CLI, use the following commands.
Comments
0 comments
Article is closed for comments.