Data Center

What is an iSCSI initiator? | Definition from TechTarget

What is an iSCSI initiator?

An Internet Small Computer System Interface initiator is software or hardware that lets a host computer send data to an external iSCSI-based storage array through an Ethernet network adapter over a TCP-based IP network.

ISCSI is a protocol for sharing block storage and communicating with input/output (I/O) devices over a TCP/IP network. The standard provides a way to link data storage devices and enable block-level access to these devices with the help of SCSI commands over a local area network (LAN), wide area network (WAN) and even the internet.

ISCSI technology is also known as SAN over IP technology since it facilitates the deployment of a storage area network over an IP network. The protocol does not require major upgrades to existing network infrastructure to run over long distances. This ability to run using existing infrastructure differentiates iSCSI from Fibre Channel and other communication technologies.

What is target and initiator in iSCSI?

As an IP-based standard, iSCSI involves communications between two types of devices: initiators and targets. The iSCSI initiator originates the I/O command sequence to facilitate data transmission to the storage device, which is also known as an iSCSI target. iSCSI initiators send commands over the TCP/IP network to the target. If the initiator is software, it is a device driver residing on the client system.

The command from the initiator sent over the TCP/IP network is received by the iSCSI target, which then provides a response to the initiator. The target might be software or hardware. Hardware iSCSI targets are usually storage appliances with embedded storage, although they can also be gateway devices with no internal, or embedded, storage.

All iSCSI initiators and targets are given unique names for identification purposes. Special iSCSI name formats that identify initiators and targets include the iSCSI qualified name (IQN), extended unique identifier and T11 network address authority. All IQNs are ASCII, or American Standard Code for Information Interchange, names with a size of 233 bytes.

A diagram showing how to plan an iSCSI network.
This network plan design can be scaled to allow multipath I/O by adding dedicated Ethernet switches for the storage network or by allowing the production local area network to be used as a backup path in case the dedicated Ethernet network is not available.

How does iSCSI work with initiators and targets?

The iSCSI architecture is based on client-server model. The clients are the initiators, and they consume storage. The servers are the targets. They share storage with the initiators by communicating with them via commands sent over the TCP/IP network.

All communications between initiators are targets is divided into messages that are transferred as iSCSI protocol data units. A PDU is the basic information unit of iSCSI, and it might carry control messages, SCSI commands from the initiator, and communication parameters and data.

All communications between initiators and targets happen over TCP connections that form a session. Once a session starts, an initiator is tied to a target (meaning the initiator and target can communicate) and a session ID is generated. For the initiator to communicate with a target, target nodes are first detected and sessions are established. Then iSCSI commands and responses are transported between the initiator and target and data is moved or shared between them.

Hardware iSCSI vs. software iSCSI

A hardware iSCSI initiator is a dedicated, host-based network interface card (NIC) with built-in resources to handle the iSCSI and TCP/IP processing functions. The need for a NIC-based TCP/IP offload engine has declined as servers have gained more powerful processing cores. A hardware iSCSI initiator may still be useful for data protection, when booting a server from a local disk, or for security if the card has built-in encryption capabilities.

A software iSCSI initiator is typically part of the server operating system (OS) and uses host central processing unit (CPU) resources to map the SCSI I/O command set to TCP/IP for use by the iSCSI storage system.

Software-based iSCSI initiators are far more common than hardware-based iSCSI initiators.

How to set up an iSCSI initiator

An iSCSI initiator can be set up on many different platforms, including Windows, Red Hat Enterprise Linux (RHEL) and Ubuntu.

Windows

These are the steps to set up the iSCSI initiator on Windows:

  1. Go to the Start menu search bar, and type “iSCSI Initiator.”
  2. When the iSCSI Initiator Properties opens, navigate to the Targets tab.
  3. In the Target box, type the IP address or domain name system name of the iSCSI target.
  4. Click Quick Connect and then Done to proceed.
  5. If target devices are not automatically discovered, navigate to the Discovery tab in the iSCSI Initiator Properties box and click Refresh.
  6. Follow the additional steps to add the target device and handle iSCSI sessions from the iSCSI initiator.

The iSCSI initiator can then be accessed from the Run command dialog box — registry keys must be modified first — Windows Start menu, file explorer address bar, control panel and task manager. It can also be opened using PowerShell with the iscsicpl.exe command, though this requires admin access.

Red Hat Enterprise Linux

To set up an iSCSI initiator on RHEL, the iSCSI target’s hostname and IP address must be known. The steps to set up the iSCSI initiator on RHEL are the following:

  1. Install iscsi-initiator-utils on the client machine.
  2. Check the initiator name using the command # cat /etc/iscsi/initiatorname.iscsi.
  3. Check that the initiator name matches the ACL, and restart the iscsid service.
  4. Discover the target.
  5. Log into the target with its displayed IQN.
  6. Create a file system on the iSCSI disk and replace “disk_name” with the iSCSI disk name displayed in the /var/log/messages file.
  7. Mount the file system with the command # mkdir /mount/point, where /mount/point should be the mount point of the partition.
  8. To mount the file system automatically when the system boots, edit the /etc/fstab file with the appropriate iSCSI disk name and mount point of the partition.

Ubuntu

To set up an iSCSI initiator on Ubuntu, it’s important to ensure all network interfaces are set up correctly. Incorrect configurations will result in the open-iscsi package behaving in unexpected ways. Here are the steps to set up the iSCSI initiator on Ubuntu:

  1. Install the open-iscsi package with the command $ sudo apt install open-iscsi.
  2. Configure the main configuration file /etc/iscsi/iscsid.conf.
  3. Restart the iSCSI daemon.
  4. Configure the environment variables so the iSCSI service understands which interfaces will act as paths.
  5. Configure the iscsi01 and iscsi02 interfaces.
  6. Discover the target devices.
  7. Configure automatic login.
  8. Confirm all required services are enabled during OS initialization.
  9. Restart the iscsid service, and log into the discovered logical units.

Explore the differences between Fibre Channel vs. iSCSI. Check out SAN and NAS: An illustrated guide to distinguishing the storage types. Learn about the advantages of SAN technology in an HCI world.