Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Get-NaLockStatus


NAME
Get-NaLockStatus

SYNOPSIS
Gives information about one or more locks.

SYNTAX
Get-NaLockStatus [[-Protocol] <String>] [[-FileName] <String>] [[-HostName]
<String>] [[-Owner] <String>] [-Controller <NaController>] [<CommonParameter
s>]


DESCRIPTION
Gives information about one or more locks. One or more of the defined input
s can be specified in tandem to get locks for specific cases. If none of the
inputs are specified, then all the locks in the system are printed. If no p
rotocol is specified but one or more of the other inputs are specified, then
locks across all protocols, viz., CIFS, PFS, NLM (Nfsv2/Nfsv3), and NFSv4,
are printed. In this case, it is possible for protocols that define syntax o
f specified input differently to generate input syntax errors. However, thes
e errors do not stop scanning of locks for other protocols.


PARAMETERS
-Protocol <String>
Name of the protocol (case-insensitive): "cifs" (CIFS), "nlm" (Nfsv2/Nfs
v3), "nfsv4" (NFSv4), and "pfs"(PFS). If not specified, then all protoco
ls are scanned for locks. If in that case, a host and/or owner were spec
ified, then expect input syntax errors in "error" output field for proto
cols that define syntax of host or owner differently. However, scanning
of locks is not aborted due to these syntax errors and instead all proto
cols are still scanned to completion.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-FileName <String>
File name prefixed by "/vol/volX" style path. If not specified, then loc
ks across all files are printed. Input syntax of file-name is the same f
or all protocols.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostName <String>
Identity of a host. It is the NetBIOS name or IP address of a CIFS clien
t, FQDN of a PFS client, IP address or FQDN of NLM (Nfsv2/Nfsv3) client,
and IP address of NFSv4 client. If specified, then locks are printed fo
r that host only. If not specified, then locks across all hosts are prin
ted.

NOTE: Currently, only CIFS protocol filters lock output by host name.

Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Owner <String>
Name of the lock owner, viz., a username prefixed by an optional domain
(and a backslash) for CIFS protocol ([domain\]username), IP address suff
ixed by a colon and a filesystem ID of caching filer (IP:fsid) for PFS,
and process-ID for NLM(Nfsv2/Nfsv3). The concept of an owner for NFSv4 i
s yet to be defined. If specified, then locks are printed for that owner
only. If owner is not specified, locks across all owners are printed.

NOTE: Currently, only CIFS protocol filters lock output by owner name.

Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.Types.Lock.LockStatusInfo


NOTES


Category: lock
API: lock-status-iter-start,lock-status-iter-next,lock-status-iter-end

-------------- Example 1 --------------

C:\PS>Get-NaLockStatus -Protocol cifs


Gets all the locks on the cifs protocol.


Lock Type : cifs
Path : /vol/vol1/
Host : 12.34.56.78
Owner : administrator
State : GRANTED
Mode : Read-denyN
LockError :

Lock Type : cifs
Path : /vol/vol1/very_important.doc
Host : 12.34.56.78
Owner : administrator
State : GRANTED
Mode : Read-denyW
LockError :

Lock Type : cifs
Path : /vol/vol1/very_important.doc
Host : 12.34.56.78
Owner : administrator
State : GRANTED
Mode : Oplock-Lvl2
LockError :



RELATED LINKS







 Data ONTAP® PowerShell Toolkit