Setting up iSCSI on CentOS / Red Hat Enterprise Linux

Getting Started

Step 1: Install iscsi-initiator-utils on CentOS 8 / RHEL 8

dnf install iscsi-initiator-utils

Step 2: Configure Initiator Name

$ vi /etc/iscsi/initiatorname.iscsi
## Change it to match the one you placed in target's ACL
InitiatorName=iqn.2019-11.com.computingforgeeks:initiator1

Step 3: Configure authentication credentials – username & password

Open “/etc/iscsi/iscsid.conf” file and edit, see Fedora

vim /etc/iscsi/iscsid.conf

Step 4: Test iSCSI Target discovery

# iscsiadm -m discovery -t sendtargets -p 172.17.52.184
172.17.52.184:3260,1 iqn.2019-11.computingforgeeks.com:geekstarget1

Step 5: Confirm Target’s status

# iscsiadm -m node -o show
# BEGIN RECORD 6.2.0.874-10
 node.name = iqn.2019-11.computingforgeeks.com:geekstarget1
 node.tpgt = 1
 node.startup = automatic
 node.leading_login = No
 iface.hwaddress =
 iface.ipaddress =
 iface.iscsi_ifacename = default
 iface.net_ifacename =
 iface.gateway =
 iface.subnet_mask =
 iface.transport_name = tcp
 iface.initiatorname =
 iface.state =
 iface.vlan_id = 0
 iface.vlan_priority = 0
 iface.vlan_state =
 iface.iface_num = 0
 iface.mtu = 0