iscsi san on centos
Question:
How do I setup Centos to be an iscsi san server
Answer:
Install scsi-target-utils
How to install scsi-target-utils
# 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
/etc/tgt/targets.conf
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
<target iqn.2010-10.example:iscsi.shares>
backing-store /dev/sdb1
backing-store /dev/sdb2
</target>
Initiate the changes (have tgt re-read config file)
#tgt-admin --execute
List Active Targets
# tgtadm –lld iscsi –mode target –op show
Open Firewall to allow iSCSI connections
Open port 3260
# system-config-securitylevel-tui
add 3260:tcp
Check that the port is open
# iptables -L
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:iscsi-target



many thanks
How do I set up a virtual cd/dvd as additional lun in centos/rhel 6.x?