Microsoft Virtualization Discussions

how to get LUNID

TDUBB1234
6,163 Views

how can I get the lun ID of each lun that is mapped to each initiator group I created with the powershell toolkit? It will be similar to the 

 

lun show -m command

 

but in powershell

 

 

1 ACCEPTED SOLUTION

mark_schuren
6,150 Views

Try to start with something like this (for 7-mode):

 

Get-NaLun | ? {$_.Mapped -eq $true} | % {Get-NaLunMap -path $_.Path} | ft Path,InitiatorGroupType,ALUA,InitiatorGroupName,LunId

 

Also have a look at "Get-Member", to see all properties of "NaLunMap" objects:

 

Get-NaLun | ? {$_.Mapped -eq $true} | % {Get-NaLunMap -path $_.Path} | gm

 

 

For C-Mode something like this might be sufficient:

 

Get-NcLunMap | ft Vserver,Path,InitiatorGroup,LunId

View solution in original post

2 REPLIES 2

mark_schuren
6,151 Views

Try to start with something like this (for 7-mode):

 

Get-NaLun | ? {$_.Mapped -eq $true} | % {Get-NaLunMap -path $_.Path} | ft Path,InitiatorGroupType,ALUA,InitiatorGroupName,LunId

 

Also have a look at "Get-Member", to see all properties of "NaLunMap" objects:

 

Get-NaLun | ? {$_.Mapped -eq $true} | % {Get-NaLunMap -path $_.Path} | gm

 

 

For C-Mode something like this might be sufficient:

 

Get-NcLunMap | ft Vserver,Path,InitiatorGroup,LunId

TDUBB1234
6,139 Views

Thank you. That works great

Public