Iscsi target not functioning on 3.0.86, module does not build

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Iscsi target not functioning on 3.0.86, module does not build

      Probably related to:
      bugs.launchpad.net/ubuntu/+source/iscsitarget/+bug/1668808

      Starting iscsi target on 3.0.86 amd64, gui says:

      Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; systemctl start iscsitarget 2>&1' with exit code '1': Job for iscsitarget.service failed. See 'systemctl status iscsitarget.service' and 'journalctl -xn' for details.

      systemd says:
      Aug 02 22:19:53 openmediavault iscsitarget[18932]: Starting iSCSI enterprise target service:modprobe: FATAL: Module iscsi_trgt not found.
      Aug 02 22:19:53 openmediavault iscsitarget[18932]: failed!
      Aug 02 22:19:53 openmediavault systemd[1]: iscsitarget.service: control process exited, code=exited status=1
      Aug 02 22:19:53 openmediavault systemd[1]: Failed to start LSB: Starts and stops the iSCSI software target.

      Trying to reinstall module says:
      root@openmediavault:~# apt install --reinstall iscsitarget-dkms
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
      Need to get 0 B/70.2 kB of archives.
      After this operation, 0 B of additional disk space will be used.
      (Reading database ... 55374 files and directories currently installed.)
      Preparing to unpack .../iscsitarget-dkms_1.4.20.3+svn502-1_all.deb ...

      ------------------------------
      Deleting module version: 1.4.20.3+svn502
      completely from the DKMS tree.
      ------------------------------
      Done.
      Unpacking iscsitarget-dkms (1.4.20.3+svn502-1) over (1.4.20.3+svn502-1) ...
      Setting up iscsitarget-dkms (1.4.20.3+svn502-1) ...

      Creating symlink /var/lib/dkms/iscsitarget/1.4.20.3+svn502/source ->
      /usr/src/iscsitarget-1.4.20.3+svn502

      DKMS: add completed.

      Kernel preparation unnecessary for this kernel. Skipping...

      Building module:
      cleaning build area....
      make KERNELRELEASE=4.9.0-0.bpo.3-amd64 -C /lib/modules/4.9.0-0.bpo.3-amd64/build M=/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build....(bad exit status: 2)
      Error! Bad return status for module build on kernel: 4.9.0-0.bpo.3-amd64 (x86_64)
      Consult /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/make.log for more information.


      build log says:
      cat /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/make.log
      DKMS make.log for iscsitarget-1.4.20.3+svn502 for kernel 4.9.0-0.bpo.3-amd64 (x86_64)
      Wed Aug 2 22:12:10 WEST 2017
      make: Entering directory '/usr/src/linux-headers-4.9.0-0.bpo.3-amd64'
      LD /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/built-in.o
      LD /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/built-in.o
      CC [M] /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.o
      In file included from /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.c:7:0:
      /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/iscsi.h:274:19: error: field 'rx_hash' has incomplete type
      struct hash_desc rx_hash;
      ^
      /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/iscsi.h:275:19: error: field 'tx_hash' has incomplete type
      struct hash_desc tx_hash;
      ^
      /usr/src/linux-headers-4.9.0-0.bpo.3-common/scripts/Makefile.build:298: recipe for target '/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.o' failed
      make[4]: *** [/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.o] Error 1
      /usr/src/linux-headers-4.9.0-0.bpo.3-common/scripts/Makefile.build:549: recipe for target '/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel' failed
      make[3]: *** [/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel] Error 2
      /usr/src/linux-headers-4.9.0-0.bpo.3-common/Makefile:1507: recipe for target '_module_/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build' failed
      make[2]: *** [_module_/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build] Error 2
      Makefile:150: recipe for target 'sub-make' failed
      make[1]: *** [sub-make] Error 2
      Makefile:8: recipe for target 'all' failed
      make: *** [all] Error 2
      make: Leaving directory '/usr/src/linux-headers-4.9.0-0.bpo.3-amd64'