lock
by Chris Kranz on Jul.07, 2009, under Manual Pages
NAME
lock – manage lock records
SYNOPSIS
lock status -f [file] [-p protocol] [-n]lock status -h [host [-o owner]] [-f file] [-p proto] [-n]
lock status -o [-f file] [-p proto] [-n] (not valid for NLM and NFSv4)
lock status -o owner [-f file] [-p proto] [-n] (CIFS only)
lock status -p protocol [-n]
lock status -n
lock break -f file [-o owner -h host] [-p proto]
lock break -h host [-o owner] [-f file] [-p protocol]
lock break -o owner [-f file] [-p protocol] (CIFS only)
lock break -p protocol
Note:
Unless a protocol name is specified above, the syntax is valid for all protocols.
Output of lock status -p protocol and lock status -p protocol -f are identical.
Currently, lock break -f file is allowed, but not recommended because breaking NFSv4 locks might lead to unexpected results on the client. The breaking of NFSv4 locks can be prevented by mentioning the protocol along with the file name.
Unlike the case of file name, Host and owner differ in meaning across protocols. Owner is a pertinent filter for CIFS, NLM, and FLEXCACHE only. If protocol is not specified, then locks across all protocols, viz., CIFS, FLEXCACHE, NLM (Nfsv2/Nfsv3), NFSv4, FIO, and WAFL are scanned. In that case, protocols not recognizing the syntax of host or owner generate syntax errors. In the specific cases of NLM and NFSv4, locks cannot be filtered just by specifying owner. Host must be specified along with owner. Owner, being a pid/uid, is not unique unless host (client) is also specified. The same restrictions apply when specifying a set of locks to be broken.
Currently, all protcols filter locks by file, but only CIFS, NFSv4
and NLM protocols filter locks by host and owner.
NOTE: In the case of NLM, the value of host could be either a hostname (FQDN, hostname alias, etc., ) or an IP address. The lock command does not resolve the hostname to an IP address. Functionally, filtering locks by a hostname 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 lock status -h output. Such a value of host should not be interpreted in any way. If done so, may lead to improper status or removal of locks.
DESCRIPTION
lock status prints protocol lock records whereas lock break breaks locks as per the specified options. The options are described as follows:
OPTIONS
- -f
- Prints lock records organized by file.
- -f
- file Prints or breaks locks of specified file. The syntax of the file-name is a path name prefixed by "/vol/volX" where volX is the name of a volume on the filer.
- -h Prints lock records grouped by host-name.
- CIFS, however, does not group locks by host but instead prefixes each record by "CIFS host=" string.
- -h host Prints or breaks locks of a specified
- host. Currently, only CIFS, NFSv4 and NLM can do this. Note: Meaning of host varies across protocols (CIFS: NetBIOS or IP, NLM and FLEXCACHE: IP or FQDN, NFSv4: IP).
- -o
- Prints lock records grouped by owner-name. CIFS, however, does not group locks by owner but instead prefixes each record by "CIFS owner=" string.
- -o
- owner Prints or breaks locks of specified owner. Currently, only CIFS does this. NLM and NFSv4 allow specification of owner, but only in the case in which host is specified as well. Note: Meaning of owner varies across protocols (CIFS: [domain\]user, FLEXCACHE: IP:fsid of caching filer, NLM: Process-ID, NFSv4: UID)
- -p protocol Prints or breaks locks of specified
- protocol, which is a case-insensitive string and can take one of the following values: nlm, nfsv4, cifs, flexcache.
- -n Prints the number of share-level and
- byte-level locks for each protocol. If specified with "-p <protocol>” switch, it prints the same for the specified protocol only.
An example showing locks grouped by file is:
filer> lock status -f ========0e1d66f7:00000040 state=GRANTED mode=FIO_NoDelete state=GRANTED mode=FIO_NoDelete ========0e1d66f7:00000062 state=GRANTED mode=FIO_NoDelete ========0e1d66f7:000000d3 CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=Oplock-Excl oplock=Excl ========0e1d66f7:000009d8 state=GRANTED mode=FIO_NoDelete ========0e1d66f7:00000aab CIFS path=\another.doc(/vol/vol0/share2/another.doc) host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=RdWr-denyN oplock=None CIFS path=\another.doc(/vol/vol0/share2/another.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483539 len=1 excl=yes state=GRANTED CIFS path=\another.doc(/vol/vol0/share2/another.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483559 len=1 excl=yes state=GRANTED CIFS path=\another.doc(/vol/vol0/share2/another.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483599 len=1 excl=yes state=GRANTED NLM[zhora.eng.mycompany.com, 6892]: 0:0 1 GWAITING (0x61cc5aa0)
As for lock break , there is no way to break locks across all protocols. Locks can be broken for a specified protocol using -p protocol option, though.
CIFS style locks follow the format as shown in the example below:
filer> lock status -p cifs CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=RdWr-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483481 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator state=GRANTED mode=Read-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483521 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483539 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483540 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483559 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483599 len=1 excl=yes state=GRANTED CIFS path=\another.doc(/vol/vol0/share2/another.doc) host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=Oplock-Excl oplock=Excl fsid=0x0e1d66f7 fileid=0x00000aab
Locks are described either as share level locks (denoted by the keyword state appearing in the line) or as byte level locks (which have "offset”, "len”, and "excl” fields). The first line in the example above is a share level lock and has the following format:
- path
- CIFS path name of the file or directory associated with the lock followed by the absolute (“/vol/volX" style) path within parentheses. Undetermined absolute path is denoted by empty parentheses. Note that Delete-On-Close locks have no associated absolute path information available. Absolute path is also unavailable in case of insufficient memory.
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- mode
- Relates how the lock responds to requests to modify it, see the ACTION MODES section.
- oplock
- The level of an oplock on the file: Excl (exclusive), Lvl2 (level 2), and None (none).
- host
- The name of the client which was issued the lock. It is an IP address followed by a NetBIOS name (if available) within parentheses. If NetBIOS name is unavailable, the name is displayed as an IP address followed by empty parentheses.
- owner
- The name of the user owning the lock.
- fileid
- File id on the filer. (only printed with options other than "-f”)
- fsid
- Volume id on the filer. (only printed with options other than "-f”)
- offset
- Starting offset of the byte lock
- len
- Number of bytes locked
- excl
- Whether the lock is an exclusive byte-level lock or not
Lock record keyed (but not grouped) by host:
filer> lock status -p cifs -h CIFS host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=RdWr-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator state=GRANTED mode=Read-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483481 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483521 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483539 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483540 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483559 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483599 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=Oplock-Excl oplock=Excl fsid=0x0e1d66f7 fileid=0x00000aab path=\another.doc(/vol/vol0/share2/another.doc)
filer> lock status -p cifs -o CIFS owner=root host=10.34.17.49(FLOYD-XP) state=GRANTED mode=RdWr-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=administrator host=172.18.2.107(VKUMAR-VPC) state=GRANTED mode=Read-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=administrator host=172.18.2.107(VKUMAR-VPC) pid=65279 offset=2147483481 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=administrator host=172.18.2.107(VKUMAR-VPC) pid=65279 offset=2147483521 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=root host=10.34.17.49(FLOYD-XP) pid=65279 offset=2147483539 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=administrator host=172.18.2.107(VKUMAR-VPC) pid=65279 offset=2147483540 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=root host=10.34.17.49(FLOYD-XP) pid=65279 offset=2147483559 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=root host=10.34.17.49(FLOYD-XP) pid=65279 offset=2147483599 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS owner=root host=10.34.17.49(FLOYD-XP) state=GRANTED mode=Oplock-Excl oplock=Excl fsid=0x0e1d66f7 fileid=0x00000aab path=\another.doc(/vol/vol0/share2/another.doc)
Lock record filtered by specified NetBIOS host name:
filer> lock status -h vkumar-vpc -p cifs CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator state=GRANTED mode=Read-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483481 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483521 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483540 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc)
filer> lock status -h 10.34.17.49 -p cifs CIFS host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=RdWr-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483539 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483559 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483599 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=Oplock-Excl oplock=Excl fsid=0x0e1d66f7 fileid=0x00000aab path=\another.doc(/vol/vol0/share2/another.doc)
filer> lock status -o administrator -p cifs CIFS host=172.18.2.107(VKUMAR-VPC) state=GRANTED mode=Read-denyN oplock=None fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) pid=65279 offset=2147483481 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) pid=65279 offset=2147483521 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc) CIFS host=172.18.2.107(VKUMAR-VPC) pid=65279 offset=2147483540 len=1 excl=yes state=GRANTED fsid=0x0e1d66f7 fileid=0x000000d3 path=\word.doc(/vol/vol0/share1/word.doc)
( NOTE: fileid and fsid fields are replaced by a header: "========0e1d66f7:000000d3″, as done in lock status -f command described earlier)
filer> lock status -p cifs -f /vol/vol0/word.doc ========0e1d66f7:000000d3 CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root state=GRANTED mode=RdWr-denyN oplock=None CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator state=GRANTED mode=Read-denyN oplock=None CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483481 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483521 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483539 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=172.18.2.107(VKUMAR-VPC) owner=administrator pid=65279 offset=2147483540 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483559 len=1 excl=yes state=GRANTED CIFS path=\word.doc(/vol/vol0/share1/word.doc) host=10.34.17.49(FLOYD-XP) owner=root pid=65279 offset=2147483599 len=1 excl=yes state=GRANTED
filer> lock status -o root -h floyd-xp -p cifs -f /vol/vol0/another.doc CIFS host=10.34.17.49(FLOYD-XP) state=GRANTED mode=Oplock-Excl oplock=Excl fsid=0x0e1d66f7 fileid=0x00000aab path=\another.doc(/vol/vol0/share2/another.doc)
NLM style locks follow the format:
toaster*> lock status -f ========b1000060:0007a88d simcity1775 state=GONE mode=Writ-denyA ========b10000600020e940 simcity1773 00 1 GRANTED (0xbe89ebd8)
The third line is an example of a share level lock on a file:
- host
- The name of the client which was issued the lock.
- pid
- Process ID assigned by the client.
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- mode
- Relates how the lock responds to requests to modify it, see the ACTION MODES section.
- host
- The name of the client which was issued the lock.
- pid
- Process ID assigned by the client.
- byte offset
- Start of the byte lock
- exclusive
- Whether the lock is exclusive or not
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- lock address
- NFSv4 style locks follow the format:
filer> lock status -f ========4292014d:0000007e NFSv4[IP=172.16.28.73, 0]: GRANTED mode=RdWr-denyN (0x7e6a9010, ix=2) NFSv4[IP=172.16.28.73, 0]: 0:0 1 GRANTED (0x7e6a8f00, ix=3)
The second line is an example of a share level lock on a file:
- host
- The name of the client which was issued the lock.
- UID
- UID of the process on the client.
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- mode
- Relates how the lock responds to requests to modify it, see the ACTION MODES section.
State ID index
The third line is an example of a byte level lock on a file:
- host
- The name of the client which was issued the lock.
- UID
- UID of the process on the client.
- byte offset
- Start of the byte lock
- exclusive
- Whether the lock is exclusive or not
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
State ID index
- -h
- Prints lock records organized by host.
NLM style locks are grouped by host and will show up under this option. They follow the format:
toaster*> lock status -h ========builder 1583 0x00e509e10xb1000060 00 1 GRANTED (0xbe89e8b8) ========simcity 1773 0x0020e9400xb1000060 00 1 GRANTED (0xbe89ebd8) 1775 0x0020e9410xb1000060 state=GONE mode=Writ-denyA
The sixth line in the example above illustrates the format followed by share level locks:
- pid
- Process ID assigned by the client.
- fileid
- File id on the filer.
- fsid
- Volume id on the filer.
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- mode
- Relates how the lock responds to requests to modify it, see the ACTION MODES section.
- pid
- Process ID assigned by the client.
- fileid
- File id on the filer.
- fsid
- Volume id on the filer.
- byte offset
- Start of the byte lock
- exclusive
- Whether the lock is exclusive or not
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- lock address
- Examples of filtering lock output based on a different parameters are shown below:
filer> lock status -p NLM -h ======== NLM host darla.lab.mycompany.com 3082 0x3ef4bff6:0x000001cf 0:0 1 GRANTED (0x7ead8ac0) 2988 0x3ef4bff6:0x000001ce 0:0 1 GRANTED (0x7ead88a0) ======== NLM host kendra.lab.mycompany.com 1914 0x3ef4bff6:0x000001cf 0:0 1 GWAITING (0x7ead89b0)
filer> lock status -p NLM -h darla.lab.mycompany.com ======== NLM host darla.lab.mycompany.com 3082 0x3ef4bff6:0x000001cf 0:0 1 GRANTED (0x7ead8ac0) 2988 0x3ef4bff6:0x000001ce 0:0 1 GRANTED (0x7ead88a0)
filer> lock status -p NLM -h darla.lab.mycompany.com -o 3082 ======== NLM host darla.lab.mycompany.com owner 3082 0x3ef4bff6:0x000001cf 0:0 1 GRANTED (0x7ead8ac0)
filer> lock status -h ======== NFSv4 host 172.16.28.73 ========NFSv4 client IP=172.16.28.73 client-id=0x42952fa1/0×00010000 ====== Lock owner: 00000000/0000000B/00001556/07458F08 0 0x4292014d:0x0000007e 0:0 1 GRANTED (0x7e6a8f00, ix=2) ====== Open owner: 00000000/00000028 0 0x4292014d:0x0000007e GRANTED mode=RdWr-denyN (0x7e6a9010, ix=1)
The second line of each dumped set of locks starts with `=’ characters and gives the IP address and NFSv4 clientid info of the client which has applied the lock.
The third and fifth line in the example start with `=’ characters and gives the NFSv4 owner information of the entity on the client which has applied the lock. Each subset of locks held by a particluar owner will begin with this owner information.
The sixth line in the example above illustrates the format followed by share level locks:
- UID
- UID of the process on the client.
- fileid
- File id on the filer.
- fsid
- Volume id on the filer.
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
- mode
- Relates how the lock responds to requests to modify it, see the ACTION MODES section.
State ID index
The fourth line in the example above illustrates the format followed by share level locks:
- UID
- UID of the process on the client.
- fileid
- File id on the filer.
- fsid
- Volume id on the filer.
- byte offset
- Start of the byte lock
- exclusive
- Whether the lock is exclusive or not
- state
- Details what part of the life-cycle the lock is in, see the LOCK STATES section.
State ID index Examples of filtering lock output based on a different parameters are shown below:
Lock records keyed (but not grouped) by host:
filer> lock status -p NFSv4 -h ======== NFSv4 host 172.16.28.73 ========NFSv4 client IP=172.16.28.73 client-id=0x42952fa1/0×00010000 ====== Lock owner: 00000000/0000000B/00001556/07458F08 0 0x4292014d:0x0000007e 0:0 1 GRANTED (0x7e6a8f00, ix=2) ====== Open owner: 00000000/00000028 0 0x4292014d:0x0000007e GRANTED mode=RdWr-denyN (0x7e6a9010, ix=1)
filer> lock status -p NFSv4 -h 172.16.28.73 ======== NFSv4 host 172.16.28.73 0 0x4292014d:0x0000007e 0:0 1 GRANTED (0x7e6a8f00, ix=2) 0 0x4292014d:0x0000007e GRANTED mode=RdWr-denyN (0x7e6a9010, ix=1)
filer> lock status -p NFSv4 -h 172.16.28.73 -o 0 ======== NFSv4 host 172.16.28.73 owner 0 0x4292014d:0x0000007e 0:0 1 GRANTED (0x7e6a8f00, ix=2) 0x4292014d:0x0000007e GRANTED mode=RdWr-denyN (0x7e6a9010, ix=1)
- -n
- Prints the number of locks.
By itself, it will show all of the protocol categories, even if no locks have been issued for that category:
toaster*> lock status -n CIFS 13 share locks, 3 byte locks NLM 1 share locks, 2 byte locks WAFL 0 share locks, 0 byte locks TEST 0 share locks, 0 byte locks
toaster*> lock status -n -h ========simcity NLM 0 share locks, 2 byte locks toaster*> lock status -n -f ========b1000060:00e509e1 NLM: 0 share locks, 1 byte locks ========b1000060:001d0b21 CIFS: 1 share locks, 0 byte locks ========b0000060:00b129be CIFS: 1 share locks, 0 byte locks
lock break -p nlm -h host sub-command breaks all NLM locks for a given host and sends notifications to that host to reclaim its locks.
lock break -p nlm -h host -o owner sub-command breaks all NLM locks for the specified owner on the specified host. No notifications (to reclaim removed locks) are sent.
Note that lock break sub-command does not always require a protocol name. For example, lock break -f file breaks locks across all protocols for the specified file.
EFFECTIVE
VFILER CONSIDERATIONS
lock only operates on locks owned by the vfiler in question.
REFERENCES
TR3024 is a Tech Report which describes the differences between Windows and Unix style locks. It provides an overview and context for the concepts presented in this man page.The report can be found as a white paper, SecureShare: Guaranteed Multiprotocol File Locking at http://www.netapp.com/tech_library/3024.html.
ACTION MODES
The allowed modes are:DelOnClose delete on close semantics,
SuperLock used for virus scanning (issued to CIFS clients only)
Access-Deny a combination of the following modes on the lock:
- access
- actions which can be performed on the locks
- deny
- actions which can be denied on the locks
- RdWr
- can read and write,
- Read
- can read, but not write,
- Writ
- can write, but not read,
- None
- can neither read not write.
- denyA
- cannot be read or written by others
- denyR
- cannot be read by others
- denyW
- cannot be written by others
- denyN
- can be read and written by others
LOCK STATES
- GRANTED
- Granted and not being revoked
- REVOKING
- Revocation started for this lock
- GWAITING
- Waiting for lock to be granted
- EWAITING
- Waiting for lock to be either granted or denied
- REVOKED
- Undergoing revocation and marked by protocol for deletion
- ADJUSTED
- Undergoing revocation and marked by protocol for replacement by a hard lock
- DENIED
- The lock has been denied
- TIMEDOUT
- The wait for the lock has timed out
- SUBSUMED
- Kept in reserve by protocol
- GONE
- About to be returned
- UNUSED
- Just allocated
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- EFFECTIVE
- VFILER CONSIDERATIONS
- REFERENCES
- ACTION MODES
- LOCK STATES
Copyright © 1994-2008 NetApp, Inc. Legal Information










































