Basically I have a Navidrome container and it’s pointing at my music in a network mounted folder, what’s the best way to ensure that it’s always there, even after a reboot of my Pi?
Basically I have a Navidrome container and it’s pointing at my music in a network mounted folder, what’s the best way to ensure that it’s always there, even after a reboot of my Pi?
Assuming systemd, create a file like
And then configure it per the systemd docs:
https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html
Then modify the docker unit file to have a dependency on the mount unit so it’s guaranteed to be up before docker starts.
Is this method superior to fstab?
It has the benefit that the container can’t start before the mount point is up without any additional scripts or kludges, so no race conditions or surprise behaviour. Using fstab alone can’t provide that guarantee. The other option is Autofs but it’s messier to configure and may not ship out of the box on modern distros.
I’ll let you in on a little secret: Fstab gets converted to mount units anyways.