Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sorry about the formatting below...

Linux Microknoppix 2.6.39.3 #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 did a

# apt-get install module-assistant debhelper

then

# m-a a-i iscsitarget

Fails with error

log:

iscsitarget-source.buildlog.2.6.39.3.1 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-2.6.39.3 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-2.6.39.3'
  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-2.6.39.3'
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:

ISCSITARGET_ENABLE=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

now 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

Target iqn.2001-04.com.example:storage.lun1
IncomingUser user p@ssw0rd
OutgoingUser
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:

iqn.2001-04.com.example:storage.lun1 192.168.60.234

/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 192.168.60.234 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 askubuntu.com/questions/511990/… –  RapidWebs Sep 1 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 at 16:00

1 Answer 1

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 https://svn.code.sf.net/p/iscsitarget/code/ iscsitarget

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

share|improve this answer

Your Answer

 
discard

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.