Remote Path Mappings - n05urpr1532-MHA-Team/PTS-Team GitHub Wiki

Information

Downloader mappings tell radarr, sonarr, and lidarr where to look for downloads on your server.

PTS utilizes these mappings to enable hard linking. Files will process almost immediately with these mappings and with PTS 8.3+.

Without these mappings, files are forced to being copied instead of moved/renamed. This means that without these mappings, your storage device is doing 2x the work needed, and requires 2x in free disk space. This also causes a lot of IOWait reported in netdata and causes extra wear on your storage device.

PTS uses a union filesystem (mergerfs, aka /mnt/unionfs), we do this so everything is visible inside /mnt/unionfs even though it may actually be stored somewhere else. This allows plex and other apps instant access to the file in 1 unified location, even though it may physically move during the PTS process.

However there are technical limitations when using a union file system. File operations must stay within the union to work as expected. So to "trick" sonarr/radarr/lidarr into staying inside the union, we use "remote path mappings" to rewrite the paths. sonarr/radarr/lidarr will rewrite the path with one that is inside /mnt/unionfs. This means when importing, files can be hardlinked, which is instant and efficient.

The import operation simply renames and moves the files from your downloader into your sonarr/radarr/lidarr library, /mnt/unionfs/category. The real location of these files will be /mnt/downloads/category. This is due to technical limitation of how a union file system works! Rename/Move operations cannot cross file-system boundaries, meaning it can't hardlink them from /mnt/downloads into /mnt/move, it can only do that by copying the file, which is wasteful. This is because /mnt/unionfs is it's own virtual file-system, a union of multiple directories, which looks like 1 directory.

To overcome this technical limitation, the blitz/move script will detect the imported files inside /mnt/downloads/category and move them to /mnt/move/category before uploading. If there was a way to have sonarr/lidarr/radarr import files stright into into /mnt/move/category, without losing performance, then we would do that.


Standard Download Mappings

IMPORTANT: It's very important you get this exactly right. The host should be all lowercase and the paths are case sensitive. Failure to set these mappings or do them correctly will cause other issues.

For each downloader you use, you need to setup a remote mapping per downloader. 1 mapping is required for each downloader you use. The downloaders must already be installed before proceeding as it will refuse to save, if the path does not exist.

If you decide to try another downloader, you'll probably forget about these required mappings and then run into issues. So we recommend adding all of them, even if you don't use them all.

Important Info

  • Copy and paste these mappings into your sonarr/radarr/lidarr config.
  • Keep the host all lowercase, it doesn't matter what you did, keep it lowercase!
  • the paths must be 100% the same as we have listed here, again copy and paste.
  • DO NOT change or add additional folders or categories to the end of these paths!
  • DO NOT change the host, do not add your domain url, leave it alone!
Host Remote Path Local Path
sabnzbd /mnt/downloads/nzb/ /mnt/unionfs/nzb/
nzbget /mnt/downloads/nzb/ /mnt/unionfs/nzb/
qbittorrent /mnt/downloads/qbittorrent/ /mnt/unionfs/qbittorrent/
rutorrent /mnt/downloads/torrent/ /mnt/unionfs/torrent/
deluge /mnt/downloads/deluge/ /mnt/unionfs/deluge/

VPN Downloaders

Host Remote Path Local Path
qbittorrent-vpn /mnt/downloads/qbittorrent-vpn/ /mnt/unionfs/qbittorrent-vpn/
rutorrent-vpn /mnt/downloads/rutorrent-vpn/ /mnt/unionfs/rutorrent-vpn/
deluge-vpn /mnt/downloads/deluge-vpn/ /mnt/unionfs/deluge-vpn/
transmission-vpn /mnt/downloads/deluge-vpn/ /mnt/unionfs/deluge-vpn/
rflood-vpn /mnt/downloads/rflood-vpn/ /mnt/unionfs/rflood-vpn/

Use this image as a reference, once your done, it should look like this! Remember you need to do it in sonarr & radarr, lidarr too if you use it.


ADVANCED

Different processing path?

Replace /mnt with your processing location.

For example, if you configured /mymedia as your processing disk:

Host Remote Path Local Path
sabnzbd /mymedia/downloads/nzb/ /mnt/unionfs/nzb/

Downloaders on a different server than Sonarr/Radarr/Lidarr?

Note This is only for the rare case for those who have separate servers for downloading and processing. Change the host to downloader.mydomain.com and leave the rest the same.

Host Remote Path Local Path
sabnzbd.mydomain.com /mymedia/downloads/nzb/ /mnt/unionfs/nzb/