Get-EmcLun

Gets the list of LUNs for the specified storage system or systems.

 

Syntax

 

Parameters

-ID <String>

Attributes: Optional, Position: 1

Specifies the LUN name or ID. Wildcards are permitted. It is a positional parameter (position = 1).

 

BlockStorageSystem <IBlockStorageSystem>

Attributes: Optional, Position: named

Specifies the ESI block storage system object, which you can add to ESI by using the Get-EmcStorageSystemCredential and Connect-EmcSystem cmdlets. You can get a storage system object by using the Get-EmcStorageSystem cmdlet.

 

-Concrete <SwitchParameter>

Attributes: Optional, Position: named

Specifies the Concrete LUN type as an optional parameter, through which only Concrete LUNs can be filtered out. Do not use this parameter with the ID parameter. You can only use this with BlockStorageSystem.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-Pool <StoragePool>

Attributes: Optional, Position: named

Specifies the ESI storage pool object, which you can get from the ESI block storage system or by using the Get-EmcStoragePool cmdlet.

 

-HostDisk <Disk>

Attributes: Required, Position: named

Specifies the ESI host disk object, which you can get from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.

 

-Volume <Volume>

Attributes: Required, Position: named

Specifies the ESI volume object, which you can get by using the Get-EmcHostVolume cmdlet.

 

-ClusterSystem <IClusterSystem>

Attributes: Optional, Position: named

Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can get a cluster system object by using the Get-EmcClusterSystem cmdlet.

 

-ClusterDisk <WindowsBasicClusterDisk>

Attributes: Required, Position: named

Specifies the ESI cluster disk object, which you can get from the ESI cluster system object or by using the Get-EmcClusterDisk cmdlet.

 

-InitiatorId <String>

Attributes: Required, Position: named

Specifies the iSCSI or FC Initiator ID.

 

-HostLunId <String>

Attributes: Required, Position: named

Specifies the host LUN ID.

 

-HostLunIdentifier <HostLunIdentifier>

Attributes: Required, Position: named, Accepts pipeline input (by value)

Specifies the ESI host LUN identifier object, which you can get by using the Get-EmcHostLunIdentifier cmdlet.

 

-DataStore <Datastore>

Attributes: Required, Position: named

Specifies the VMware datastore object, which you can get by using the Get-EmcDatastore cmdlet.

 

-ScsiLun <ScsiLun>

Attributes: Required, Position: named

Specifies the ESI SCSI LUN object, which you can get by using the ESI storage system object or by using the Get-EmcScsiLun cmdlet.

 

-MailboxDatabase <MailboxDatabase>

Attributes: Required, Position: named

Specifies the mailbox database associated with the specified LUN.

 

-MailboxDatabaseFileType <MailBoxDatabaseFileType>

Attributes: Optional, Position: named

Specifies the mailbox database file type associated with the host volume. It can be passed as an edbfile, logs, or All. By default it is set to All.

 

-MailboxDatabaseCopy <MailboxDatabaseCopy>

Attributes: Required, Position: named

Specifies the mailbox database copy.

 

-VmaxStorageGroup <VmaxStorageGroup>

Attributes: Required, Position: named

Specifies the ESI VMAX storage group object. You can get a VmaxStorageGroup object  by using the Get-EmcVmaxStorageGroup cmdlet.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

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

C:\PS>Get-EmcLun

C:\PS>Get-EmcStorageSystem | Get-EmcLun

C:\PS>Get-EmcStoragePool | Get-EmcLun

C:\PS>Get-EmcHostDisk | Get-EmcLun

C:\PS>Get-EmcHostVolume | Get-EmcLun

C:\PS>Get-EmcClusterDisk | Get-EmcLun

This example gets the list of disks as specified for all the connected storage systems, a specified storage system, host disks, host volumes, and cluster disks.

 

-------------- Example 2 --------------

C:\PS>Get-EmcLUN  12*

C:\PS>Get-EmcStorageSystem | Get-EmcLun -id my_*

C:\PS>Get-EmcHostDisk | Get-EmcLun my*

C:\PS>Get-EmcHostVolume | Get-EmcLun -id 224

This example gets the LUNs based on the LUN ID or name. Wildcards are permitted. Because the ID parameter is positional, you can omit the name.

 

-------------- Example 3 --------------

C:\PS>$ds = Get-EmcDatastore *myDatastore*

C:\PS>Get-EmcLun -Datastore $ds

This example gets the LUNs associated with the specified datastore object.

 

-------------- Example 4 --------------

C:\PS>$sl = Get-EmcScsiLun -ID *myScsiLun*

C:\PS> Get-EmcLUN -ScsiLun $sl

This example gets the LUN or LUNs associated with the specified SCSI LUN object.

 

-------------- Example 5 --------------

C:\PS>$cluster = Get-EmcClusterSystem myCluster

C:\PS>$cd = Get-EmcClusterDisk "Cluster Disk 1" -ClusterSystem $cluster

C:\PS>$vol = Get-EmcHostVolume "J:" -ClusterDisk $cd

C:\PS>Get-EmcLun -Volume $vol -ClusterSystem $cluster

This example gets the LUNs associated with the volume on the specified cluster.

 

---------- Example 6 ----------

C:\PS>$ss = Get-EmcStorageSystem myVNX

C:\PS>$h = Get-EmcHostSystem myHost

C:\PS>$initiator = Get-EmcHostBusAdapter -HostSystem $h

C:\PS>$initiatorId = $initiator.GlobalId

iqn.1991-05.com.microsoft:myHost.sr5dom.eng.emc.com

C:\PS>$view = Get-EmcLunMaskingView -StorageSystem $ss |  where { $_.HostBusAdapterIds -match $initiatorId}

C:\PS>$view.LunHluPairs[0].Hlu

1

C:\PS>Get-EmcLun -BlockStorageSystem $ss -InitiatorId $initiatorId -HostLunId 1

This example gets the LUNs associated with the specified block storage system, initiator ID, and host LUN identifier.

 

---------- Example 7 ----------

C:\PS>$h = Get-EmcHostSystem myHost

C:\PS>$lunIdentifier = Get-EmcHostLunIdentifier - HostSystem $h

C:\PS>Get-EmcLun -HostLunIdentifier $lunIdentifier[0]

This example gets the LUNs that are associated with the specified host LUN identifier.

 

---------- Example 8 ----------

C:\PS>$db = Get-EmcMailboxDatabase MBDB1

C:\PS>Get-EmcLun -MailboxDatabase $db

This example gets the LUNs that are associated with the specified mailbox database.

 

---------- Example 9 ----------

C:\PS>$db= Get-EmcMailboxDatabase rvdb20

C:\PS>Get-EmcLun -MailboxDatabase $db -MailboxDatabaseFileType Logs

This example gets the LUNs for the log folder that is associated with the specified mailbox database.

 

---------- Example 10 ----------

C:\PS>$dbCopy= Get-EmcMailboxDatabaseCopy rvdb*

C:\PS>Get-EmcLun -MailboxDatabaseCopy $dbCopy -MailboxDatabaseFileType Logs

This example gets the LUNs for the log folder that is associated with the specified mailbox database copy.

 

---------- Example 11 ----------

C:\PS>$Storage= Get-EmcStorageSystem *myvmax*

C:\PS>$ConLun = Get-EmcLun -BlockStorageSystem $Storage -Concrete

This example applies a filter on the output of the Get-EmcLun cmdlet , specifying the LunType as ConcreteLun.

 

---------- Example 12 ----------

C:\PS>$storage = Get-EmcStorageSystem vmax348

C:\PS>$storagegroup=Get-EmcVmaxStorageGroup -StorageSystem $storage

C:\PS>Get-EmcLun -VmaxStorageGroup $storagegroup[0]

This example gets the list of LUNs based on the specified VMAX storage group.