Configuring an iSCSI Initiator….

An iSCSI client functions as an SCSI initiator to access target devices on an iSCSI server. An iSCSI initiator sends SCSI commands over an IP network. There are two types of iSCSI initiators.

  • Software initiator: A kernel-resident device driver uses the existing network interface card (NIC) and network stack to emulate SCSI devices. Some network cards offer TCP/IP Offload Engines (TOE), which perform much of the IP processing that is normally performed by server resources. These TOE cards have a built-in network chip, which creates the TCP frames. The Linux kernel does not support TOE directly; therefore, the card vendors write drivers for the OS.
  • Hardware initiator: This uses a dedicated iSCSI Host Bus Adaptor (HBA) to implement iSCSI. Hardware initiators provide better performance because the processing is performed by the HBA rather than the server. You can also boot a server from iSCSI storage, which you cannot do with software initiators. The downside is that the cost of an iSCSI HBA is much higher than an Ethernet NIC.

Oracle Linux and most operating systems provide software initiator functionality.

To configure an Oracle Linux system as an iSCSI initiator, install the iscsi-initiator-utils software package. This package is the Linux Open-iSCSI Initiator.

# dnf install iscsi-initiator-utils

The package installs several files including the following:

  • /etc/iscsi/iscsid.conf: The configuration file read by iscsid and iscsiadm. This file is heavily commented with descriptions for each configuration directive.
  • /sbin/iscsid: The Open-iSCSI daemon that implements the control path and management facilities
  • /sbin/iscsiadm: The Open-iSCSI administration utility used to discover and log in to iSCSI targets

Edit the /etc/iscsi/initiatorname.iscsi file and replace the InitiatorName parameter with the initiator name that you previously configured as ACL on the target.

InitiatorName=iqn.2003-01.org.linux-iscsi.host02.x8664:sn.3abca38b994f:host03

Use the systemctl command to enable and start the iscsid service.

# systemctl enable iscsid

# systemctl start iscsid