Unable to enable iSCSI

    • OMV 1.0
    • Resolved
    • Yes the source provides an init script, too:

      Shell-Script

      1. #!/bin/sh
      2. #
      3. # chkconfig: - 39 35
      4. # description: Starts and stops the iSCSI target
      5. # debianized start-stop script
      6. PATH=/sbin:/bin:/usr/sbin:/usr/bin
      7. DAEMON=/usr/sbin/ietd
      8. OPTIONS=""
      9. PIDFILE=/var/run/ietd.pid
      10. if [ -f /lib/init/vars.sh ]; then
      11. <------>. /lib/init/vars.sh
      12. fi
      13. if [ -f /lib/lsb/init-functions ]; then
      14. <------>. /lib/lsb/init-functions
      15. fi
      16. if [ -f /etc/sysconfig/iscsi-target ]; then
      17. <------>. /etc/sysconfig/iscsi-target
      18. fi
      19. RETVAL=0
      20. ietd_start()
      21. {
      22. <------>log_daemon_msg "Starting iSCSI Target" "ietd"
      23. <------>modprobe -q crc32c
      24. <------>modprobe iscsi_trgt
      25. <------>start-stop-daemon --start --exec $DAEMON --pidfile $PIDFILE -- $OPTIONS
      26. <------>log_end_msg $?
      27. }
      28. ietd_stop()
      29. {
      30. <------>log_daemon_msg "Stopping iSCSI Target" "ietd"
      31. <------>ietadm --op delete
      32. <------>start-stop-daemon --stop --exec $DAEMON --pidfile $PIDFILE
      33. <------>rm -f $PIDFILE
      34. <------>log_end_msg $?
      35. }
      36. ietd_status()
      37. {
      38. <------>PID=`pidof ietd`
      39. <------>if [ $PID ]; then
      40. <------><------>echo "iSCSI Target (pid $PID) is running..."
      41. <------>else
      42. <------><------>echo "iSCSI Target is stopped."
      43. <------><------>exit 1
      44. <------>fi
      45. }
      46. case "$1" in
      47. start)
      48. ietd_start
      49. ;;
      50. stop)
      51. ietd_stop
      52. ;;
      53. restart)
      54. ietd_stop
      55. sleep 1
      56. ietd_start
      57. ;;
      58. status)
      59. ietd_status
      60. ;;
      61. *)
      62. echo $"Usage: $0 {start|stop|restart|status}"
      63. exit 1
      64. esac
      65. exit 0
      Display All


      This is a copy from /etc/init.d and has the same content as the one from the sources. So the make process detects that a Debian is running, there are other versions of this init script for generic, Gentoo and Redhat linux.
      Homebox: Bitfenix Prodigy Case, ASUS E45M1-I DELUXE ITX, 8GB RAM, 5x 4TB HGST Raid-5 Data, 1x 320GB 2,5" WD Bootdrive via eSATA from the backside
      Companybox 1: Standard Midi-Tower, Intel S3420 MoBo, Xeon 3450 CPU, 16GB RAM, 5x 2TB Seagate Data, 1x 80GB Samsung Bootdrive - testing for iSCSI to ESXi-Hosts
      Companybox 2: 19" Rackservercase 4HE, Intel S975XBX2 MoBo, C2D@2200MHz, 8GB RAM, HP P212 Raidcontroller, 4x 1TB WD Raid-0 Data, 80GB Samsung Bootdrive, Intel 1000Pro DualPort (Bonded in a VLAN) - Temp-NFS-storage for ESXi-Hosts
    • chkconfig is not recognized by debian i believe. In this cases what i do personally is compile package from the debian Sid/Jessie (If i pick the deb straight i'll complain about many dependencies)

      ftp.de.debian.org/debian/pool/…get_1.4.20.3+svn502-1.dsc

      There you get the git and all the patches and init script probably.

      The basic start is git clone, then usually

      git checkout upstream
      git checkout pristine-tar
      git checkout master
      git-buildpackage -uc -us

      After that you should have a nice deb package even with version at the end
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • Yes that seems to true. Although the provided init script looks ok it is not possible to start or stop the service. Basically that does not matter that much, because no one would IMHO restart the iscsitarget service on a running machine with connected targets. That would cut the connection and may lead to many problems in case of running VM's on such a target.

      I will try the git thing tomorrow, for today I got enough of tinkering with iscsi. ;)
      Homebox: Bitfenix Prodigy Case, ASUS E45M1-I DELUXE ITX, 8GB RAM, 5x 4TB HGST Raid-5 Data, 1x 320GB 2,5" WD Bootdrive via eSATA from the backside
      Companybox 1: Standard Midi-Tower, Intel S3420 MoBo, Xeon 3450 CPU, 16GB RAM, 5x 2TB Seagate Data, 1x 80GB Samsung Bootdrive - testing for iSCSI to ESXi-Hosts
      Companybox 2: 19" Rackservercase 4HE, Intel S975XBX2 MoBo, C2D@2200MHz, 8GB RAM, HP P212 Raidcontroller, 4x 1TB WD Raid-0 Data, 80GB Samsung Bootdrive, Intel 1000Pro DualPort (Bonded in a VLAN) - Temp-NFS-storage for ESXi-Hosts

      The post was edited 1 time, last by datadigger ().

    • datadigger wrote:

      I will try the git thing tomorrow, for today I got enough of tinkering with iscsi. ;)

      Tried the git thing, but today I didn't have much time. Got git working and it spits out a good looking deb which I can install with dpkg but during reboot the console says that iscsi_trgt is missing. Grmpf.
      Ok, next try on monday.
      Homebox: Bitfenix Prodigy Case, ASUS E45M1-I DELUXE ITX, 8GB RAM, 5x 4TB HGST Raid-5 Data, 1x 320GB 2,5" WD Bootdrive via eSATA from the backside
      Companybox 1: Standard Midi-Tower, Intel S3420 MoBo, Xeon 3450 CPU, 16GB RAM, 5x 2TB Seagate Data, 1x 80GB Samsung Bootdrive - testing for iSCSI to ESXi-Hosts
      Companybox 2: 19" Rackservercase 4HE, Intel S975XBX2 MoBo, C2D@2200MHz, 8GB RAM, HP P212 Raidcontroller, 4x 1TB WD Raid-0 Data, 80GB Samsung Bootdrive, Intel 1000Pro DualPort (Bonded in a VLAN) - Temp-NFS-storage for ESXi-Hosts
    • Hi All,

      I had the same issue and did the solution that was recommended by rye, but I'm still getting the same error.

      Error #4000:
      exception 'OMVException' with message 'Failed to execute command 'export LANG=C; invoke-rc.d 'iscsitarget' start 2>&1': Starting iSCSI enterprise target service:FATAL: Module iscsi_trgt not found.
      failed!
      invoke-rc.d: initscript iscsitarget, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      Stack trace:
      #0 /usr/share/php/openmediavault/initscript.inc(141): OMVSysVInitScript->invoke('start')
      #1 /usr/share/php/openmediavault/initscript.inc(61): OMVSysVInitScript->start()
      #2 /usr/share/openmediavault/engined/module/iscsitarget.inc(91): OMVSysVInitScript->exec()
      #3 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleIscsiTarget->startService()
      #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #6 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      #7 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      #9 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      #10 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      #12 {main}

      Just wondering of where should i go next. cheers
    • Sucessful build of iscsitarget for kernel 3.16

      subzero79 wrote:

      That's the kernel module, did you rebuild them successfully?, what kernel 3.2 or 3.16?


      Using OMV2[Kernel 3.2.0-4] iscsi plugin to export space to a test ESXi 5.1.U3 node and suddenly all the system stalls ?(
      /var/log/syslog @OMV [as usual]
      -----------------------------
      iscsi_trgt: BUG at /var/lib/dkms/iscsitarget/1.4.20.2/build/kernel/iscsi.c:392 assert(req->tio)
      Jul 27 16:30:18 nas200 kernel: [266862.642574] Pid: 2308, comm: istiod1 Tainted: G O 3.2.0-4-amd64 #1 Debian 3.2.68-1+deb7u2
      Jul 27 16:30:18 nas200 kernel: [266862.642577] Call Trace:
      Jul 27 16:30:18 nas200 kernel: [266862.642590] [<ffffffffa05913f1>] ? send_data_rsp+0x45/0x1f4 [iscsi_trgt]
      Jul 27 16:30:18 nas200 kernel: [266862.642595] [<ffffffffa059a0df>] ? ua_pending+0x19/0xa5 [iscsi_trgt]
      Jul 27 16:30:18 nas200 kernel: [266862.642601] [<ffffffffa0598db4>] ? disk_execute_cmnd+0x1cf/0x22d [iscsi_trgt]
      Jul 27 16:30:18 nas200 kernel: [266862.642606] [<ffffffffa0594a3d>] ? worker_thread+0xfd/0x255 [iscsi_trgt]
      Jul 27 16:30:18 nas200 kernel: [266862.642612] [<ffffffff8103f72d>] ? try_to_wake_up+0x197/0x197
      Jul 27 16:30:18 nas200 kernel: [266862.642617] [<ffffffffa0594940>] ? nthread_stop+0x35/0x35 [iscsi_trgt]
      Jul 27 16:30:18 nas200 kernel: [266862.642632] [<ffffffff8105f805>] ? kthread+0x76/0x7e
      Jul 27 16:30:18 nas200 kernel: [266862.642637] [<ffffffff813582f4>] ? kernel_thread_helper+0x4/0x10
      Jul 27 16:30:18 nas200 kernel: [266862.642640] [<ffffffff8105f78f>] ? kthread_worker_fn+0x139/0x139
      Jul 27 16:30:18 nas200 kernel: [266862.642643] [<ffffffff813582f0>] ? gs_change+0x13/0x13
      --------------------------------------------------------------------------------------------------------------------------------------------------------
      Here is a brief log of the build steps:
      1. Uninstall iscsitarget:
      apt-get purge iscsitarget
      apt-get autoremove

      2. Add wheezy-backports to sources.list
      apt-get -t wheezy-backports install linux-headers-3.16.0-0.bpo.4-all linux-image-3.16.0-0.bpo.4-amd64
      Reboot to new kernel

      3. Install git to rebuild latest iscsitarget
      apt-get install git equivs devscripts git-buildpackage
      git clone 'http://anonscm.debian.org/cgit/pkg-iscsi/iscsitarget.git' iscsitarget
      cd iscsitarget --> [download dir]
      git checkout upstream
      git checkout pristine-tar
      git checkout master
      git-buildpackage -uc -us --> [Build the binaries. Unmet dependencies: dkms, libssl-dev Need to be installed]
      4. Install new builds:
      dpkg -i iscsitarget_1.4.20.3+svn502-2_amd64.deb iscsitarget-dkms_1.4.20.3+svn502-2_all.deb

      5. apt-get install openmediavault-iscsitarget

      and the BUG is history...

      Many thanks to subzero79 for this great git machinery :thumbup:
    • iscsi target on wheezy-backports kernel 3.16.0-0.bpo.4-amd64

      It does not exactly match the main topic, but this thread is what mr. google found, so i'm posting it here.

      The whole story started when i wanted to use more recent btrfs that comes in newer kernel. I managed to get ietd running (im running windows-8 over iscsi right now):

      OMV version: 2.1.8 (stone burner)

      # uname -a
      Linux gray 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3~bpo70+1 (2015-08-08) x86_64 GNU/Linux
      # modinfo iscsi_trgt
      filename: /lib/modules/3.16.0-0.bpo.4-amd64/kernel/drivers/iscsi/iscsi_trgt.ko
      author: IET development team <iscsitarget-devel@lists.sourceforge.net>
      description: iSCSI Enterprise Target
      license: GPL
      version: trunk
      srcversion: F11E94DC1A2590A4523B6BF
      depends:
      vermagic: 3.16.0-0.bpo.4-amd64 SMP mod_unload modversions
      parm: worker_thread_pool_size:Size of the worker thread pool (0 = dedicated threads per target (default)) (ulong)
      parm: debug_enable_flags:debug bitmask, low bits (0 ... 8) used, see iscsi_dbg.h (ulong)


      Before i forget what i did...
      The kernel was installed from wheezy-backports.
      To get the kernel module working i manually downloaded the package from jessie repository (there seems not be any significant changes)
      # wget http.us.debian.org/debian/pool…1.4.20.3+svn502-1_all.deb
      and installed
      # dpkg --install iscsitarget-dkms_1.4.20.3+svn502-1_all.deb

      Later on, ietd was not happy because there was a kernel module mismatch, so i downloaded the sources (from jessie) of the iscsitarget package
      # wget http.debian.net/debian/pool/ma…get_1.4.20.3+svn502-1.dsc
      # wget http.debian.net/debian/pool/ma…4.20.3+svn502.orig.tar.gz
      # wget http.debian.net/debian/pool/ma….3+svn502-1.debian.tar.xz
      unpacked them and invoked
      # dpkg-buildpackage -uc -b
      this generated the .deb packages and from them i extracted ietd binary and edited in /etc/init.d/iscsitarget so that is uses this new ietd binary.


      Since i'm using openmediavault @home it's good for me, for now... but i'm sure there is a more 'correct' way of doing it.
    • You didn't need to build the package. I already did that and put it in the omv-extras backports repo here. This repo is enabled when you use omv-extras to install the backports kernel. So, this newer package is automatically pulled when install the iscsi plugin.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Oh, thanx a lot! Looks i missed that post.

      I have installed the backports kernel thru the gui and then forcefully re-installed those 2 packages you mentioned via apt-get (which correctly fetched from the extras repository you mentioned). I just needed to be sure that iscsitrgt is still enabled (ISCSITARGET_ENABLE=true in /etc/default/iscsitarget). I can't confirm if it works because i did it remotely, but i'm quite sure it does [IMG:http://forums.openmediavault.org/wcf/images/smilies/biggrin.png]

      The post was edited 1 time, last by Pinky ().