Setup iSCSI Target & Initiator (SAN ) on Centos 5.x

• Target

Install packages

#  yum -y groupinstall clustering cluster-storage
#  yum -y install scsi-target-utils
#  chkconfig tgtd on

Configure the target

# nano  /etc/tgt/target.conf
<target iqn.2010-12.localdomain.luci:diskDC>
backing-store /dev/mapper/vgstorage-lvdc
initiator-address 192.168.0.33
initiator-address 10.15.183.7
initiator-address 10.15.183.8
</target>

Display target available

# tgtadm –lld iscsi –op show –mode target

• Initiator

Install packages

#  yum -y groupinstall clustering cluster-storage
#  yum -y install iscsi-initiator-utils
#  chkconfig iscsi on
#  chkconfig iscsid on
#  service iscsid restart
#  service iscsi restart

Discover the iSCSI target

# iscsiadm -m discovery -t sendtargets -p 10.15.183.1

Log in to the target

# iscsiadm -m node -T iqn.2010-12.localdomain.luci:diskDC -p 10.15.183.1 -l

Delete iSCSI target

   /var/lib/iscsi/nodes/

   /var/lib/iscsi/send_targets/