
7065iSCSI_Config2.fm
Draft Document for Review August 30, 2007 12:59 am
390
IBM System Storage DS3000: Introduction and Implementation Guide
17.3 Install and configure the OpeniSCSI software initiator
Red Hat Enterprise Linux includes an iSCSI software initiator in Update 4 and later. The
software initiator is included on the installation media in the directory RedHat/RPMS as an
rpm file.
To install the software initiator, mount the installation media and install the iSCSI software
initiator rpm file. Example 17-1 shows the package installed from an NFS mounted file
system.
Example 17-1 Installation of the iSCSI software initiator RPM file
[root@hooghly ~]# mount -t nfs 172.18.0.1:/srv /mnt
[root@hooghly ~]# cd /mnt/ftp/rhel4as-i386-u5/RedHat/RPMS/
[root@hooghly RPMS]# rpm -ivh iscsi-initiator-utils-4.0.3.0-5.i386.rpm
Preparing... ########################################### [100%]
1:iscsi-initiator-utils ########################################### [100%]
[root@hooghly RPMS]#
After the iSCSI software initiator is installed, we need to check two configuration files in the
/etc directory.
/etc/initiatorname.iscsi
The first file is /etc/initiatorname.iscsi. After the iSCSI initiator is installed, this file contains
only the option that the IQN needs to be generated, as shown in Example 17-2. After the
iSCSI daemon is started for the first time, this file will be populated with the iSCSI qualified
name of the host.
Example 17-2 /etc/initiatorname.iscsi immediately after installation
[root@hooghly RPMS]# cat /etc/initiatorname.iscsi
GenerateName=yes
[root@hooghly RPMS]#
Example 17-3 shows the same file with an automatically generated IQN. This IQN is
regenerated to the same value when the software initiator gets reinstalled.
Example 17-3 /etc/initiatorname.iscsi after first iSCSI daemon start
[root@hooghly ~]# cat /etc/initiatorname.iscsi
## 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.5913f144a0d9
[root@hooghly ~]#
An alternative way to generate the IQN is with the
iscsi-iname
command. This command
will generate a unique IQN and output it to the console. This IQN might be used to define the
IQN of a given host. Example 17-4 shows how to use the
iscsi-iname
command. The output
can be redirected into /etc/initiatorname.iscsi.
Example 17-4 iscsi-iname
[root@hooghly ~]# iscsi-iname