Managing SMB File Locks

Prev Next

You can view and release SMB byte range locks.

Viewing and Releasing SMB Locks in VAST Web UI

To list all locks held by SMB clients on a given path and to release them:

  1. From the left navigation menu, select Element Store.

  2. On the Element Store page, select the Locks tab.

  3. 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 called examplefile. To search for that lock, we need to search for the file path /ExportExample/examplefile.

  4. Click Find Locks.

    Any locks on the specified file are listed.

    For each lock, the following information can be displayed:

    Tip

    To display or hide fields, click column_menu.png to the right of a column title, and then click columns.png to open a dropdown where you can select or unselect fields.

    ID

    The ID of the lock.

    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.

  5. If you want to release locks on the path, click Release all locks on the given path.

    All the locks listed are removed.