Subscribe
Highlighted

How to identify NetApp LUN ID in Vmware ?

Hi,

I have allocated couple of NetApp LUNs from different filer to a Vmware host ? Now how do I identify NetApp LUN IDs along with their Filer name or serial number ?

Thanks

Raj

How to identify NetApp LUN ID in Vmware ?

on esx host, go to configuration tab, storage adapters, then highlight the vmhba (fc or iscsi) that the lun is on.  Change from "devices" tab to "paths" tab...scroll to target.  There, you will find the  system id of the netapp filer.

Re: How to identify NetApp LUN ID in Vmware ?

lun show -m

from the command line will show you all LUN ID's

Hope this helps.

Re: How to identify NetApp LUN ID in Vmware ?

Responding to an old question but in the event this will help someone else searching.  To positively know that a particular NetApp mapped LUN is the same ESXi storage device:

TLSmiley Very HappyR version is the VMware LUN identifier is the hex of the NetApp LUN Serial No. string.

  1. In vSphere, select the host configuration tab, storage.
  2. Select the Devices View   
  3. Sort by LUN # and locate the LUN you want to verify.
  4. Right click the LUN in the Devices list and select "Copy identifier to clipboard"
  5. Paste the copied identifier into a Hex to String converter
    1. http://www.string-functions.com/hex-string.aspx
  6. Copy the converted string and paste to a work note.
  7. In the NetApp System manager, select the LUN you want to verify in the LUN list.
  8. In the LUN properties pane, copy the Serial No.
  9. Paste Serial No. below the converted hex in the work note and compare.  There may be some odd ASCII characters at the beginning of the converted hex that you can ignore.

Note an alternate method to get the NetApp LUN Serial No value is in the CLI.  Use: lun show -v

Re: How to identify NetApp LUN ID in Vmware ?

This worked perfectly for me.  I was able to find the serial and with the -v switch determine the serial of the LUN and match them

Thanks

Re: How to identify NetApp LUN ID in Vmware ?

You can use lun serial -x <lun_path>. With -x serial number is printed in HEX format.

Re: How to identify NetApp LUN ID in Vmware ?

Can you please tell me the equivalent command in C-mode.

Re: How to identify NetApp LUN ID in Vmware ?

Here is a PowerShell script I created which connects to both the VMware environment and the cDOT controller and reports on which NetApp LUNs back the datastore

 

Add-PSSnapin vmware.vimautomation.core
Import-Module DataONTAP

Connect-VIServer your.vcenter
Connect-NcController your.cdot.system

$naluns = Get-NcLun
$ds = Get-Datastore | ?{ $_.Type -eq "VMFS" }

$ds | %{
    Write-Host "Finding LUNs for datastore $($_.Name)" 
    $luns = $_ | Get-ScsiLun | ?{ $_.CanonicalName -match "naa.600a0980*" }

    if ($luns.length -gt 0) {
        Write-Host "    Found $($luns.length) paths"
        $completed = @()

        $luns | %{ 
            if (!$completed.Contains($_.CanonicalName)) {
                $hexSerial = ($_.CanonicalName).Substring(12)
                $serial = for ($i = 0; $i -lt $hexSerial.length; $i += 2) {
                    [char][int]::Parse($hexSerial.substring($i,2), 'HexNumber')
                }

                $ntapSerial = $serial -join ""
                Write-Host "  NetApp LUN serial is: $($ntapSerial)"

                $ntapLun = $naluns | ?{ $_.SerialNumber -eq $ntapSerial }
                Write-Host "    NetApp SVM: $($ntapLun.Vserver)"
                Write-Host "    LUN Path: $($ntapLun.Path)"
                $completed += $_.CanonicalName
            }
        }
    }
}

Sample output:

 

Finding LUNs for datastore GOLD
    Found 2 paths
  NetApp LUN serial is: T0ecH>0P3ekw
    NetApp SVM: VMware_SVM
    LUN Path: /vol/vmware_gold/vmware_gold.lun

Finding LUNs for datastore SILVER
    Found 2 paths
  NetApp LUN serial is: MT-gv?E8Ec5t
    NetApp SVM: VMware_SVM
    LUN Path: /vol/vmware_silver/vmware_silver.lun

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: How to identify NetApp LUN ID in Vmware ?

That command would be 'lun show -fields serial' to show the serial number for all LUNs.  

 

You can filter it down by vserver by doing 'lun show -vserver [vserver name] -fields serial' or by specific LUN using 'lun show -lun [lun name] -fields serial'

 

-prw

Re: How to identify NetApp LUN ID in Vmware ?

https://www.youtube.com/watch?v=NGpe27Xp1nQ

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.