I’ve spent the past couple months’ forced down-time1 reworking my Raspberry Pi cluster that forms a big portion of my home lab. I set out with the goal of better understanding Prometheus, Grafana, and node-exporter to monitor the hardware. I also needed the Grafana and Prometheus data to be persistent if I moved the container among the nodes. And I needed to deploy and make adjustemnts via Ansible for consistency and versioning. I’ve put the roles and playbooks on GitHub.
This wasn’t too hard to achieve; I did the same thing that I’d done with my Plex libraries: created appropriate volumes and exposed them via NFS from my Synology. Synology generally makes this pretty easy, although the lack of detailed controls did occasionally give me a headache that was a challenge to resolve.
Here’s a diagram of the NFS Mounts per-container.
Volumes and Paths
There are two common problems with Docker volumes: Paths that differ between the Sonarr and download client container and paths that prevent fast moves and hard links.
The first is a problem because the download client will report a download’s path as
/torrents/My.Series.S01E01/, but in the Sonarr container that might be at
/downloads/My.Series.S01E01/. The second is a performance issue and causes problems for seeding torrents. Both problems can be solved with well planned, consistent paths.
Most Docker images suggest paths like
/downloads. This causes slow moves and doesn’t allow hard links because they are considered two different file systems inside the container. Some also recommend paths for the download client container that are different from the Sonarr container, like
The best solution is to use a single, common volume inside the containers, such as
/data. Your TV shows would be in
/data/TV, torrents in
/data/downloads/torrentsand/or usenet downloads in
As a result, I created
/media, which is defined as a named Docker volume, and mounted by the Plex container (on the MacMini), Sonarr, Radarr, and NZBGet2.
I’ll post to-come with a couple cool Dashboards I’ve built the actual hardware I’m using for the cluster.
/media/nzb_downloads, but I left it as
/media/downloadsfor the sake of clarity in the post. [return]