Sample Header Ad - 728x90

iscsi target mount from NAS slow on Fedora 37 boot

1 vote
2 answers
471 views
I have a single iscsi target on Asustor NAS , but after adding it to fstab, F37 boot is 2 min slower, because the iscsi.service is reloaded twice during boot, and I don't know why.
$ sudo iscsiadm -m discovery -t st -p 192.168.0.90
192.168.0.90:3260,1 iqn.2011-08.com.asustor:as5304t-8d33b5.target001
172.17.0.1:3260,1 iqn.2011-08.com.asustor:as5304t-8d33b5.target001

$ sudo blkid
/dev/sdc1: UUID="a8ba2edc-5c7c-41b3-bc78-6b8229dedb7d" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="19732655-96b8-439c-9ff1-07928f2486ef"

$ sudo iscsiadm -m session -o show
tcp:  192.168.0.90:3260,1 iqn.2011-08.com.asustor:as5304t-8d33b5.target001 (non-flash)
The slowest service is
$ systemd-analyze blame
2min 1.740s iscsi.service

# the slowest line is 
$ echo "$(
Dec 27 00:35:51 t450s iscsiadm: iscsiadm: initiator reported error (8 - connection timed out)
Dec 27 00:35:51 t450s iscsiadm: iscsiadm: Could not log into all portals
Dec 27 00:35:51 t450s iscsiadm: Logging in to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target001, portal: 192>
Dec 27 00:35:51 t450s iscsiadm: Logging in to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target001, portal: 172>
Dec 27 00:35:51 t450s iscsiadm: Login to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target001, portal: 192.168.>
Dec 27 00:35:51 t450s systemd: Finished iscsi.service - Login and scanning of iSCSI devices.
Dec 27 00:35:51 t450s systemd: Reloading iscsi.service - Login and scanning of iSCSI devices...
Dec 27 00:37:54 t450s iscsiadm: iscsiadm: Could not login to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target0>
Dec 27 00:37:54 t450s iscsiadm: iscsiadm: initiator reported error (8 - connection timed out)
Dec 27 00:37:54 t450s iscsiadm: iscsiadm: Could not log into all portals
Dec 27 00:37:54 t450s iscsiadm: Logging in to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target001, portal: 172>
Dec 27 00:37:54 t450s systemd: Reloaded iscsi.service - Login and scanning of iSCSI devices.
I can see from above log that
Dec 27 00:35:51 t450s systemd: Finished iscsi.service - Login and scanning of iSCSI devices.
Dec 27 00:35:51 t450s systemd: Reloading iscsi.service - Login and scanning of iSCSI devices...
it finishes loading the service, then it started reloading the service, and then it took 2min to finish loading it. not sure why it wants to reload again. After booting the mount works fine, it is just that the boot time is slow, if I comment out the line fstab, the boot is fast again, but I want it to be auto mounted on boot. If I manually restart the service, it also takes 2 min
$ sudo systemctl restart iscsi.service

$ sudo journalctl -u iscsi
Dec 27 12:23:07 t450s systemd: iscsi.service: Deactivated successfully.
Dec 27 12:23:07 t450s systemd: Stopped iscsi.service - Login and scanning of iSCSI devices.
Dec 27 12:23:07 t450s systemd: Stopping iscsi.service - Login and scanning of iSCSI devices...
Dec 27 12:23:07 t450s systemd: Starting iscsi.service - Login and scanning of iSCSI devices...
Dec 27 12:25:09 t450s iscsiadm: iscsiadm: Could not login to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target>
Dec 27 12:25:09 t450s iscsiadm: iscsiadm: initiator reported error (8 - connection timed out)
Dec 27 12:25:09 t450s iscsiadm: iscsiadm: Could not log into all portals
Dec 27 12:25:09 t450s iscsiadm: Logging in to [iface: default, target: iqn.2011-08.com.asustor:as5304t-8d33b5.target001, portal: 17>
Dec 27 12:25:09 t450s systemd: Finished iscsi.service - Login and scanning of iSCSI devices.
There might be an answer here but I can not see the hidden solution. https://access.redhat.com/solutions/3649231
Asked by Shuman (307 rep)
Dec 28, 2022, 02:27 AM
Last activity: Jan 6, 2023, 12:18 AM