Configure the Linux Client
1. Install the iscsi-initiator-utils with up2date
up2date iscsi-initiator-utils
2. This installs the iscsi initiator on to the linux client along with a man page and rc start scripts. The iscsi initiator is configured with the iscsi.conf file located in /etc. Below is the iscsi.conf file used for the target above.
# simple iscsi.conf
DiscoveryAddress=172.30.0.28
OutgoingUserName=gfs
OutgoingPassword=secretsecret
LoginTimeout=15
DiscoveryAddress=172.30.0.28
3. Start the iscsi initiator and cross your fingers
service iscsi start
4. Check that the disk is visiable under proc, if it's not look in /var/log/messages on both the client and the host system.
cat /proc/scsi/scsi
Below is the output from my /proc/scsi/scsi
[root@gfs1 init.d]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IET Model: VIRTUAL-DISK Rev: 0
Type: Direct-Access ANSI SCSI revision: 04
5. Next run the iscsi-ls command
iscsi-ls
Here is the output from this example
*******************************************************************************
SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)
*******************************************************************************
TARGET NAME : iqn.2000-12.com.digicola:storage.lun1
TARGET ALIAS :
HOST ID : 1
BUS ID : 0
TARGET ID : 0
TARGET ADDRESS : 172.30.0.28:3260,1
SESSION STATUS : ESTABLISHED AT Thu Feb 9 01:22:37 EST 2006
SESSION ID : ISID 00023d000001 TSIH 100
*******************************************************************************
6. Voila! you should now have a new SCSI disc avaiable for use. Now you can use fdisk to partition the disk (fdisk /dev/sdb) and use mkfs to format the partition (which is out of the scope of this howto).
7. Finally set the iscsi service start automatically
chkconfig iscsi on