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
🐧 3 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
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
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