Tags
At some point you will be asked by a Storage Engineer for your system’s iSCSI Initiator Node Name or your iqn. This list shows you how to get your local iSCSI initiator name or iqn from the command line. This assumes the iSCSI service is installed, enabled and running. If you have a different way or want to add an OS or platform to this list simply leave a comment and I’ll add it.
AIX:
> smitty iscsi
select > iSCSI Protocol Device
select > Change / Show Characteristics of an iSCSI Protocol Device
FreeBSD (v10 and newer. Thanks to Edward Tomasz Napierala for this update):
> iscsictl -v (only after you have established a session with your array)
HP-UX:
> iscsiutil -l
Linux:
> cat /etc/iscsi/initiatorname.iscsi
NetApp Data ONTAP: (this is a target iqn not a host iqn)
7-Mode:
> iscsi nodename
Cluster Mode from the clustershell:
> vserver iscsi show
NetBSD: (please make this easier NetBSD developers! How about an iscsictl list_initiators command?)
> iscsictl add_send_target -a <hostname or IP of your target/storage)
Added Send Target 1
> iscsictl refresh_targets
OK
> iscsictl list_targets
1: iqn.1992-08.com.netapp:sn.84167939
2: 10.1.0.25:3260,1000
> iscsictl login -P 2
Created Session 2, Connection 1
> iscsictl list_sessions
Session 2: Target iqn.1992-08.com.netapp:sn.84167939
On the NetApp filer find the initiator:
netapp01> iscsi initiator show
Initiators connected:
TSIH TPGroup Initiator/ISID/IGroup
4 1000 nbsd611.lab.slice2.com (iqn.1994-04.org.netbsd:iscsi.nbsd611.lab.slice2.com:0 / 40:00:01:37:00:00 / )
Solaris 11:
> iscsiadm list initiator-node
VMware ESXi 5.1:
ESXi console:
Get the devices first:
> esxcfg-scsidevs -a | grep iSCSI
Then get the iqn (in this case vmhba33 is the iSCSI device)
> vmkiscsi-tool -I -l vmhba33
esxcli:
> esxcli -s <esxihostname or ip> -u root iscsi adapter get -A vmhba33
Windows:
c:\iscsicli.exe
Thanks for finally talking about >Display the iSCSI Initiator Node Name or IQN from
the command line. | slice2 <Liked it!