Current method of mounting docker volumes does not allow for hardlinking
The current example docker-compose
has the containers for Sonarr, Radarr, etc. mounting the folders for media into different volumes than the downloads.
volumes:
- ${MEDIA_DIRECTORY}/tvshows:/tv
- ${MEDIA_DIRECTORY}/downloads:/downloads
- ${INSTALL_DIRECTORY}/config/sonarr:/config
When a download finishes and *Arr imports it, it will attempt to hardlink and fail (because you can't hardlink across volumes). It then falls back to doing a copy. This is really slow (relatively speaking), puts additional wear on the drive, and doubles the storage space needed.
The *arrs should mount the entire MEDIA_DIRECTORY
as a single volume and the relevant torrent program should mount to the same container path.
I've manually edited my docker-compose to the following setup but I imagine any yams update
will wipe this out.
qbittorrent:
image: lscr.io/linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=${PUID}
- PGID=${PGID}
- WEBUI_PORT=8080
volumes:
- ${MEDIA_DIRECTORY}/downloads:/data/downloads
- ${INSTALL_LOCATION}/config/qbittorrent:/config
sonarr:
image: lscr.io/linuxserver/sonarr
container_name: sonarr
environment:
- PUID=${PUID}
- PGID=${PGID}
volumes:
- ${MEDIA_DIRECTORY}:/data
- ${INSTALL_LOCATION}/config/sonarr:/config
radarr:
image: lscr.io/linuxserver/radarr
container_name: radarr
environment:
- PUID=${PUID}
- PGID=${PGID}
volumes:
- ${MEDIA_DIRECTORY}:/data
- ${INSTALL_LOCATION}/config/radarr:/config
And so on.
The root paths in the *arrs would have to be updated as well as the save path in qBittorrent or whatever.
Slightly adapted from https://trash-guides.info/Hardlinks/How-to-setup-for/Docker/