Sunday, March 28, 2010

Discover iSCSI SAN LUN on ESX via CLI - As easy as you count 1,2,3 (assumes SAN admin mapped LUN to ESX Host & VMkernel port ready on ESX)



The command vmkiscsi-tool. Really good stuff, I can complete the rest of my setup without the GUI. One thing though to list out the iqn for iscsi after you enable it you must know the device name (ie vmhba??). Using this command:

# vmkiscsi-tool -I -l

I usually guess the iscsi hba is vmhba33 or 32 but how do I know for sure? Try:
# esxcfg-scsidevs -a
esxcfg-scsidevs-a
Ok great, now we know it is vmhba33 (Click the above image for full details as well)

[root@esxhost01 sbin]# vmkiscsi-tool -I -l vmhba33


iSCSI Node Name: iqn.1998-01.com.vmware:esxhost01-35151883
 

[root@esxhost01 sbin]#

Now with a few more vmkiscsi-tool commands I can finish configuring my iSCSI.

Add the Ip of the SAN:
[root@esxhost01 sbin]# vmkiscsi-tool -D -a 172.16.23.251 vmhba33

Now rescan:
[root@esxhost01 sbin]# esxcfg-rescan -a vmhba33

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.