220px-Scsi_logo.svg                                                               iscsi-env



SCSI (Small Computer Systems Interface) has been a standard client-server protocol for decades it is used to enable computers to communicate with storage devices. Today’s IP Gigabit networks meet the performance requirements of to seamlessly transport SCSI commands between application servers to centralized storage.

iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances

The iSCSI protocol enables the transfer of SCSI packets over a TCP/IP (Ethernet) network. This means the disk drives in your SAN are presented over your existing Ethernet network to server applications as though the disks are local to your physical server hardware.

The Linux iSCSI driver acts as an iSCSI protocol initiator to transport SCSI requests and responses over an IP network between the client and an iSCSI-enabled target device, 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



When an end user or application sends a request, the operating system generates the appropriate SCSI commands and data request, which then go through encapsulation and, if necessary, encryption procedures. A packet header is added before the resulting IP packets are transmitted over an Ethernet connection. When a packet is received, it is decrypted (if it was encrypted before transmission), and disassembled, separating the SCSI commands and request. The SCSI commands are sent on to the SCSI controller, and from there to the SCSI storage device. Because iSCSI is bi-directional, the protocol can also be used to return data in response to the original request.

iSCSI is one of two main approaches to storage data transmission over IP networks; the other method, Fibre Channel over IP (FCIP), translates Fibre Channel control codes and data into IP packets for transmission between geographically distant Fibre Channel SANs. FCIP (also known as Fibre Channel tunnelingor storage tunneling) can only be used in conjunction with Fibre Channel technology; in comparison, iSCSI can run over existing Ethernet networks.



SCSI commands are send from the clients(initiators) over IP to SCSI storage devices  (targets)  on the remote server

First  we  are going to,configure SCSI storage device (target).


#yum install   scsi-target-utils


Then create a partition,we are going to use as a SCSI storage.in this example, i created 8gb of lvm  in volumegroup  vg_www


#lvcreate  -L  8G  -n  iscsi-1   vg_www


#vi  /etc/tgt/targets.conf

<target  iqn.2013.com.sathish:rdisk.1>

Backing-store  /dev/vg_www/iscsi-1






IQN  is the iSCSI qualified name

Iqn.2013.com.sathish:rdisk.1 is used to identify initiators and targets,communication takes over  on port 3260/tcp


#service tgtd  start


#chkconfig  tgtd on



Next we have to configure initiators(client) system



#yum install   iscsi-initiators-utils   iscsi-initiators-utils-devel


To discover targets in the  remote system by iscsiadm



#iscsiadm  –mode   discoverydb  –type  sendtargets  –portal  –discover,1 iqn.2013.com.sathish:rdisk.1


#vi  /etc/iscsi/initiatorname.iscsi




To login to remote scsi target



#iscsiadm  –mode  –node  –targetname    iqn.2013.com.sathish:rdisk.1

–portal  –login

Check  scsi virtual-disk is attached in  your system



#dmesg  |  grep   scsi


#tail  /var/log/messages


After virtual-disk is successfully attached logout from the target  syatem


#iscsiadm  –mode  –node  –targetname    iqn.2013.com.sathish:rdisk.1

–portal  –logout


#service  iscsid  restart

#chkconfig   iscsid  on



Then format the virtual-disk for your usage and for peristant after reboot


5 6 7

Include  it in the  /etc/fstab


#vi  /etc/fstab

device    mountpoint       filesystem     _netdev    0 0