yum install scsi-target-utils
Configure service to start on boot
service tgtd start chkconfig tgtd on
How to create iscsi drives called targets
iSCSI is comprised of two components. A target and an initiator. The target is the iscsi or san server. The initiator is the client device connecting to the iscsi server.
Targets LUN can be either LVM logical volume, a disk partition, a whole disk, or a file.
scsi-target-utils is controlled on the cli by commands. New scsi-target-utils has a configuration file
Add the following to the targets.conf file to create the target “iqn.2010-10.example:iscsi.shares” and with two LUNs /dev/sdb1 /dev/sdb2
backing-store /dev/sdb1 backing-store /dev/sdb2
Initiate the changes (have tgt re-read config file)
List Active Targets
tgtadm –lld iscsi –mode target –op show
Open Firewall to allow iSCSI connections
Open port 3260
Check that the port is open
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:iscsi-target