Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My server info:

Linux Microknoppix #21 SMP PREEMPT Sat Jul 23 09:48:39 CEST 2011 i686 GNU/Linux

modprobe iscsi_trgt 

results in

FATAL: Module iscsi_trgt not found.

So I run

# apt-get install module-assistant debhelper


# m-a a-i iscsitarget

It fails with error


iscsitarget-source.buildlog. contents:

dh_clean -k
dh_clean: dh_clean -k is deprecated; use dh_prep instead
#/usr/bin/make -C /usr/src/linux KERNEL_SOURCES=/usr/src/linux MODVERSIONS=detect KERNEL=linux- KDIR=/usr/src/linux SUBDIRS=/usr/src/modules/iscsitarget/kernel modules
/usr/bin/make -C /usr/src/linux SUBDIRS=/usr/src/modules/iscsitarget/kernel modules
make[2]: Entering directory `/usr/src/linux-headers-'
  CC [M]  /usr/src/modules/iscsitarget/kernel/tio.o
  CC [M]  /usr/src/modules/iscsitarget/kernel/iscsi.o
  CC [M]  /usr/src/modules/iscsitarget/kernel/nthread.o
  CC [M]  /usr/src/modules/iscsitarget/kernel/wthread.o
/usr/src/modules/iscsitarget/kernel/wthread.c: In function 'worker_thread':
/usr/src/modules/iscsitarget/kernel/wthread.c:75:3: error: implicit declaration of function 'copy_io_context' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

make[3]: *** [/usr/src/modules/iscsitarget/kernel/wthread.o] Error 1
make[2]: *** [_module_/usr/src/modules/iscsitarget/kernel] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/iscsitarget'
make: *** [kdist_build] Error 2

I've done most of the work of creating a new partition, volume group, etc..., here is a rough guide to what I've done so far:

Boot to UBCD, open partition manager, resize partition so there is some free space

Create a new partition, but no formatting type /dev/sda3

Boot back into linux root shell

aptitude install iscsitarget iscsitarget-modules-`uname -r`

First we set up the target (server2): Open /etc/default/iscsitarget...

vi /etc/default/iscsitarget

... and set ISCSITARGET_ENABLE to true:


root@Microknoppix:/sbin# vgcreate vg0 /dev/sda3
No physical volume label read from /dev/sda3
Physical volume "/dev/sda3" successfully created

Volume group "vg0" successfully created

Then create 75GB lun under vgo named storage_lun1

root@Microknoppix:~# lvcreate -L75G -n storage_lun1 vg0
Logical volume "storage_lun1" created

vi /etc/iet/ietd.conf - add the following lines to file vi /etc/iet/ietd.conf

IncomingUser user p@ssw0rd
Lun 0 Path=/dev/vg0/storage_lun1,Type=fileio
Alias LUN1
#MaxConnections 6

root@Microknoppix:/dev/vg0# vi /etc/iet/initiators.allow

add to end of file:

/etc/init.d/iscsitarget start 
error Starting iSCSI enterprise target service: FATAL: Module iscsi_trgt not found.

So did an: apt-get install module-assistant debhelper

then: m-a a-i iscsitarget (which also installed kernel headers)

I'd like to get my win7 ultimate box at to connect to the target lun but here is where I am stuck.

share|improve this question
not sure if this is related, but I have a server running as a iscsi target server, and after upgrading Ubuntu to the latest hardware stack, I can no longer access my remote disks. reinstalling/recompiling the driver also fails.. here is my question on askubuntu… – RapidWebs Sep 1 '14 at 15:59
maybe a bug report is in order? i'll take my issue to the ubuntu IRC channel and see if I can make any headway sometime. If I come up with anything, I'll post back here – RapidWebs Sep 1 '14 at 16:00

Get the latest version from SVN because the one in Debian and Ubuntu usually fails to compile. I had the same error and the latest-greatest compiles like charm.

svn co iscsitarget

Or you had better to use SCST, because it is more stable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.