In computing, iSCSI is an acronym for Internet Small Computer Systems Interface, an Internet Protocol (IP)-based storage networking standard for linking data storage facilities. It provides block-level access to storage devices by carrying SCSI commands over a TCP/IP network. iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. It can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval.
The protocol allows clients (called initiators) to send SCSI commands (CDBs) to storage devices (targets) on remote servers. It is a storage area network (SAN) protocol, allowing organizations to consolidate storage into storage arrays while providing clients (such as database and web servers) with the illusion of locally attached SCSI disks. It mainly competes with Fibre Channel, but unlike traditional Fibre Channel which usually requires dedicated cabling, iSCSI can be run over long distances using existing network infrastructure.
Note: You may find that when your targets are discovered, they are listed under a different IP address. This tends to happen if the iSCSI service is exposed via NAT or a virtual IP. In cases like these, iscsiadmin will fail to connect. This requires two tweaks: one to the directory name of the node automatically created by your discovery activities, and one to the default file contained within this directory.
For example, you are trying to connect to an iSCSI target on 123.123.123.123 at port 3260. The server exposing the iSCSI target is actually at 192.168.1.2 but exposed via NAT. isciadm will register the internal address rather than the public address:
Within the directory, there is a default file with all the settings necessary to connect to the target.
Rename /etc/iscsi/nodes/iqn.1992-05.com.emc:fl1001433000190000-3-vnxe/192.168.1.2\,3260\,1/ to /etc/iscsi/nodes/iqn.1992-05.com.emc:fl1001433000190000-3-vnxe/123.123.123.123\,3260\,1/
Within /etc/iscsi/nodes/iqn.1992-05.com.emc:fl1001433000190000-3-vnxe/123.123.123.123\,3260\,1/default, change the node.conn[0].address setting to point to 123.123.123.123 instead of 192.168.1.2. This could be done with a command such as sed -i 's/192.168.1.2/123.123.123.123/g' /etc/iscsi/nodes/iqn.1992-05.com.emc:fl1001433000190000-3-vnxe/123.123.123.123\,3260\,1/default
You may now mount the target as per the instructions in the link.
Note that it will show the IP and port of the interfaces where you can reach those targets. It can even show internal IPs or different IPs from the one you used.
Then you catch the 2nd part of the printed string of each line (iqn.1992-05.com.emc:fl1001433000190000-3-vnxe from the first line) and try to login:
We can find more information about it by just using without any --login/--logout parameter
iscsiadm-mnode--targetname="iqn.1992-05.com.emc:fl1001433000190000-3-vnxe"-p123.123.123.123:3260# BEGIN RECORD 2.0-873node.name=iqn.1992-05.com.emc:fl1001433000190000-3-vnxenode.tpgt=1node.startup=manualnode.leading_login=Noiface.hwaddress=<empty>iface.ipaddress=<empty>iface.iscsi_ifacename=defaultiface.net_ifacename=<empty>iface.transport_name=tcpiface.initiatorname=<empty>iface.bootproto=<empty>iface.subnet_mask=<empty>iface.gateway=<empty>iface.ipv6_autocfg=<empty>iface.linklocal_autocfg=<empty>iface.router_autocfg=<empty>iface.ipv6_linklocal=<empty>iface.ipv6_router=<empty>iface.state=<empty>iface.vlan_id=0iface.vlan_priority=0iface.vlan_state=<empty>iface.iface_num=0iface.mtu=0iface.port=0node.discovery_address=192.168.xx.xxnode.discovery_port=3260node.discovery_type=send_targetsnode.session.initial_cmdsn=0node.session.initial_login_retry_max=8node.session.xmit_thread_priority=-20node.session.cmds_max=128node.session.queue_depth=32node.session.nr_sessions=1node.session.auth.authmethod=Nonenode.session.auth.username=<empty>node.session.auth.password=<empty>node.session.auth.username_in=<empty>node.session.auth.password_in=<empty>node.session.timeo.replacement_timeout=120node.session.err_timeo.abort_timeout=15node.session.err_timeo.lu_reset_timeout=30node.session.err_timeo.tgt_reset_timeout=30node.session.err_timeo.host_reset_timeout=60node.session.iscsi.FastAbort=Yesnode.session.iscsi.InitialR2T=Nonode.session.iscsi.ImmediateData=Yesnode.session.iscsi.FirstBurstLength=262144node.session.iscsi.MaxBurstLength=16776192node.session.iscsi.DefaultTime2Retain=0node.session.iscsi.DefaultTime2Wait=2node.session.iscsi.MaxConnections=1node.session.iscsi.MaxOutstandingR2T=1node.session.iscsi.ERL=0node.conn[0].address=192.168.xx.xxnode.conn[0].port=3260node.conn[0].startup=manualnode.conn[0].tcp.window_size=524288node.conn[0].tcp.type_of_service=0node.conn[0].timeo.logout_timeout=15node.conn[0].timeo.login_timeout=15node.conn[0].timeo.auth_timeout=45node.conn[0].timeo.noop_out_interval=5node.conn[0].timeo.noop_out_timeout=5node.conn[0].iscsi.MaxXmitDataSegmentLength=0node.conn[0].iscsi.MaxRecvDataSegmentLength=262144node.conn[0].iscsi.HeaderDigest=Nonenode.conn[0].iscsi.DataDigest=Nonenode.conn[0].iscsi.IFMarker=Nonode.conn[0].iscsi.OFMarker=No# END RECORD
There is a script to automate basic subnet enumeration process available atiscsiadm****