exc-606e9f0019f76c642858fe0e

After lots of cool changes on the home network, I wanted to post about something that had stumped me recently with my RPi4 running Raspberry PI OS (Debian Buster). It would seem that configuring my primary Synology for LACP-based link aggregation had an unusual side-effect on my RPi4.

At first, the systemd-based open-iscsi.service on the RPi4 was throwing errors about not being able to login into all leading-login portals.

iscsiadm: Could not login all leading-login portals

I was able to resolve this by manually walking through the following steps:

First, I removed all of the existing nodes and send_targets in the following directories:

$ sudo -i
# cd /etc/iscsi
# rm nodes/*  
# rm send_targets/*

Next, I rediscovered the iSCSI portal and verified I could login to everything:

# iscsiadm -m discovery -t sendtargets -p IP_of_Target
# iscsiadm -m node -L all

This resolved my issues with aforementioned error, but then took me down a different path. After rebooting, I noticed that I was hitting the default waits for the iSCSI target devices to become available, so that they could be mounted via fstab and could then trigger other systemd services that had the related mounts as dependencies. I searched Google and the usual places for how to handle this dependency issue; however, the solution wasn’t necessarily setting additional dependency requirements within systemd or modifying iscsid defaults…

The solution was to modify the entry in fstab to require systemd to delay the mount based a manual override of the default 90 seconds which just a few seconds shy of the required iscsi target login time.

This article is where I found the solution.

Essentially, you need to add this to the options section of offending line(s) in fstab:

x-systemd.device-timeout=time
time = (Specify a time in seconds or explicitly append a unit such as “s”, “min”, “h”, “ms”.)

I was initially confused, as I had only seen this in reference to NFS mounts, but it apparently works on any mount statement in fstab. Just be careful. If you set it to zero, it will make the timeout indefinite. Which at first doesn’t sound bad, but if you have any typos/config errors, it will potentially lead to problems.

Hopefully, this will help someone else!


Discover more from Warmest Robot + Warmest Human

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *