Benutzer-Werkzeuge

Webseiten-Werkzeuge


rhel:iscsi-rhel4

CentOS 4 / Redhat Enterprise Linux 4 iSCSI Installation and Configuration ( iscsi initiators )

by Vivek Gite on May 13, 2008

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

  • Following instructions tested on RHEL ES 4 and CentOS 4 only. (See RHEL 5/ CentOS 5 / Debian/ Ubuntu Linux specific instructions here).
  • You need following information
  • ISCSI Username
  • ISCSI Password
  • 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

manage iSCSI

by Jens (and RedHat ;-))

nodes

iSCSI Node Name Guidelines

  The entire node name can be up to 223 bytes in length
  No white space is allowed
  Node names are not case sensitive
  The following ASCII characters can be used:
*      dash ('-')
*      dot ('.')
*      colon (":")
*      numbers 0-9
*      lower-case letters a-z 

The node name of the initiator is stored in the /etc/initiatorname.iscsi file. Red Hat recommends the use of the command /sbin/iscsi-iname to generate a random node name, which can then be customized by the administrator. Using the system name or function (i.e. mail-server-1 or oracle-3) as the unique portion of the name can simplify iSCSI administration. An example initiatorname.iscsi file is shown below:

## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator.  The InitiatorName must be unique
## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1987-05.com.cisco:01.myschnukki-1

find targets

rhel/iscsi-rhel4.txt · Zuletzt geändert: 2011/11/15 10:47 von 2007