iSCSI install failed

Hi everyone,

I tried to install iSCSI with the command apt-get install open-iscsi, but it failed loading the iscsi daemon.

I have modified /etc/initiatorname.iscsi with the target IQN and did not change the iscsid.conf as I did not set any authentication on the target but no luck.
I tried with Windows and it works well so the issue is definitely not in the Target side
Anyone has succeeded in getting that working?

Log 1 - #journalctl -xe:
Sep 10 14:04:54 rockpie systemd[1]: open-iscsi.service:
Control process exited, code=exited, status=3/NOTIMPLEMENTED
– Subject: Unit process exited
– Defined-By: systemd
– Support: https://www.debian.org/support

– An ExecStartPre= process belonging to unit open-iscsi.service has exited.

– The process’ exit code is ‘exited’ and its exit status is 3.
Sep 10 14:04:54 rockpie systemd[1]: open-iscsi.service:
Failed with result ‘exit-code’.
– Subject: Unit failed
– Defined-By: systemd
– Support: https://www.debian.org/support

– The unit open-iscsi.service has entered the ‘failed’ state with result 'exit-
code’.
Sep 10 14:04:54 rockpie systemd[1]: Failed to start Logi
n to default iSCSI targets.
– Subject: A start job for unit open-iscsi.service has failed
– Defined-By: systemd
– Support: https://www.debian.org/support

– A start job for unit open-iscsi.service has finished with a failure.

– The job identifier is 874 and the job result is failed.

Log 2 - #systemctl status open-iscsi.service
● open-iscsi.service - Login to default iSCSI targets

  • Loaded: loaded (/lib/systemd/system/open-iscsi.service; enabled; vendor prese*
    t: enabled)
  • Active: failed (Result: exit-code) since Fri 2021-09-10 14:12:35 C*
    EST; 8min ago
  • Docs: man:iscsiadm(8)*
    
  •       man:iscsid(8)*
    
  • Process: 5544 ExecStartPre=/bin/systemctl --quiet is-active iscsid.service*
    (code=exited, status=3)

Sep 10 14:12:35 rockpie systemd[1]: Starting Login to default iSCSI targets…
Sep 10 14:12:35 rockpie systemd[1]: open-iscsi.service:
Control process exited, code=exited, status=3/NOTIMPLEMENTED
Sep 10 14:12:35 rockpie systemd[1]: open-iscsi.service:
Failed with result ‘exit-code’.
Sep 10 14:12:35 rockpie systemd[1]: Failed to start Logi
n to default iSCSI targets.

Thank you,

Hi all,

I flashed the latest Armbian version and the installation of open-iscsi worked like a charm, however the kernel is not stable and the OTG does not work. There is definitely something wrong with the debian version.

Does someoen know what to do?

Thank you,
Armandooooo

Hi. We are forcing on this issue now.

Hi Stephen,

Were you able to find a solution to get the iSCSI working properly?
It seems like we should be loading “modprobe iscsi_tcp” but it failed because the iscsi_tcp.ko is not loaded in the kernel.

Thank you,
Armandooooo

@Armandooooo

Sorry for the late reply.
Can you upgrade kernel to 4.4.194-20 and test again?

Modify file /etc/apt/sources.list.d/apt-radxa-com.list like this:

Buster

deb http://apt.radxa.com/buster-stable/ buster main
deb http://apt.radxa.com/buster-testing/ buster main

Focal

deb http://apt.radxa.com/focal-stable/ focal main
deb http://apt.radxa.com/focal-testing/ focal main

And install needed packages.

sudo apt update
sudo apt install -y linux-4.4-rock-pi-e-latest
sudo reboot

Reboot ROCK Pi E and execute command modprobe iscsi_tcp to load iscsi_tcp module.

Hi Stephen,

I was able to load the iscsi_tcp module and initiate connection with the iscsi lun. However the connection seems not stable, I have a lot of ping time out that are dropped in the console. Do you know what can cause this? It cannot be by home network:

rock@rockpie:~$ sudo iscsiadm --mode node --targetname iqn.2004-04.com.qnap:ts-4 53pro:iscsi.nsw.ef0d6e --portal 192.168.0.10:3260 --login
Logging in to [iface: default, target: iqn.2004-04.com.qnap:ts-453pro:iscsi.nsw. ef0d6e, portal: 192.168.0.10,3260] (multiple)
[ 706.424421] scsi host0: iSCSI Initiator over TCP/IP
[ 706.467291] scsi 0:0:0:0: Direct-Access QNAP iSCSI Storage 4.0 PQ : 0 ANSI: 5
Login to [iface: default, target: iqn.2004-04.com.qnap:ts-453pro:iscsi.nsw.ef0d6 e, portal: 192.168.0.10,3260] successful.
[ 706.492436] sd 0:0:0:0: [sda] 419430400 512-byte logical blocks: (215 GB/200 GiB)
[ 706.519906] sd 0:0:0:0: [sda] Write Protect is off
[ 706.529000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doe sn’t support DPO or FUA
rock@rockpie:~$ [ 706.648550] sda: sda1
[ 706.714028] sd 0:0:0:0: [sda] Attached SCSI disk
[ 772.703581] connection1:0: ping timeout of 5 secs expired, recv timeout 5, l ast rx 4295429957, last ping 4295434976, now 4295439984
[ 772.705432] connection1:0: detected conn error (1022)
[ 823.562615] connection1:0: ping timeout of 5 secs expired, recv timeout 5, l ast rx 4295480831, last ping 4295485831, now 4295490848
[ 823.564464] connection1:0: detected conn error (1022)
^C
rock@rockpie:~$ [ 888.778077] connection1:0: ping timeout of 5 secs expired, r ecv timeout 5, last rx 4295546051, last ping 4295551056, now 4295556064
[ 888.779703] connection1:0: detected conn error (1022)
[ 935.755282] connection1:0: ping timeout of 5 secs expired, recv timeout 5, l ast rx 4295593020, last ping 4295598021, now 4295603040
[ 935.757137] connection1:0: detected conn error (1022)
[ 1030.494015] connection1:0: ping timeout of 5 secs expired, recv timeout 5, l ast rx 4295687757, last ping 4295692768, now 4295697776
[ 1030.495858] connection1:0: detected conn error (1022)
[ 1044.526384] connection1:0: ping timeout of 5 secs expired, recv timeout 5, l ast rx 4295701791, last ping 4295706800, now 4295711808
[ 1044.528229] connection1:0: detected conn error (1022)

Thank you,
Armandooooo

Can you share how to config this two files:

/etc/iscsi/iscsid.conf 
/etc/iscsi/initiatorname.iscsi

and what is your target device ?

Hi,

I restarted from a fresh image. On my server side, the configuration is without authentication to start, I will set it once it is working properly:

I did not set anything particular for the iscsid.conf and initiatorname.iscsi.
After I run : #apt-get install open-iscsi
I did the following in sequence:
#iscsiadm -m discovery -t st -p 192.168.0.10
That returned my iscsi server:
192.168.0.10:3260,1 iqn.2004-04.com.qnap:ts-453pro:iscsi.nsw.ef0d6e
Then I run:
iscsiadm --mode node --targetname iqn.2004-04.com.qnap:ts-453pro:iscsi.nsw.ef0d6e --portal 192.168.0.10:3260 --login

At this stage, things seem to work… Except when I fire my first command:

root@rockpie:/home/rock# fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mmcblk0: 14.9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2AA36D55-27B0-4C83-90D0-8B69FD11BADE

Device Start End Sectors Size Type
/dev/mmcblk0p1 32768 1081343 1048576 512M EFI System
/dev/mmcblk0p2 1081344 31114335 30032992 14.3G Linux filesystem

[ 1099.047584] connection2:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4295756152, last ping 4295761168, now 4295766176
[ 1099.049428] connection2:0: detected conn error (1022)
Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors
Disk model: iSCSI Storage
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 2048 bytes / 2048 bytes
Disklabel type: dos
Disk identifier: 0x00034a3a

Device Boot Start End Sectors Size Id Type
/dev/sda1 40 419408954 419408915 200G 83 Linux

You see above connection errors… Do you know what can it be?

However I could connect it through modprobe:
modprobe g_mass_storage file=/piusb.bin stall=0 removable=1 ro=1

Thank you,
Armandooooo