IScsi installation on CentOS 5.2

Home » Computer Articles » Linux » IScsi installation on CentOS 5.2
April 23, 2009 Linux No Comments

Do all updates on Server

Other needed applications

yum install sysstat (For utilities, iostat etc)

Installation of Iscsi Target software

tar zxvf iscsitarget-0.4.17.tar.gz
cd iscsitarget-0.4.17
make install

Disk partition

Make sure you have GPT Kernel Support. (CentOS and Redhat Enterprise has this option enabled by default)

File Systems > Partition Types >

  • Advanced partition selection and
  • EFI GUID Partition support
Use parted and add LVM Partitions of the size you would like.
parted /dev/sda
mklabel gpt (Creates a new GPT disklabel)
mkpart primary 0 3001G (Create 3TB partition size)
mkfs.ext3 /dev/sda1 (Use mkfs to format file system)

Configuration of Iscsi Target software

vi /etc/ietd.conf add similar to below, Lots of examples is file.
Will need to check to see if we need more options added then
this. I check Openfiler and this is basically what they had in the file.
Lun 0 Path=/dev/hdb1,Type=fileio
Alias sys2
Lun 0 Path=/dev/hdb2,Type=fileio

Alias sys2

InitialR2T Yes
ImmediateData Yes
MaxRecvDataSegmentLength 131072
MaxXmitDataSegmentLength 131072
MaxOutstandingR2T 8

Start and Stop Iscsi Target Services

/etc/init.d/iscsi-target start
/etc/init.d/iscsi-target stop
/etc/init.d/iscsi-target restart
/etc/init.d/iscsi-target status

Setup IscsiTarget server to start with server

chkconfig iscsi-target on

Security setup for ip addresses you want to connect to a disk partition

vi /etc/initiators.deny
vi /etc/initiators.allow and add entries below
Multiple Servers to the same disk



If you add and/or remove a ip address you will have to restart the Iscsi Target Service.

Performance Adjustments

Edit sysctl.conf and add theses changes
# 3Ware Performance Adjustments
vm.dirty_background_ratio = 20
vm.dirty_ratio = 60
# Network Performance Adjustments
net.core.rmem_max = 1048576
net.core.rmem_default = 1048576
net.core.wmem_max = 1048576
net.core.wmem_default = 1048576
net.ipv4.tcp_mem = 1048576 1048576 1048576
net.ipv4.tcp_wmem = 1048576 1048576 1048576

net.ipv4.tcp_rmem = 1048576 1048576 1048576

Servers that are being supported by this Iscsi Setup
* VMware ESX Servers
* Novell Netware 6.5 Servers
* Linux Servers
* Windows Servers

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.