Hi,
I create a scsi lun and scan All HBAs. Vcenter will discover the lun and displays its canonical name (e.g. /vmfs/devices/disks/naa.60a98000433469752f6f5641654d4368 ) . Is there any way i can get the original lun name or lun path ?
To continue the question, Is there a way we can form canonical name for the scsi Lun based upon any standards ?
Hey, Try the below command from service console
esxcfg-rescan -d vmhba<x> (where X is the adapter number, usually for iscsi its 32)
Jay
VCP 310,VCP 410,MCSE
Consider awarding points for "helpful" and/or "correct" answers.
I'm not sure I understand what you mean by "lun path".
Is that a field that is displayed in the vSphere client ?
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
I create a lun on SAN storage. when I rescan HBAs from Vcenter I get the device name for the lun in the Vcenter.
My question is How do I get the original lun path(in SAN storage) from the device name displayed in the Vcenter ?
Still not sure what exactly you want.
Do you see the information you're after in the vSphere client ?
If yes, could you perhaps include a screenshot of the properties you want to see ?
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
If I understand you question correctly, you want to see the LUN from command line
use the following command.
#esxcfg-mpath -l | less
This will give you the LUN path information with "naa." id
If that is indeed what is being asked, then you have a PowerCLI solution as well.
$esxName = <esx-hostname> $report = @() $esx = Get-VMHost $esxName | Get-View $esx.Config.StorageDevice.ScsiLun | where {$_.DeviceType -eq "disk"} | %{ $row = "" | Select DeviceName, CanonicalName $row.DeviceName = $_.DeviceName $row.CanonicalName = $_.CanonicalName $report += $row } $report
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks guys for the solution.
This solves my problem.
-Satish.
Hi all,
Since I've seen other similar questions being redirected to this post I would like to make clarification that Luc's solution is correct as always but in this case is not optimal either from performance and mostly ease of use (Sorry Luc, but should have mentioned that). The same result could be achieved with a single line of PowerCLI code:
Get-ScsiLun -VmHost $esxName -LunType "disk" | Select CanonicalName, ConsoleDeviceName.
It's much shorter and easy to remember and on the other hand skipping a heavy unnecessary call to Get-View
Best regards,
Yavor
Thanks Yavor, you're right.
Problem is just that the Get-ScsiLun doesn't return all the properties, for example the LUN Id is missing.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference