I've received a couple of email about setting up iSCSI under CentOS 4 or RHEL ES 4 server. Previously, I wrote about iSCSI under CentOS 5 / RHEL 5 server.
Requirements
[a] Following instructions tested on RHEL ES 4 and CentOS 4 only. (See RHEL 5/ CentOS 5 / Debian/ Ubuntu Linux specific instructions here).
[b] You need following information
[c] ISCSI Username
[d] ISCSI Password
[e] ISCSI Server IP / hostname
CentOS Linux v4.x - Install iscsi-initiator-utils
Type the following command:
# yum install iscsi-initiator-utils
Redhat ES Linux v4.x - Install iscsi-initiator-utils
Type the following command:
# up2date iscsi-initiator-utils
Configure iSCSI
Open /etc/iscsi.conf file, enter:
# vi /etc/iscsi.conf
Setup it as follows:
DiscoveryAddress=ISCSI_TARGET_HOST_OR_IP OutgoingUserName=ISCSI_USER_NAME OutgoingPassword=ISCSI_PASSWORD LoginTimeout=15
Save and close the file.
Start the iscsi service
Type the following command to start iscsi service so that you can see block device:
# chkconfig iscsi on
# /etc/init.d/iscsi start
Run any one of the following to find out new block device name:
# fdisk -l
# tail -f /var/log/messages
# find /sys/devices/platform/host* -name "block*"
Format iSCSI device
Use fdisk and mkfs.ext3 commands. First, create a partition (assuming that /dev/sdc is a new block device assigned to iscsi) :
# fdisk /dev/sdc
# mkfs.ext3 /dev/sdc1
Create /mnt/iscsi directory:
# mkdir -p /mnt/iscsi
Open /etc/fstab file and append config directive:
/dev/sdc1 /mnt/iscsi ext3 _netdev 0 0
Save and close the file. Mount the parition /dev/sdc1:
# mount -a
# df -H
Continue reading rest of the Linux iSCSI Storage Configuration series.
Contents
- CentOS / Red Hat Linux: Install and manage iSCSI Volume
- CentOS 4 / Redhat Enterprise Linux 4 iSCSI Installation and Configuration ( iscsi initiators )
- How To: Windows Server / XP / 2000 / 2003 ISCSI Initiator Configuration
- Linux tgtadm: Setup iSCSI Target ( SAN )
- Red Hat / CentOS Linux 4: Setup Device Mapper Multipathing
- Email this to a friend
- Printable version
- Rss Feed
- Last Updated: May/13/2008

{ 3 comments… read them below or add one }
I am in attempt to setup two Node Cluster with iSCSI as alternative to Shared Storage.I configured target and initiator successfully.
Now When I ran on one of client :
#find /sys/devices/platform/host* -name “block*”
/sys/devices/platform/host1/target1:0:0/1:0:0:0/block
As for info,I have ran the following commands on client:
followed as said in the doc and found it this way:
[root@BL02DL385 ~]# rpm -ivh iscsi-initiator-utils-4.0.3.0-6.x86_64.rpm
warning: iscsi-initiator-utils-4.0.3.0-6.x86_64.rpm: V3 DSA signature: NOKEY, key ID 9b3c94f4
Preparing… ########################################### [100%]
1:iscsi-initiator-utils ########################################### [100%]
[root@BL02DL385 ~]# vi /etc/iscsi.conf
DiscoveryAddress=10.14.236.134
# OutgoingUsername=fred
# OutgoingPassword=uhyt6h
# and/or
#
DiscoveryAddress=10.14.236.134
# IncomingUsername=mary
# IncomingPassword=kdhjkd9l
#
[root@BL02DL385 ~]# service iscsi start
Checking iscsi config: [ OK ]
Loading iscsi driver: [ OK ]
Starting iscsid: [ OK ]
[root@BL02DL385 ~]# CD /proc/scsi/scsi
-bash: CD: command not found
[root@BL02DL385 ~]# vi /proc/scsi/scsi
It is Displaying so:
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IET Model: VIRTUAL-DISK Rev: 0
Type: Direct-Access ANSI SCSI revision: 04
~
~
Is it working fine?
The entry for target ietd.conf file is:
Target iqn.2008-07.com.logica.vjs:storage.lun1
IncomingUser
OutgoingUser
Lun 0 Path=/root/cluster_share,Type=fileio
Alias iDISK0
Hi,
I have installed iscsi in redhat 5 and configured through via 100mbs netwotk card. I have one more network card int his server. How can I discovver the iscsi disk via diffrent network card to setup multi path..
Pls help me
Try the following:
Red Hat / CentOS Linux 4: Setup Device Mapper Multipathing
Tagged as: /etc/fstab, centos 4, centos linux, enterprise linux, fdisk command, format iscsi volume, iscsi centos, iscsi configuration, iscsi howto, iscsi redhat, iscsi setup, iscsi storage, iscsi target, mount iscsi volume, red hat iscsi, red hat linux iscsi, rhel 4, tail command, target host, Ubuntu Linux, yum command