Open-iscsi slow boot

37 views
Skip to first unread message

Randy Broman

unread,
Jun 22, 2019, 11:00:44 AM6/22/19
to open-iscsi
I have open-iscsi installed on Kubuntu 19.04, to access shared storage on a QNAP NAS server. The setup works, but open-iscsi slows boot:

$ systemd-analyze blame
     2min 6.105s open-iscsi.service
         10.076s rtslib-fb-targetctl.service
          6.042s NetworkMan.....
          ..
          
and I don't need QNAP/open-iscsi to boot, so I'm trying to set up a timer to delay iscsi connection until after the boot completes and the Kubuntu/Plasma desktop 
loads. Here's what I have:

$ cat /lib/systemd/system/open-iscsi.timer
[Unit]
Description=open-iscsi timer

[Timer]
# Time to wait after booting before it run for first time
OnBootSec=3min
Unit=open-iscsi.service

[Install]
WantedBy=timers.target

$ ls -l /lib/systemd/system/open-iscsi.service
-rw-r--r-- 1 root root 1068 Dec 11  2018 /lib/systemd/system/open-iscsi.service

ls -l /etc/systemd/system/timers.target.wants/open-iscsi.timer
lrwxrwxrwx 1 root root 36 Jun 21 20:59 /etc/systemd/system/timers.target.wants/open-iscsi.timer -> /lib/systemd/system/open-iscsi.timer

(I ran $ sudo systemctl daemon-reload and $ sudo systemctl enable open-iscsi.timer after creating the timer)

What am I doing wrong, and/or what do I need to do to fix this?

Thx!

The Lee-Man

unread,
Jun 25, 2019, 9:37:09 AM6/25/19
to open-iscsi
I don't know anything about systemd timers, but there should be no reason for this.

What distro are you using? What iscsi service files are there, and which ones are enabled?

In SUSE we have iscsid.socket, iscsid.service, and iscsi.service. The first two are for the iscsid daemon, and the last is for iscsi logins/logouts. Then, if you're using broadcom, you might also have iscsiuio.socket and iscsiuio.service.

I investigated a bug once where a customer was unhappy the iscsi service was taking so long to startup, according the systemd "blame", but it really wasn't taking a long time, but the dependencies made it look that way. You can always completely disable iscsi serivces and compare the actual boot time to when it is enabled to see if it really impacting your boot time.

Randy Broman

unread,
Jun 25, 2019, 11:31:03 AM6/25/19
to open-iscsi
Thanks for your response. I'm using Kubuntu 19.04. I disabled the iscsi service and in fact the boot was much faster:

$ systemd-analyze blame  
        10.079s rtslib-fb-targetctl.service
         6.134s NetworkManager-wait-online.service
          928ms snap-lxd-10972.mount

While I don't need the QNAP/iscsi to boot, disabling the iscsi service is not optimal, as I
need access to data on QNAP to operate. 

While I'm not a novice, I confess that I'm in "deep water" when it comes to investigating systemd
dependencies and fixes. The iscsiuio.service exists on my Kubuntu initiator, but I don't know how to determine if it's
causing the problem, or for that matter even if it's being used. Regards Broadcom, are you referring to use on the Kubuntu
initiator, or the QNAP target?

Any further tips or links to diagnose and/or fix appreciated .... Thx

The Lee-Man

unread,
Jun 26, 2019, 11:55:42 AM6/26/19
to open-iscsi
On Tuesday, June 25, 2019 at 11:31:03 AM UTC-4, Randy Broman wrote:
Thanks for your response. I'm using Kubuntu 19.04. I disabled the iscsi service and in fact the boot was much faster:


I'm not understanding what's going on with your system. I suspect there's more than just an unused open-iscsi initiator involved here.

Do you have any iscsi targets set up? Existing sessions?

I downloaded kunbuntu, and open-iscsi.service is enabled by default. Can you give me the systemctl status for open-iscsi.service, iscsid.socket, and iscsid.service? Also, an "ls" of /etc/iscsi/nodes and /sys/class/iscsi_session?

And please don't assume that the numbers that "systemd-analyze blame" show -- they don't always mean what you think. Can you just please time the boot (or reboot) sequence yourself, using the log files?

On my test VM, I have iscsid.socket, iscsid.service, and open-iscsi.service at their default settings, but I have never discovered any targets, so I don't have any history of nodes or sessions. And when I run "systemd-analyze blame", iscsi does not show up at all.

Randy Broman

unread,
Jun 27, 2019, 11:44:11 AM6/27/19
to open-...@googlegroups.com
I appreciate your interest, and I've attached a text file which I hope
is responsive to your request.

R
> --
> You received this message because you are subscribed to a topic in the Google Groups "open-iscsi" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-iscsi/NK2sBOEzSQE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to open-iscsi+...@googlegroups.com.
> To post to this group, send email to open-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/open-iscsi.
> To view this discussion on the web visit https://groups.google.com/d/msgid/open-iscsi/8fe010f4-fc0f-4021-a20e-9d7bdfaf0a76%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
open-iscsi.txt

The Lee-Man

unread,
Jun 27, 2019, 2:21:45 PM6/27/19
to open-iscsi
On Thursday, June 27, 2019 at 11:44:11 AM UTC-4, Randy Broman wrote:
I appreciate your interest, and I've attached a text file which I hope
is responsive to your request.

R

On Wed, Jun 26, 2019 at 8:55 AM The Lee-Man wrote:
>
> On Tuesday, June 25, 2019 at 11:31:03 AM UTC-4, Randy Broman wrote:
>>
>> Thanks for your response. I'm using Kubuntu 19.04. I disabled the iscsi service and in fact the boot was much faster:
>>
>>
> I'm not understanding what's going on with your system. I suspect there's more than just an unused open-iscsi initiator involved here.
>
> Do you have any iscsi targets set up? Existing sessions?
>
> I downloaded kunbuntu, and open-iscsi.service is enabled by default. Can you give me the systemctl status for open-iscsi.service, iscsid.socket, and iscsid.service? Also, an "ls" of /etc/iscsi/nodes and /sys/class/iscsi_session?
>
> And please don't assume that the numbers that "systemd-analyze blame" show -- they don't always mean what you think. Can you just please time the boot (or reboot) sequence yourself, using the log files?
>
> On my test VM, I have iscsid.socket, iscsid.service, and open-iscsi.service at their default settings, but I have never discovered any targets, so I don't have any history of nodes or sessions. And when I run "systemd-analyze blame", iscsi does not show up at all.
>


Your error messages make it clear that you are having initiator/target issues. If you look at the status of the open-iscsi.service unit, you can see it waits for the target to connect, then times out. Timing out always adds lots of time to a boot process.

It seems there is some issue with your "QNAP Target". I cannot help you with that. But you might want to check there for error messages, if there is some way to do that.


Randy Broman

unread,
Jun 27, 2019, 4:47:37 PM6/27/19
to open-iscsi
I understand your analysis and appreciate your help. I've now posted on a QNAP forum
to get help in diagnosis on that side. I'll post the solution here when I find it.

R
Reply all
Reply to author
Forward
0 new messages