Modify

Opened 5 years ago

Closed 23 months ago

#8798 closed enhancement (fixed)

iSCSI support

Reported by: openwrt@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: iscsi Cc:

Description

I see openwrt has NBD and AoE packages - would it be possible to get iSCSI packages too?

Attachments (4)

tgt.patch (8.1 KB) - added by m.storchak@… 4 years ago.
tgt iscsi target
istgt-20120811-Makefile.gz (804 bytes) - added by Alexander Ryzhov <ryzhov_al@…> 4 years ago.
istgt Makefile
tgt.2.patch (9.1 KB) - added by m.storchak@… 2 years ago.
tgt.3.patch (9.1 KB) - added by m.storchak@… 2 years ago.
Refined patch: added dependency on DIRECT_IO

Download all attachments as: .zip

Change History (22)

comment:1 Changed 5 years ago by undead

I need this feature too, is it possible?

comment:2 Changed 5 years ago by sniperpr@…

me too. :)

comment:3 Changed 5 years ago by undead

And what about this: http://linux-iscsi.net/wiki/Platforms#Linksys_OpenWRT_2 - may be it's simple to make port from Linksys?

comment:4 Changed 5 years ago by sniperpr@…

http://www.linuxce.cn/gpl/lhs-src-20090106-gpl.tar.gz

include iscsi packages. (Makefile, config)

comment:5 Changed 4 years ago by nbd

  • Resolution set to wontfix
  • Status changed from new to closed

Changed 4 years ago by m.storchak@…

tgt iscsi target

comment:6 Changed 4 years ago by m.storchak@…

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Here is a patch that adds stgt, iscsi userspace target (http://stgt.sf.net/). Tested with CentOS 6.0, Mac OS X (globalSAN 4.1) and Microsoft iSCSI Software Initiator Version 2.08.
It can expose raw devices and image files.
This package provides basic binaries, config file and init.d script.

comment:7 Changed 4 years ago by Alexander Ryzhov <ryzhov_al@…>

Here is another good iSCSI userspace implementation. Quite fast on my Asus RT-N66u:

  • read speed - 16MB/s,
  • write speed - 13MB/s,
  • max CPU load ~70%,
  • max RAM consuption ~15MB,

Makefile attached.

Changed 4 years ago by Alexander Ryzhov <ryzhov_al@…>

istgt Makefile

comment:8 Changed 4 years ago by anonymous

I tried "tgt.patch" and it works perfectly. I install and boot Windows 7 over iSCSI with it - no problems at all! Please add tgt.patch to the official packages, if possible!

comment:9 Changed 4 years ago by m.storchak@…

Thanks you very much for your feedback!
Could you please share you configuration? I'm especially interested in direct/indirect and image/device combination. Please see http://patchwork.openwrt.org/patch/2597/ for the reason I'm asking.

comment:10 Changed 4 years ago by anonymous

This is my /etc/config/tgt file:

config target 1
       option name 'iqn.2012-06.org.openwrt:win7' 
       option allow 192.168.1.0/24 

config lun 1_1
       option readonly 0 
       option device /tmp/hdd/win7.raw

/tmp/hdd is a mounted ext4 partition on an external USB harddrive, so no real raw device sorry!
The win7.raw file is 25 GB of size, if that helps.

I never really measured the speed but Windows 7 boots pretty slow. I think thats mostly because the PC boots over 100Mbps network (instead of gigabit, which is unavailable because of cables).

comment:11 follow-up: Changed 4 years ago by john.wyzer@…

I tried the tgt.patch mentioned above on a netgear WGT634U (brcm47xx) with openwrt 10.0.3.1.
If I start tgtd, it segfaults. I compiled with debugging symbols and tried to see where the problem is - without meaningful results, however.
Can anyone suggest where to look further?

root@OpenWrt:/tmp# gdb /usr/sbin/tgtd  


dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mipsel-openwrt-linux"...
(no debugging symbols found)
(gdb) run -f
Starting program: /usr/sbin/tgtd -f

Program received signal SIGSEGV, Segmentation fault.
0x2ab5ae90 in ?? ()
(gdb) bt
#0  0x2ab5ae90 in ?? ()
warning: GDB can't find the start of the function at 0x2ab5ae90.

    GDB is unable to find the start of the function at 0x2ab5ae90
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x2ab5ae90 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
#1  0x2ab5ae90 in ?? ()
warning: GDB can't find the start of the function at 0x2ab5ae8f.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

comment:12 in reply to: ↑ 11 Changed 4 years ago by anonymous

Replying to john.wyzer@…:

I tried the tgt.patch mentioned above on a netgear WGT634U (brcm47xx) with openwrt 10.0.3.1.

Sorry about that. I missed updating the libc and libpthread.

comment:13 Changed 4 years ago by anonymous

Please add "tgt.patch" to packages. Thank you!

comment:14 follow-up: Changed 2 years ago by anonymous

Hi, what about this? Is posible to obtain icsci support on 12.09 or trunk?

Changed 2 years ago by m.storchak@…

comment:15 Changed 2 years ago by m.storchak@…

Hi,
Here is a patch for trunk. It worked well enough on PaspberryPi in LXC container. Sorry for not testing on real HW. I'm going to submit it to openwrt-devel once I test it on my router.
The following combinations worked for me:
aio_nodirect_nosync (this backend storage ignores bsflags)
rdwr_direct_nosync
rdwr_direct_sync
rdwr_nodirect_nosync
rdwr_nodirect_sync
All modes were able to pass smoke test: write with dd, check md5sum, mkfs, mount, write a file, umount, detach from portal, stop tgtd, start, mount, check md5sum of the file, umount, fsck.

I'm extremely interested in feedback, please drop a line here if it works for you.

Note: now tgt enables direct io and async io and requires libaio, you may need to rebuild the world.

Changed 2 years ago by m.storchak@…

Refined patch: added dependency on DIRECT_IO

comment:16 in reply to: ↑ 14 Changed 2 years ago by m.storchak@…

Replying to anonymous:

Hi, what about this? Is posible to obtain icsci support on 12.09 or trunk?

Please try this http://patchwork.openwrt.org/patch/5125/

comment:17 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:18 Changed 23 months ago by jogo

  • Resolution set to fixed
  • Status changed from reopened to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.