Configure dedicated iSCSI networking Server side

1 Make sure “iscsi” and “iscsid” service 2, 3, 4, 5 are on for startup .

chkconfig iscsi on
chkconfig iscsid on
chkconfig --list iscsi
chkconfig --list iscsid

2 Get the host’s IQN (iSCSI qualified name).

# cat /etc/iscsi/initiatorname.iscsi

3 Configure the network for iSCSI ports.

  • Determine the iSCSI port names using the # ifconfig -a ……….. -a means all..
  • Set the STATIC IP address for the iSCSI initiator ports in same subnet.
  • The following example shows this line added:

#vim /etc/sysconfig/network-scripts/ifcfg-Edit: BOOTPROTO=none


Restart network services.
$ sudo /etc/init.d/networking restart

To list existing interfaces, specify iscsiadm –m iface.
To list all attributes of a single iface binding, specify iscsiadm –m iface –I ifacename.
The following example shows an iface creation:

iscsiadm –m iface –I iface0 –o new
iscsiadm –m iface –I iface0 –o update –n iface.net_ifacename –v
iscsiadm –m iface –I iface1 –o new
iscsiadm –m iface –I iface1 –o update –n iface.net_ifacename –v
Update the iface settings (MAC, IP, and IQN).

iscsiadm -m iface -I iface0 -o update -n iface.hwaddress
iscsiadm -m iface -I iface0 -o update -n iface.ipaddress -v
iscsiadm -m iface -I iface0 -o update -n iface.initiatorname -v
Establish the iSCSI sessions between initiators and targets.
Once you complete this step, four sessions are established.
Discover iSCSI targets.

iscsiadm –m discovery –t sendtargets –p –I iface0 –P 1
iscsiadm –m discovery –t sendtargets –p –I iface1 –P 1
The IQN looks like the following:
Record the IQN (it will be the same with each discovery) on the worksheet for the next step.

Using ifaces, log in to create sessions between the iSCSI initiators and iSCSI targets.
To log in session by session (do this four times, specifying the IQN and IP address for each target port):
iscsiadm -m node -T -I iface# -p -l

To connect to all arrays:
iscsiadm -m node -L all
For verification, list the iSCSI sessions established on the host.

iscsiadm -m session

Leave a Reply