...hopefully some useful VMware related stuff

CIFS share Locked files on a NetApp filer

21/04/2010 00:00

Issue with a locked file on a CIFS share.

First check Computer Management and then connect to the filer.
Look at Open Files or Sessions and see if the lock can be released from there.

 

If it isn't showing, then telnet to the filer.

 

You can use these commands to see CIFS status, current Locks and ultimately break the locks:

 

cifs stat                                                                            Show Statistics of CIFS operations.
lock status -f -p cifs                                                           Show all locked CIFS files.
lock status -o admin -p cifs                                                Show all locked CIFS files by admin.

lock break -o admin -f "/vol/Share1/Folder/File.doc" -p cifs   Clear locks the user admin has on the file.
lock status -f "/vol/Share1/Folder/File.doc" -p cifs                 Show all locks on the listed file.            
lock break -f "/vol/Share1/Folder/File.doc" -p cifs                 Clear all locks on the listed file.

 

 Below is the usage for the lock status and lock break commands:

lock status -f [file] [-p protocol] [-n]
lock status -h [host [-o owner]] [-f file] [-p protocol] [-n]
lock status -o [-f file] [-p protocol] [-n]
lock status -o owner [-f file] [-p protocol] [-n] (valid for CIFS only)
lock status -p protocol [-n]
lock status -n

lock break -f file [-o owner -h host] [-p protocol]
lock break -h host [-o owner] [-f file] [-p protocol]
lock break -o owner [-f file] [-p protocol] (valid for CIFS only)
lock break -p protocol
lock break -net network

where

   file prefix is a /vol/volX style path
   protocol is a case-insensitive string: "nlm", "cifs", "flexcache", or "nfsv4"
   host = NetBios name or FQDN or IP (CIFS)
        = FQDN               (FLEXCACHE)
        = FQDN or IP         (NLM)
        = IP                 (NFSv4)
  owner = [domain\]username          (CIFS)
        = Process-ID                (NLM)
        = IP:fsid of caching filer  (FLEXCACHE)
  network is a case-insensitive string: "ipv4" or "ipv6"

 

Search site