Hello! I have jellyfin+qbittorrent+radarr on my home server, but I can’t make it work with hardlinks. When a download finishes, it just copies it to the /movie folder, doubling the disk space. at least, I think that it’s just a copy, because the disk space is double and find ./downloads -samefile ./movies/path/to/file.mkv returns no result, meaning if I understand correctly that file.mkv is not hardlinked to any file in the download folder (but it should).

this is the docker compose:

radarr:
    image: lscr.io/linuxserver/radarr:latest
    container_name: radarr
    network_mode: container:gluetun
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Rome
    volumes:
      - ./radarr-config:/config
      - /media/HDD1/movies:/movies
      - /media/HDD1/downloads:/downloads
    restart: unless-stopped

HDD1 hard drive is formatted ext4, that supports hardlinks (in fact I can create them manually), and in the radarr settings the checkbox “use hardlinks instead of copy” is checked.

Ideally I’d prefer softlinks instead of hadlinks, but I don’t think there’s a way to do it natively, I think I’d need an external script

Any tips? Thanks in advance!

  • Adam@doomscroll.n8e.dev
    link
    fedilink
    English
    arrow-up
    25
    ·
    edit-2
    5 months ago

    It’s the multiple volumes that are throwing it.

    You want to mount the drive at /media/HDD1:/media or something like that and configure Radarr to use /media/movies and /media/downloads as it’s storage locations.

    Hardlinks only work on the same volume, which technically they are, but the environment inside the container has no way of knowing that.

    • paris@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      I didn’t realize this when I first set up Radarr/Sonarr and they ended up copying every single file instead of hardlinking. By the time I realized, I had like 400gb of duplicate files. Ended up running fclones and getting it all back.

  • MummifiedClient5000@feddit.dk
    link
    fedilink
    English
    arrow-up
    5
    ·
    5 months ago

    The container sees each volume as a seperate filesystem, regardless of your underlying disk setup and you cannot hardlink across filesystems.

  • gaylord_fartmaster@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 months ago

    IIRC from running into this same issue, this won’t work the way you have the volume bind mounts set up because it will treat the movies and downloads directories as two separate file systems, which hardlinks don’t work across.

    If you bind mounted /media/HDD1:/media/HDD1 it should work, but then the container will have access to the entire drive. You might be able to get around that by running the container as a different user and only giving that user access to those two directories, but docker is also really inconsistent about that in my experience.