Unable to connect to shared (iscsitarget) dvd-rw drive on ubuntu karmic box

Posted on

QUESTION :

Intro

I have desktop with DVD-RW drive that runs primarily on Linux (namely Ubuntu 9.10). My wife has netbook that rins Windows XP with no cd/dvd drive. There’s also LAN through our ADSL modem/router. I’ve “ported” (actually, I’ve just grabbed sources and ran dpkg-buildpackage) iscsitarget package from Ubuntu Lucid to Karmic (here are packages), installed it (sudo aptitude install iscsitarget; sudo m-a a-i iscsitarget) and configured it in the following way (/etc/ietd.conf):

Target iqn.2020-01.local.develop7-desktop:storage.disc.dvdrw
Lun 0 Path=/dev/sr0,Type=blockio
#I've skipped commented lines

Also, I’ve opened port 3260 with ufw:

$ sudo ufw status | grep 3260
3260                       ALLOW       192.168.1.0/24

Problem

But (here’s the trouble) I still can’t connect to this target from Windows box. Microsoft Software iSCSI Initiator screams “Logon failure” upon connect attempt, and, respectively, fails to connect. After unsuccessful connection attempt I’ve noticed this line in dmesg | tail‘s output:

iscsi_trgt: ioctl(299) invalid ioctl cmd c078690d

Question

So the question is — what’s wrong with my config/iSCSI target/whatever else? Or, in short — what I’m doing wrong?

Thanks in advance.

ANSWER :

This Nabble thread indicates this could be a consequence of an old IET kernel module included in Ubuntu’s kernel. Check the thread closely and see if your symptoms align. This might make sense, since there seems to be a huge difference in versions between Karmic’s official iscsitarget package and the version you’re attempting to backport.

If so, the fix seems to be to find and disable the old module:

the original kernel module on Ubuntu is at:
/lib/modules/$(uname -r)/kernel/ubuntu/iscsitarget/iscsi_trgt.ko, and it’s necessary
to run depmod -a to regenerate modules.dep before attempting to load the new module,
e.g.:

mv /lib/modules/$(uname -r)/kernel/ubuntu/iscsitarget/iscsi_trgt.ko /lib/modules/$(uname -r)/kernel/ubuntu/iscsitarget/iscsi_trgt.ko.orig
depmod -a 

Leave a Reply

Your email address will not be published.