CentOS 4 / Redhat Enterprise Linux 4 iSCSI Installation and Configuration ( iscsi initiators )
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
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- CentOS / Red Hat Linux: Install and manage iSCSI Volume
- Install PHP 5 on Red Hat Enterprise Linux version 4
- How To: Windows Server / XP / 2000 / 2003 ISCSI Initiator Configuration
- Can I boot My Linux Server from iSCSI or SAN or NAS network attached storage?
- Download of the day CentOS 5 CD / DVD ISO
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: /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



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