Configuration changes to support hardlinks using a 'common_mount' volume definition for all apps

doowrednu asked for this feature about 2 years ago — 3 comments

doowrednu commented about 2 years ago

As I mainly use torrents - In my normal configuration I use hardlinks so that when a file is seeding - it is organized by sonarr / radarr but uses a hardlink into the media library rather than copying the file to significantly save disk-space.

Due to a docker limitation even if the underlying folders are on the same filesystem - you cannot hardlink between volumes declared - For example: radarr.yml volumes: - /etc/localtime:/etc/localtime:ro - ${DOCKERCONFDIR}/radarr:/config - ${DOWNLOADSDIR}:/downloads - ${MEDIADIR_MOVIES}:/movies

To workaround this limitation - I set the movie folder to /downloads/media-movie/ and have transmission download into /downloads/movie/ and ignore the '- ${MEDIADIR_MOVIES}:' volume entirely - this way sonarr can hardlink correctly in the same volume

I propose for people who would like to use hardlinks that an additional 'common mount volume' is declared in .env and the app yaml that defines this as an additional volume:

i.e. .env: DOCKERCONFDIR=~/.docker/config DOWNLOADSDIR=/mnt/downloads/
MEDIADIRBOOKS=/mnt/media/books/ MEDIADIRMOVIES=/mnt/media/movies/ MEDIADIRMUSIC=/mnt/media/music/ MEDIADIRTV=/mnt/media/tv/ COMMON_MOUNT=/mnt/

radarr.yml: volumes: - /etc/localtime:/etc/localtime:ro - ${DOCKERCONFDIR}/radarr:/config - ${DOWNLOADSDIR}:/downloads - ${MEDIADIRMOVIES}:/movies - ${COMMONMOUNT}:/mnt

This way - you can still decide to separate using the existing structure if you want to - but if you prefer - you use the common_mount path throughout your configuration with appropriate sub-folders underneath the common_mount volume. This will allow hard link to work correctly and would allow for updates to work

| nemchik commented almost 2 years ago Admin

This is a good idea and I was unaware of this behaviour. I'll add this to our todo list.

| nemchik commented almost 2 years ago Admin

This is on the books to merge shortly

Join the discussion!

with GitHub to comment