Personal tools
You are here: Home Linux I/O iSCSI Enterprise Target v0.4.16 with Fedora

iSCSI Enterprise Target v0.4.16 with Fedora

Howto compile the iSCSI Enterprise Target (IET)

I'm using iSCSI to provide support for diskless MythTV front-ends. The MythTV front-end machines have a USB flash drive with /boot, which contains the iSCSI initiator configuration (including password). I have managed to install directly onto an iSCSI target with Fedora 8 and later (previous version of Fedora seemed to have significant problems). I have previously been using my Xen VM platform to provide iSCSI target services, and I am writing this as I move it onto my MythTV backend server (this is to increase the WAF, so that less machines are required to be up to keep the main front-end box running).

For redhat distros (Fedora/CentOS/RHEL) I couldn't find a binary RPM distribution of IET. ATRPMS has support for CentOS/RHEL. Given that I'm only using the software on a single machine, and since it needs to be recompiled for each new kernel to provide the iscsi_trgt.ko kernel module, I'm not going to produce RPM's, and just compile it directly.

Disks are configured with Linux software RAID and LVM. The network is GbE, with 9kB jumbo frames.

Specifically, this configuration doesn't use:

  • PXE boot
  • NFS
  • Any hardware offload for iSCSI


Download, unarchive, compile and install:

# cd /usr/local/src
# tar -xpzf iscsitarget-0.4.16.tar.gz
$ cd iscsitarget-0.4.16
$ make
# make install


Add a single LVM logical volume (/etc/ietd.conf)

        Lun 0 Path=/dev/6x320Gr6/myth-root,Type=blockio

Configure the init script, and start the IET service

# chkconfig --add iscsi-target
# service iscsi-target start

 Add a rule to IPTables to allow incoming iscsi tcp connections from the local LAN (/etc/sysconfig/iptables)

# IET (iscsi-target)
-A tcpIn -p tcp --source -m tcp --dport 3260 -m state --state NEW -j ACCEPT

Update (October 2008)

The driver fails to compile against a 2.6.26 kernel. A patch for this is available on trunk (svn revision 155). As per the instructions

, to check out trunk:

$ svn checkout



Compile output

The output from compiling IET v0.4.16 on a Fedora 8 i386 kernel


$ make
make -C usr
make[1]: Entering directory `/usr/local/src/iscsitarget-0.4.16/usr'
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o ietd.o ietd.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o iscsid.o iscsid.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o conn.o conn.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o session.o session.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o target.o target.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o message.o message.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o ctldev.o ctldev.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o log.o log.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o chap.o chap.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o event.o event.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o param.o param.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o plain.o plain.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o isns.o isns.c
cc ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o -o ietd -lcrypto
cc -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include   -c -o ietadm.o ietadm.c
cc ietadm.o param.o -o ietadm
make[1]: Leaving directory `/usr/local/src/iscsitarget-0.4.16/usr'
make -C /lib/modules/ SUBDIRS=/usr/local/src/iscsitarget-0.4.16/kernel modules
make[1]: Entering directory `/usr/src/kernels/'
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/tio.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/iscsi.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/nthread.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/wthread.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/config.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/digest.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/conn.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/session.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/target.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/volume.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/iotype.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/file-io.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/null-io.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/target_disk.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/event.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/param.o
  CC [M]  /usr/local/src/iscsitarget-0.4.16/kernel/block-io.o
  LD [M]  /usr/local/src/iscsitarget-0.4.16/kernel/iscsi_trgt.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/local/src/iscsitarget-0.4.16/kernel/iscsi_trgt.mod.o
  LD [M]  /usr/local/src/iscsitarget-0.4.16/kernel/iscsi_trgt.ko
make[1]: Leaving directory `/usr/src/kernels/'

Make install output

# make install
`usr/ietd' -> `/usr/sbin/ietd'
`usr/ietadm' -> `/usr/sbin/ietadm'
`etc/initd/initd.redhat' -> `/etc/init.d/iscsi-target'
`etc/ietd.conf' -> `/etc/ietd.conf'
`etc/initiators.allow' -> `/etc/initiators.allow'
`etc/initiators.deny' -> `/etc/initiators.deny'
`doc/manpages/ietadm.8' -> `/usr/share/man/man8/ietadm.8'
`doc/manpages/ietd.8' -> `/usr/share/man/man8/ietd.8'
`doc/manpages/ietd.conf.5' -> `/usr/share/man/man5/ietd.conf.5'
install: creating directory `/usr/share/doc/iscsitarget'
`ChangeLog' -> `/usr/share/doc/iscsitarget/ChangeLog'
`COPYING' -> `/usr/share/doc/iscsitarget/COPYING'
`README' -> `/usr/share/doc/iscsitarget/README'
`README.vmware' -> `/usr/share/doc/iscsitarget/README.vmware'
install: creating directory `/lib/modules/'
`kernel/iscsi_trgt.ko' -> `/lib/modules/'
Running depmod

Document Actions