Table of ContentsView in Frames

Breaking locks on a specified file

You can use the lock break command to break locks on a specified file.


  1. To break locks on a specified file, enter the following command:lock break -f file [-o owner -h host] [-p protocol]
    • The -f file option specifies the file on which to break the lock.

      You must use the full path name for file, for example, /vol/vol1/file1.

      Note: Although you can use the lock break command with the -f file option to break NFSv4 locks, it is not recommended because breaking NFSv4 locks might lead to unexpected results on the client. You can prevent the breaking of NFSv4 locks by including the protocol along with the file name.
    • The optional -o owner option is only pertinent with the CIFS, NLM, and NFSv4 protocols.

      For NLM and NFSv4 locks, when specifying the -o owner option, you must also specify the -h host option. The meaning of owner varies across protocols:

      • CIFS: [domain\]user
      • NLM: Process-ID
      • NFSv4: UID
    • The -h host option specifies the host on which to break locks.

      Only locks held by the CIFS, NFSv4, and NLM protocols can be broken by specifying this option. The meaning of host varies across protocols:

      • CIFS: The value can be either a NetBIOS name or a fully qualified domain name (FQDN).
      • NFSv4: The value must be an IP address.
      • NLM: The value can be either a host name (FQDN, host name alias, and so on) or an IP address.

        The lock command does not resolve the host name to an IP address. Functionally, filtering locks by a host name is not equivalent to filtering locks by the corresponding IP address. If the locks are to be filtered by host, then the value of host should be obtained from the output of the lock status -h command. Such a value of host should not be interpreted in any way as it might lead to improper removal of locks.

    • You can break all locks for the specified file or use the -p protocol option to break the locks for only the specified protocol.

      protocol is a case-insensitive string that can take one of the following values:

      • cifs
      • nfsv4
      • nlm
      • flexcache


The following example breaks the CIFS lock on the /vol/vol1/Mydocument.doc file:

lock break -f  "/vol/vol1/Mydocument.doc"  -p cifs