Configuring ISCSI initiator in Linux

Internet Small Computer System Interface is a Storage Area Network (SAN) protocol,It is an Internet Protocol (IP)-based storage networking standard for linking data storage facilities. By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. iSCSI 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 icsci clients (called initiators) send SCSI commands to SCSI storage devices (targets) on remote servers. Unlike traditional Fibre Channel, which requires special-purpose cabling, iSCSI can be run over long distances using existing network infrastructure.

iSCSI Initiator (iSCSI client)
      An initiator typically serves the same purpose to a computer as a SCSI bus adapter would, except that instead of physically cabling SCSI devices (like hard drives and tape changers), an iSCSI initiator sends SCSI commands over an IP network. An initiator falls into two broad types:

Software initiator

A software initiator uses code to implement iSCSI. Software initiators are available for most popular operating systems and are the most common method of deploying iSCSI.

Hardware initiator


A hardware initiator uses dedicated hardware, typically in combination with software (firmware) running on that hardware, to implement iSCSI. 

 IQN ( iSCSI Qualified Name)
iSCSI qualified names are given to targets as well as initiator as a reference to them.Structure of  IQN is given below
iqn.<date (yyyy-mm) >.<reversed domain name >.<optional prefix>
                  
                Example :iqn.2012-03.in.ktux91.san:iscsi1



Configuring iSCSI Initiators

 yum install iscsi-initiator-utils

chkconfig iscsi on
chkconfig iscsid on
service iscsi start
To set an initiator name
Vi /etc/iscsi/initiatorname.iscsi
InitiatorName=iSCSI_Qualified_Name



iscsiadm    Utility to manage iscsi initiator
-m ->mode  = discovery | node |
-t -> type


Discovering Targets
iscsiadm -m discovery -t <target_type>  -p <target_ip>

Logging In to an iSCSI Target
iscsiadm -m node --targetname <target_name> -p <target_IP:port> -l

Once logged in we can find the device by fdisk -l,and configure it in the same way as we do the local disks.





For more videos on centos and other opensource solutions please visit ktux91