This is the issue with the quad sata hat and raspbian

ok I get what you mean now

changed it

/etc/systemd/system/multi-user.target.wants

changed the after section to this:

[Unit]
Description=MiniDLNA lightweight DLNA/UPnP-AV server
Documentation=man:minidlnad(1) man:minidlna.conf(5)
After=mnt-raidx.mount

cool worked

appreciate the help I had trouble finding it

You can get a a mount path escaped version (which is used in a systemd service) with the systemd-escape --path <path_goes_here> (without <>) command is your mount path has a complicated name.

1. Example (simple):
pi@raspberry-pi-4:~ $ systemd-escape --path /mnt/radix
mnt-radix

2. Example (with a space in the folder name):
pi@raspberry-pi-4:~ $ systemd-escape --path “/mnt/radix 2”
mnt-radix\x202

So you have to write After=mnt-radix\x202.mount into the service file in this case.

In my case for qBittorrent, I had to add the following too (BindsTo):

After=network.target network-online.target nss-lookup.target mnt-torrent.mount
BindsTo=mnt-torrent.mount

I had to write BindsTo with my mount point path.

1 Like

yea its weird I find not all my services work 100% i.e. sometimes my vpn doesnt auto start and other times its my raid auto mounting, a bit annoying but I cba to fix it anymore lol so I just reboot till it works sometimes

Hi bud, you’re a genius

just added "rockpi-sata.service mnt-raidx.mount " to my After=

Minidlna folders and it worked without any alterations by default (regarding minidlna and samba)

" You can get a a mount path escaped version (which is used in a systemd service) with the systemd-escape --path <path_goes_here> (without <>) command is your mount path has a complicated name.

1. Example (simple):
pi@raspberry-pi-4:~ $ systemd-escape --path /mnt/radix
mnt-radix

2. Example (with a space in the folder name):
pi@raspberry-pi-4:~ $ systemd-escape --path “/mnt/radix 2”
mnt-radix\x202

So you have to write After=mnt-radix\x202.mount into the service file in this case."

What does this mean?

I just want qbittorrent minidlna and samba to all run after my raid as loaded nothing more nothing less

this is what my current folder looks like

"# This file is part of systemd.

systemd is free software; you can redistribute it and/or modify it

under the terms of the GNU Lesser General Public License as published by

the Free Software Foundation; either version 2.1 of the License, or

(at your option) any later version.

[Unit]
DefaultDependencies=no
Conflicts=umount.target
After=rockpi-sata.service
Before=local-fs.target umount.target

[Mount]
What=UUID=“3c3a3c08-2aff-4bd6-a68c-5ad8eddb2123”
What=/dev/md0
Type=ext4
Options=defaults,noatime

Make ‘systemctl enable mnt-raidx.mount’ work:

[Install]
WantedBy=local-fs.target

"

"[Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
Wants=network-online.target
After=network.target network-online.target nmbd.service winbind.service rockpi-sata.service mnt-raidx.mount

[Service]
Type=notify
NotifyAccess=all
PIDFile=/var/run/samba/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/default/samba
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity

[Install]
WantedBy=multi-user.target
"
"[Unit]
Description=MiniDLNA lightweight DLNA/UPnP-AV server
Documentation=man:minidlnad(1) man:minidlna.conf(5)
After=network.target rockpi-sata.service mnt-raidx.mount

[Service]
Type=forking
User=minidlna
Group=minidlna

Environment=CONFIGFILE=/etc/minidlna.conf
Environment=DAEMON_OPTS=-r
EnvironmentFile=-/etc/default/minidlna

RuntimeDirectory=minidlna
LogsDirectory=minidlna
PIDFile=/run/minidlna/minidlna.pid
ExecStart=/usr/sbin/minidlnad -f $CONFIGFILE -P /run/minidlna/minidlna.pid $DAEMON_OPTS

[Install]
WantedBy=multi-user.target
"

I am glad you could make it!

1 Like

Manage to get qbittorrent to auto boot as a service as well

All of it works without issue so I no longer have to touch the raspberry pi at all

Cheers bro