• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: iSCSI target on SheevaPlug?  (Read 8567 times)
odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« on: September 25, 2010, 11:03:14 PM »

Hi,

while setting up my XBMC on an ASRock 330HT Nettop I thought it we be nice to see if it could use the SheevaPlug via iSCSI.

My Sheeva runs with Ubuntu 9.04 and 2.6.35.4 from cbxbiker61.

So tried to follow some basic guides how to set it up like
http://www.howtoforge.com/using-iscsi-on-ubuntu-9.04-initiator-and-target or http://www.aspdeveloper.net/tiki-index.php?page=LinuxiSCSITargetOnUbuntu

After creating an image file with
dd if=/dev/zero of=/mnt/sda1/software/ISOs/xbmc.img count=0 obs=1 seek=20G

I followed the other steps in the guide and put something like the following into /etc/ietd.conf
Code:
Target iqn.2001-04.com.example:xbmc.lun1
        IncomingUser xbox xbmc
        OutgoingUser
        Lun 0 Path=/mnt/sda1/software/ISOs/xbmc.img,Type=fileio
        Alias LUN1
        #MaxConnections  6

However it won't work/start

# /etc/init.d/iscsitarget restart
 * Removing iSCSI enterprise target devices                           [ OK ]
 * Starting iSCSI enterprise target service                              [fail]

Any ideas?
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #1 on: September 26, 2010, 04:04:45 PM »

Any ideas?
  • Read the syslog messages to see whether they report anything
  • Run "sh -x /etc/init.d/iscsitarget start" and see whether thar shows up where the problem occurs
  • Run the command from iscistarget one-by-one to see which one produces an error.
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #2 on: September 27, 2010, 07:26:47 AM »

Is your domain name really "example.com"? your need to have it setup correct domain name to get to work.
Logged

Good Luck Smiley

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #3 on: September 30, 2010, 11:41:22 AM »

@Pingtoo: I tried it with my own domain first, but as that didn't work as well I tried to stick as closely to an example as possible.

@Birdman: think I have no related messages in syslog

The output of "sh -x /etc/init.d/iscsitarget start" shows something like
...
[+ /usr/bin/tput setaf 1
+ printf fail
fail+ /usr/bin/tput op

+ echo ]
...

Re running the script step-by-step will me take some time - I have to understand it's structure first ;-)
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #4 on: September 30, 2010, 03:26:01 PM »

The output of "sh -x /etc/init.d/iscsitarget start" shows something like
...
[+ /usr/bin/tput setaf 1
+ printf fail
fail+ /usr/bin/tput op

+ echo ]
Nothing more??  All that is doing is printing "fail" (having first set the foreground colour - "setaf 1", and setting it back to default afterwards "op").
The object is to find out what caused it to fail, so I'd hoped to see some commands before that.
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #5 on: September 30, 2010, 03:32:00 PM »

I am on gentoo so I can not tell how your supposed configuration but here is mine. (I am on version  1.4.19)
Code:
#ietd.conf

##OutgoingUser xxxx secret_password

Target ign.2009-11.home.biger:iscsivol1
  Lun 0 Path=/dev/evms/iscsivol0,Type=blockio
  Alias         vol1
#  HeaderDigest  CRC32C
#  DataDigest    CRC32C
  InitialR2T    No
  ImmediateData Yes
#  MaxRecvDataSegmentLength 262144
#  MaxXmitDataSegmentLength 262144
  NOPInterval   60
  NOPTimeout    60

After startup ietd my dmesg show
Code:
iSCSI Enterprise Target Software - version 1.4.19
iscsi_trgt: Registered io type fileio
iscsi_trgt: Registered io type blockio
iscsi_trgt: Registered io type nullio

lsmod show
Code:
iscsi_trgt             70948  4

cat /proc/net/iet/volume
Code:
tid:1 name:ign.2009-11.home.biger:iscsivol1
lun:0 state:0 iotype:blockio iomode:wt path:/dev/evms/iscsivol0

cat /proc/net/iet/session
Code:
tid:1 name:ign.2009-11.home.biger:iscsivol1

The startup script is fairly straight forward, make sure the module loaded then use "start-stop-daemon" to execute ietd with options
Code:
/usr/libexec/ietd --uid=root --gid=root --port=3260
Logged

Good Luck Smiley

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #6 on: September 30, 2010, 11:15:41 PM »

The object is to find out what caused it to fail, so I'd hoped to see some commands before that.

Ah, sorry, think got your intention, now. Here's the full "dump". As I'm in a hurry I just had a brief look at it (of course there are a couple if checks e.g. n != y or equivalent, but I couldn't spot anything right away)


root@Share:~# sh -x /etc/init.d/iscsitarget start
+ PID_FILE=/var/run/iscsi_trgt.pid
+ CONFIG_FILE=/etc/ietd.conf
+ DAEMON=/usr/sbin/ietd
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ MEM_SIZE=1048576
+ . /lib/lsb/init-functions
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ . /etc/lsb-base-logging.sh
+ ISCSITARGET_ENABLE=false
+ ISCSITARGET_DEFAULTS_FILE=/etc/default/iscsitarget
+ [ -s /etc/default/iscsitarget ]
+ . /etc/default/iscsitarget
+ ISCSITARGET_ENABLE=true
+ RETVAL=0
+ [ true = true ]
+ ietd_start
+ log_daemon_msg Starting iSCSI enterprise target service
+ [ -z Starting iSCSI enterprise target service ]
+ log_use_usplash
+ [ n = y ]
+ type usplash_write
+ log_to_console log_daemon_msg Starting iSCSI enterprise target service
+ [ n != y ]
+ [ no != yes ]
+ readlink /proc/self/fd/0
+ stdin=/dev/pts/0
+ [ /dev/pts/0 != /dev/pts/0 ]
+ return 0
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xxterm !=  ]
+ [ xxterm != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput xenl
+ /usr/bin/tput cols
+ COLS=80
+ [ 80 ]
+ [ 80 -gt 6 ]
+ /usr/bin/expr 80 - 7
+ COL=73
+ printf  * Starting iSCSI enterprise target service
 * Starting iSCSI enterprise target service       + /usr/bin/expr 80 - 1
+ /usr/bin/tput hpa 79
                                                                               + printf
 + configure_memsize
+ [ -e /proc/sys/net/core/wmem_max ]
+ echo 1048576
+ [ -e /proc/sys/net/core/rmem_max ]
+ echo 1048576
+ [ -e /proc/sys/net/core/wmem_default ]
+ echo 1048576
+ [ -e /proc/sys/net/core/rmem_default ]
+ echo 1048576
+ [ -e /proc/sys/net/ipv4/tcp_mem ]
+ echo 1048576 1048576 1048576
+ [ -e /proc/sys/net/ipv4/tcp_rmem ]
+ echo 1048576 1048576 1048576
+ [ -e /proc/sys/net/ipv4/tcp_wmem ]
+ echo 1048576 1048576 1048576
+ modprobe -q crc32c
+ RETVAL=1
+ [ 1 != 0 ]
+ log_end_msg 1
+ [ -z 1 ]
+ log_use_usplash
+ [ n = y ]
+ type usplash_write
+ log_to_console log_end_msg 1
+ [ n != y ]
+ [ no != yes ]
+ readlink /proc/self/fd/0
+ stdin=/dev/pts/0
+ [ /dev/pts/0 != /dev/pts/0 ]
+ return 0
+ [ 73 ]
+ [ -x /usr/bin/tput ]
+ printf \r
+ /usr/bin/tput hpa 73
                                                                         + [ 1 -eq 0 ]
+ printf [
[+ /usr/bin/tput setaf 1
+ printf fail
fail+ /usr/bin/tput op

+ echo ]
]
+ return 1
+ exit 1
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #7 on: October 01, 2010, 07:11:46 AM »

thx pingtoo

Ah, I guess one step further thou I don't know, yet what this wants to tell me ;-)

root@Share:~# /usr/libexec/ietd --uid=root --gid=root --port=3260
-bash: /usr/libexec/ietd: No such file or directory
root@Share:~# which ietd
/usr/sbin/ietd
root@Share:~# /usr/sbin/ietd  --uid=root --gid=root --port=3260
netlink fd: Protocol not supported

hmm, are you're using cbxbiker61's kernels? BTW: I'm currently using his  2.6.35.7 #2 PREEMPT Wed Sep 29 16:46:15 MDT 2010 version
« Last Edit: October 01, 2010, 07:16:26 AM by odoll » Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #8 on: October 01, 2010, 07:18:26 AM »

As I stated in previous post I am on gentoo very different from your distro so I can not say for sure what is missing but in my post I have list several conditions you can check. so far you only tried one. Do you know if the iscsi_trgt module loaded or if it is build in?


Good luck Smiley
Logged

Good Luck Smiley

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #9 on: October 01, 2010, 07:31:54 AM »

in my post I have list several conditions you can check. so far you only tried one.
sure, however reading your other advises my (non existent) U*X knowledge told me that those additional ones would only work if at least the ietd would start (which it doesn't)?!?

Quote
Do you know if the iscsi_trgt module loaded or if it is build in?
how can I check this?

Quote
Good luck Smiley
thx :-)

PS:

root@Share:~# lsmod
Module                  Size  Used by
dm_crypt               11267  0
dm_mod                 55673  1 dm_crypt
ipv6                  233263  26
hmac                    2411  0
sha1_generic            1673  0
mv_cesa                 9178  0
root@Share:~# modprobe -l | grep isc
kernel/drivers/misc/eeprom/eeprom_93cx6.ko
kernel/drivers/usb/misc/emi26.ko
kernel/drivers/usb/misc/emi62.ko
kernel/drivers/usb/misc/sisusbvga/sisusbvga.ko
kernel/sound/usb/misc/snd-ua101.ko
« Last Edit: October 01, 2010, 07:39:20 AM by odoll » Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #10 on: October 01, 2010, 10:24:21 AM »

I think in /sys/module should have iscsi_trgt directory if it is build in or it is loaded.
Logged

Good Luck Smiley

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #11 on: October 01, 2010, 06:27:34 PM »

Ah, sorry, think got your intention, now. Here's the full "dump".
Good -as this seems to show the problem.
Quote
+ modprobe -q crc32c
+ RETVAL=1
modprobe has failed to find the crc32c kernel module.
Although it must be said that the /etc/init.d/iscsitarget file for Debian Squeeze doesn't check the return code from this - it's immediately followed by a "modprobe iscsi_trgt", and that is checked instead (presumably it will fail if it needs crc32c).  So you'll need to look at the file you have.
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #12 on: October 01, 2010, 11:07:44 PM »

As in http://plugcomputer.org/plugforum/index.php?topic=2333.msg13243#msg13243 cbxbiker61 added the iscsi_tgt support to 2.6.35.7, though it's there now the start fails still.
I followed up and asked for crc32c support please, too.
Logged

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #13 on: October 02, 2010, 04:33:15 AM »

hmm, in his reply http://plugcomputer.org/plugforum/index.php?topic=2333.msg13249#msg13249 cbxbiker61 said about crc32c: "That's built-in."

Though I seam to have iscsi_trgt now

root@Share:/lib/modules/2.6.35.7# lsmod
Module                  Size  Used by
dm_crypt               11267  0
dm_mod                 55673  1 dm_crypt
ipv6                  233263  26
hmac                    2411  0
sha1_generic            1673  0
mv_cesa                 9178  0
root@Share:/lib/modules/2.6.35.7# modprobe -l | grep isc 
kernel/drivers/misc/eeprom/eeprom_93cx6.ko
kernel/drivers/scsi/scsi_transport_iscsi.ko
kernel/drivers/scsi/libiscsi.ko
kernel/drivers/scsi/libiscsi_tcp.ko
kernel/drivers/scsi/iscsi_tcp.ko
kernel/drivers/scsi/iscsitarget/iscsi_trgt.ko
kernel/drivers/usb/misc/emi26.ko
kernel/drivers/usb/misc/emi62.ko
kernel/drivers/usb/misc/sisusbvga/sisusbvga.ko
kernel/sound/usb/misc/snd-ua101.ko

I can't find a hint about crc32c

root@Share:/lib/modules/2.6.35.7# modprobe -l | grep crc
kernel/lib/crc-itu-t.ko

Thus because it's build in?

Another FYI, after installing the new kernel I once again ran "sh -x /etc/init.d/iscsitarget start".

However when I spot for any changes the output is still the same as in http://plugcomputer.org/plugforum/index.php?topic=2329.msg13222#msg13222

root@Share:~# diff s1 s2 ! s1 is a copy of the above post's output while s2 is copy of an up2date "sh -x /etc/init.d/iscsitarget start" amended with the "tracking string" you see below
96a97
> !Is this only difference?
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #14 on: October 02, 2010, 09:25:39 AM »

I suspect the kernel setting is not compatible with your distro setting, thus no crc32c modules. try load the iscsi_trgt module then start ietd manually see what happen.

on my machine the startup script does not require crc32c module.

Logged

Good Luck Smiley

Pages: [1] 2
Print
Jump to: