User Tools

Site Tools


linux:linux-san:iscsi:iscsi:rhel3-4

iSCSI in RHEL 3 and RHEL4

Process is pretty straight forward.

# up2date iscsi-initiator-utils  #installs the iscsi initiatior utils

You then need to create an /etc/initiatorname.iscsi file to create it you need to use /sbin/iscsi-iname

# /sbin/iscsi-iname

This creates a new IQN for the iscsi initiator. This can be modified if needed.

You then need to edit /etc/iscsi.conf file. Here is where you would setup the IP address of the target. Here are the most relevant options

 Continuous=no
 HeaderDigest=never
 DataDigest=never
 ConnFailTimeout=180
 ImmediateData=yes
 DiscoveryAddress=<IP address of target>

# if passwords are needed then you will need the following entries also

 OutgoingUsername=<username>
 OutgoingPassword=<password>
 IncomingUsername=<anotherusername>
 IncomingPassword=<anotherpassword>
 

Now you will need to start the service and ensure it will auto start.

  /etc/init.d/iscsi start
  chkconfig iscsi on
  

You will then be able to create luns and present then to the server. Once the luns are presented you might have to restart the isci service

service iscsi restart

and now you can create new new partitions and use them as normal

One thing to be aware is that the iscsi service starts after the partitions in /etc/fstab are mounted so adding them there can cause the system to hang.

to prevent this you need to add the _netdev option

#device         mount point     FS      Options Backup  fsck
LABEL=data1     /mnt/data1      ext3    _netdev 0       0
/dev/sdf1       /mnt/data2      ext3    _netdev 0       0
linux/linux-san/iscsi/iscsi/rhel3-4.txt · Last modified: by 127.0.0.1