First to get mounted devices: systemctl -t mount
Second search your device and switch and edit your /etc/systemd/system/deluged.service
Switch XYZ to ur mount.
Description=Deluge Daemon (DietPi)
Start after network and specified mounts are available.
After=network-online.target > XYZ> .mount
Requires=> XYZ> .mount
Stops deluged if mount points disconnect
BindsTo=> XYZ> .mount
ExecStart=/usr/bin/deluged -d -l /var/log/deluged/daemon.log -L warning
WantedBy=multi-user.target > XYZ> .mount
Save and now u will never get again error torrents after reboot.
Many thanks for sharing. How did you add the related mount before?
When using dietpi-drive_manager, an fstab entry is created which “mounts” the drive automatically on boot, earlier then dietpi-services starts Deluge or any other torrent service. I quote “mounts”, since actually at least for external drives we add the x-systemd.automount option which places an automount unit. This means the drive is not really mounted automatically, but it should be mounted as fast as the first access to its mountpoint occurs. It is just a guess that Deluge might not like the time delay between the initial access and when the actual mount occurs, since the drive usually needs to spin-up first.
So what you could test instead of editing the systemd unit: Remove the ,x-systemd.automount option from the related mount entry in /etc/fstab.
For network drives btw it is more complicated. We do not add x-systemd.automount for them, but actually in some cases this seems to be required to assure that the mount attempt is not done too early, when network has not yet fully been established.
I added the mount with dietpi-drive_manager and should be like u said, first mount drive and then starts deluge but seems like something happens (dont know what) and isnt going like that, because deluge mark all my torrents (more than 200) with “Error”, but with that fix worked like charm.
About remove ,x-systemd.automount i think i will leave like that because i dont like to re-check all torrents again because took me a while.