I'm writing a systemd's .service file for minidlnad (DLNA server) under CentOS 7. Since my media file collection is hosted on a RAID array, I need that array to be mounted BEFORE the minidlnad server is started. Both the RAID array and minidlnad should be started on boot. Is there a way to do this in systemd?
You need to adjust dependencies in your .service's
Requires=mdmonitor.service local-fs.target After=mdmonitor.service local-fs.target
On other distrib, it could be:
Requires=mdadm.service local-fs.target After=mdadm.service local-fs.target
The raid service file should execute
/sbin/mdadm --monitor --scan