Suspend takes 2 minutes... iSCSI and no net

Hi, just upgraded my system to Rocky 9, latest. After believing suspend was freezing, I decided to pass no_console_suspend=1 to the kernel at boot. Then I tried to suspend, everything frozen again at the kprint message, but while trying to focus with a dirty lense camera to take a picture of the messages… the whole stuff took longer than 2 minutes and then it was: a new message saying it could not sync SCSI drives, and suspend worked.
Tried again with normal boot, no additions to the kernel line, waited patiently, and after 2 mins the system went into suspend mode.
I happen to have two iSCSI targets on my net, apparently the LAN is disabled first and then the script tries to sync disks before going into suspension, not realizing these are iSCSI and waiting in vain for a response.

Any guidance on how to proceed is welcome, besides removing iSCSI support, of course. I’m not familiar with systemd locations, I’m old school.

How are your iSCSI mounts mounted? In /etc/fstab? If so, do you have the option set _netdev? If that mount option isn’t being used, then it could explain the behaviour you are experiencing.

Actually I don’t mount them myself, they show up as an option for VM images in VMM and are discovered and populate the list of boot options in grub.
The kernel sees them and creates /dev/sd entries, they don’t show up in /etc/mtab

[   38.022616] sd 9:0:0:1: [sdc] 16777216 512-byte logical blocks: (8.59 GB/8.00 GiB)
[   38.023806] sd 9:0:0:1: [sdc] Write Protect is off
[   38.024494] sd 9:0:0:1: [sdc] Mode Sense: 49 00 00 08
[   38.025124] sd 9:0:0:1: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   38.033231]  sdc: sdc1 sdc2 < sdc5 >
[   38.034091] sd 9:0:0:1: [sdc] Attached SCSI disk
[  284.109583] sd 9:0:0:1: [sdc] Synchronizing SCSI cache
[  411.502539] sd 9:0:0:1: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK

Scripts reside in /usr/lib/systemd/system-sleep/
Added a bash script doing

iscsiadm -m node -T <target> -u

as somename.sleep
At suspend time, the script is executed, the drive session is closed, and suspension is immediate.
On resume, the session is reestablished.
When and if I have more sessions, I’ll write a script.

Something as simple as that, should be at the system level.

1 Like