Tinker Board Forum

Full Version: Debian - open-iscsi error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all,
New time Tinkerboard user, long time pi user.  Trying to move away from a pi2 to a Tinkerboard as an NFS host with an iscsi attached LUN, but when I install open-iscsi I get the following:

Code:
Setting up open-iscsi (2.0.874-3~deb9u1) ...
insserv: warning: script 'K01uart_init.sh' missing LSB tags and overrides
insserv: warning: script 'link_monitor.sh' missing LSB tags and overrides
insserv: warning: script 'uart_init.sh' missing LSB tags and overrides
insserv: warning: script 'K01uart_init.sh' missing LSB tags and overrides
insserv: warning: script 'link_monitor.sh' missing LSB tags and overrides
insserv: warning: script 'uart_init.sh' missing LSB tags and overrides
Job for iscsid.service failed because of unavailable resources or another system error.
See "systemctl status iscsid.service" and "journalctl -xe" for details.
invoke-rc.d: initscript iscsid, action "restart" failed.
● iscsid.service - iSCSI initiator daemon (iscsid)
  Loaded: loaded (/lib/systemd/system/iscsid.service; enabled; vendor preset: enabled)
  Active: failed (Result: resources) since Sat 2018-10-13 10:12:32 UTC; 20ms ago
    Docs: man:iscsid(8)
 Process: 2240 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS)
 Process: 2234 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS)

Oct 13 10:12:32 tinkerboard iscsid[2240]: iSCSI logger with pid=2242 started!
Oct 13 10:12:32 tinkerboard systemd[1]: iscsid.service: Daemon never wrote its PID file. Failing.
Oct 13 10:12:32 tinkerboard systemd[1]: Failed to start iSCSI initiator daemon (iscsid).
Oct 13 10:12:32 tinkerboard systemd[1]: iscsid.service: Failed with result 'resources'.
dpkg: error processing package open-iscsi (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for initramfs-tools (0.130) ...
Errors were encountered while processing:
open-iscsi
E: Sub-process /usr/bin/dpkg returned an error code (1)


Any assistance would be greatly appreciated.

Thanks in advance.

Just as a follow up...

I have tried to amend my sources.list to only point to: deb  h t t p://ftp.de.debian.org/debian jessie main (no clickable links)

However when I re-install open-iscsi and run " sudo iscsiadm -m discovery -t st -p <target>" I get:

Code:
iscsiadm: can not connect to iSCSI daemon (111)!
iscsiadm: Could not scan /sys/class/iscsi_transport.
iscsiadm: Could not scan /sys/class/iscsi_transport.
iscsiadm: Could not scan /sys/class/iscsi_transport.
iscsiadm: iSCSI driver tcp is not loaded. Load the module then retry the command.

iscsiadm: Could not perform SendTargets discovery: iSCSI driver not found. Please make sure it is loaded, and retry the operation
So, thinking that it'd be an idea to get the latest version (2.0.876) and compile myself, I now get the following errors when running "sudo make":

Code:
make -C libopeniscsiusr
make[1]: Entering directory '/home/linaro/Downloads/open-iscsi/libopeniscsiusr'
cc -O2 -g -Wall -Werror -Wextra -fvisibility=hidden -fPIC -I../libopeniscsiusr -g   -L../libopeniscsiusr -lopeniscsiusr  tests/test_context.c libopeniscsiusr.so.0.2.0   -o tests/test_context
../libopeniscsiusr/libopeniscsiusr.so: undefined reference to `kmod_module_probe_insert_module'
../libopeniscsiusr/libopeniscsiusr.so: undefined reference to `kmod_module_unref'
../libopeniscsiusr/libopeniscsiusr.so: undefined reference to `kmod_new'
../libopeniscsiusr/libopeniscsiusr.so: undefined reference to `kmod_unref'
../libopeniscsiusr/libopeniscsiusr.so: undefined reference to `kmod_load_resources'
../libopeniscsiusr/libopeniscsiusr.so: undefined reference to `kmod_module_new_from_name'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'tests/test_context' failed
make[1]: *** [tests/test_context] Error 1
make[1]: Leaving directory '/home/linaro/Downloads/open-iscsi/libopeniscsiusr'
Makefile:49: recipe for target 'user' failed
make: *** [user] Error 2

Will persist and keep trying Smile

Have also tried v2.0.873 from the raspbian repo with the same results.
Base on this https://github.com/open-iscsi/open-iscsi
It shows it would need "iscsi_tcp.ko, libiscsi_tcp.ko, libiscsi.ko and scsi_transport_iscsi.ko" those kind of kernel module driver.

And after digging, may enable below kernel config.
Code:
CONFIG_INET=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_ISCSI_TCP=m
CONFIG_SCSI_ISCSI_ATTRS=m

Then check from TinkerOS, it not include "CONFIG_ISCSI_TCP" & "CONFIG_SCSI_ISCSI_ATTRS".
So you can try to compile your own kernel & test it again.

-- compile at Tinker (v2.0.7)--
base: https://tinkerboarding.co.uk/wiki/index....are#Kernel (for x86 PC)

Install the related packages:
Code:
sudo apt-get update
sudo apt-get install git-core gitk git-gui device-tree-compiler mtools parted libssl-dev

Get source code (1.3~G):
Code:
git clone https://github.com/TinkerBoard/debian_kernel.git -b 2.0.7 --depth 1
cd debian_kernel

Modify Kernel config:
Adding following two lines in "/arch/arm/configs/miniarm-rk3288_defconfig"'s last line.
Code:
CONFIG_ISCSI_TCP=m
CONFIG_SCSI_ISCSI_ATTRS=m

Building Kernel image & modules:
Code:
make ARCH=arm miniarm-rk3288_defconfig -j4
make ARCH=arm zImage -j4
make ARCH=arm modules -j4 CFLAGS_MODULE=-Wno-misleading-indentation

Install Kernel image & modules:
Code:
sudo cp arch/arm/boot/zImage /boot
sudo make ARCH=arm modules_install

Reboot, then try again open-iscsi.
Holy cow, thank you so much for the assistance. I'm on the road at the moment but will try this asap.

Thanks again!
Attempted the proposed fix and got the following whilst installing open-iscsi

Code:
Created symlink /etc/systemd/system/sysinit.target.wants/open-iscsi.service → /lib/systemd/system/open-iscsi.service.
insserv: warning: script 'K01uart_init.sh' missing LSB tags and overrides
insserv: warning: script 'link_monitor.sh' missing LSB tags and overrides
insserv: warning: script 'uart_init.sh' missing LSB tags and overrides
insserv: warning: script 'K01uart_init.sh' missing LSB tags and overrides
insserv: warning: script 'link_monitor.sh' missing LSB tags and overrides
insserv: warning: script 'uart_init.sh' missing LSB tags and overrides
Job for iscsid.service failed because of unavailable resources or another system error.
See "systemctl status iscsid.service" and "journalctl -xe" for details.
invoke-rc.d: initscript iscsid, action "start" failed.
● iscsid.service - iSCSI initiator daemon (iscsid)
  Loaded: loaded (/lib/systemd/system/iscsid.service; enabled; vendor preset: enabled)
  Active: failed (Result: resources) since Mon 2018-10-15 16:09:57 UTC; 26ms ago
    Docs: man:iscsid(8)
 Process: 2116 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS)
 Process: 2094 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS)

Oct 15 16:09:57 tinkerboard iscsid[2116]: iSCSI logger with pid=2118 started!
Oct 15 16:09:57 tinkerboard iscsid[2118]: iSCSI daemon with pid=2120 started!
Oct 15 16:09:57 tinkerboard iscsid[2118]: can not create NETLINK_ISCSI socket
Oct 15 16:09:57 tinkerboard systemd[1]: iscsid.service: Daemon never wrote i…ng.
Oct 15 16:09:57 tinkerboard systemd[1]: Failed to start iSCSI initiator daem…d).
Oct 15 16:09:57 tinkerboard systemd[1]: iscsid.service: Failed with result '…s'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package open-iscsi (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (232-25+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for initramfs-tools (0.130) ...
Errors were encountered while processing:
open-iscsi
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any further assistance would be greatly appreciated.
my bad...
It seems need to compile new kernel too...

Building Kernel image & modules:
Code:
make ARCH=arm miniarm-rk3288_defconfig -j4
make ARCH=arm zImage -j4
make ARCH=arm modules -j4 CFLAGS_MODULE=-Wno-misleading-indentation
(It may take some times)

install Kernel image & modules:
Code:
sudo cp arch/arm/boot/zImage /boot
sudo make ARCH=arm modules_install

reboot & try again

open-iscsi.service:
Code:
linaro@tinkerboard:~$ sudo systemctl status open-iscsi.service
● open-iscsi.service - Login to default iSCSI targets
   Loaded: loaded (/lib/systemd/system/open-iscsi.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2018-10-16 01:07:25 CST; 5min ago
     Docs: man:iscsiadm(8)
           man:iscsid(8)
Main PID: 623 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/open-iscsi.service

Oct 16 01:07:25 tinkerboard iscsiadm[616]: iscsiadm: No records found
Thank you for the continued support. Before performing this, do I need to remove the open-iscsi packages to then re-install them after the kernel rebuild?
I'm not sure...since actually I don't know how to use open-iscsi...but should be no problem.

If have any concern or strange? remove it and re-install again...is very easy. haha
(10-16-2018, 08:37 AM)Craz_tyle Wrote: [ -> ]I'm not sure...since actually I don't know how to use open-iscsi...but should be no problem.

If have any concern or strange? remove it and re-install again...is very easy. haha

Thank you Smile i've been using open-iscsi on the pi2 for a few years and it's generally been rock-solid with good performance.  As it's the only protocol that my NAS supports I'm kinda stuck with how I present LUNs to my fileserver (NFS host).

Will persevere and let you know how I get on!
It's worked! Fantastic, thank you very much Smile

Next query: If I ever need to do a kernel update/upgrade, do I need to perform that manually like you've shown me?
Pages: 1 2