From 75c339175064026cee628d46a3777e21f5f957f5 Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sat, 24 Apr 2021 21:35:09 +0200 Subject: [PATCH] Moved: Misc - How To Set Up Hardlinks and Atomic-Moves => Hardlinks - Hardlinks and Instant Moves to it's own section ```yml Updated: Misc - How To Set Up Hardlinks and Atomic-Moves => Hardlinks - Hardlinks and Instant Moves - Changed: Complete overhaul of the Hardlinks and Instant Moves - Moved: Misc - How To Set Up Hardlinks and Atomic-Moves => Hardlinks - Hardlinks and Instant Moves to it's own section - Changed: Splitted up the installation method to make it easier to maintain and hopefully more clear to read. ``` --- docs/.pages | 1 + docs/Hardlinks/.pages | 4 + docs/Hardlinks/Examples.md | 113 ++ docs/Hardlinks/Hardlinks-and-Instant-Moves.md | 38 + docs/Hardlinks/How-to-setup-for/Docker.md | 121 ++ .../Hardlinks/How-to-setup-for/Dockstarter.md | 171 +++ docs/Hardlinks/How-to-setup-for/Native.md | 120 ++ docs/Hardlinks/How-to-setup-for/Synology.md | 270 +++++ docs/Hardlinks/How-to-setup-for/Unraid.md | 187 +++ .../ds-deluge-preferences-downloads.png | Bin .../images/ds-nzbget-settings-categories.png | Bin .../images/ds-nzbget-settings-paths.png | Bin .../images/ds-qbt-options-downloads.png | Bin .../images/ds-radarr-add-new.png | Bin .../images/ds-radarr-movies.png | Bin .../images/ds-radarr-root-folder.png | Bin .../images/ds-rtorrent-settings-autotools.png | Bin .../images/ds-rtorrent-settings-downloads.png | Bin .../images/ds-rtorrent.rc.png | Bin .../images/ds-sabnzbd-categories.png | Bin .../images/ds-sabnzbd-folders.png | Bin .../images/ds-sonarr-add-new.png | Bin .../images/ds-sonarr-root-folder.png | Bin .../How-to-setup-for}/images/ds-sonarr-tv.png | Bin .../images/synology-control-panel.png | Bin .../How-to-setup-for}/images/synology-id.png | Bin .../How-to-setup-for}/images/unraid-arr.png | Bin .../images/unraid-final-result.png | Bin .../images/unraid-main-share.png | Bin .../images/unraid-media-server.png | Bin .../images/unraid-torrent-clients.png | Bin .../images/unraid-usenet-client.png | Bin docs/Hardlinks/How-to-setup-for/index.md | 5 + .../images/deluge-preferences-downloads.png | Bin .../images/nzbget-settings-categories.png | Bin .../images/nzbget-settings-paths.png | Bin .../images/qbt-options-downloads.png | Bin .../images/radarr-add-new.png | Bin .../images/radarr-enable-hardlinks.png | Bin .../images/radarr-movies.png | Bin .../images/radarr-root-folder.png | Bin .../images/rtorrent-settings-autotools.png | Bin .../images/rtorrent-settings-downloads.png | Bin .../images/rtorrent.rc.png | Bin .../images/sabnzbd-categories.png | Bin .../images/sabnzbd-folders.png | Bin .../images/sonarr-add-new.png | Bin .../images/sonarr-enable-hardlinks.png | Bin .../images/sonarr-root-folder.png | Bin docs/{Misc => Hardlinks}/images/sonarr-tv.png | Bin docs/Misc/.pages | 1 - ...ow-to-set-up-hardlinks-and-atomic-moves.md | 1049 ----------------- mkdocs.yml | 5 +- 53 files changed, 1033 insertions(+), 1052 deletions(-) create mode 100644 docs/Hardlinks/.pages create mode 100644 docs/Hardlinks/Examples.md create mode 100644 docs/Hardlinks/Hardlinks-and-Instant-Moves.md create mode 100644 docs/Hardlinks/How-to-setup-for/Docker.md create mode 100644 docs/Hardlinks/How-to-setup-for/Dockstarter.md create mode 100644 docs/Hardlinks/How-to-setup-for/Native.md create mode 100644 docs/Hardlinks/How-to-setup-for/Synology.md create mode 100644 docs/Hardlinks/How-to-setup-for/Unraid.md rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-deluge-preferences-downloads.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-nzbget-settings-categories.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-nzbget-settings-paths.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-qbt-options-downloads.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-radarr-add-new.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-radarr-movies.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-radarr-root-folder.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-rtorrent-settings-autotools.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-rtorrent-settings-downloads.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-rtorrent.rc.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-sabnzbd-categories.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-sabnzbd-folders.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-sonarr-add-new.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-sonarr-root-folder.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/ds-sonarr-tv.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/synology-control-panel.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/synology-id.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/unraid-arr.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/unraid-final-result.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/unraid-main-share.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/unraid-media-server.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/unraid-torrent-clients.png (100%) rename docs/{Misc => Hardlinks/How-to-setup-for}/images/unraid-usenet-client.png (100%) create mode 100644 docs/Hardlinks/How-to-setup-for/index.md rename docs/{Misc => Hardlinks}/images/deluge-preferences-downloads.png (100%) rename docs/{Misc => Hardlinks}/images/nzbget-settings-categories.png (100%) rename docs/{Misc => Hardlinks}/images/nzbget-settings-paths.png (100%) rename docs/{Misc => Hardlinks}/images/qbt-options-downloads.png (100%) rename docs/{Misc => Hardlinks}/images/radarr-add-new.png (100%) rename docs/{Misc => Hardlinks}/images/radarr-enable-hardlinks.png (100%) rename docs/{Misc => Hardlinks}/images/radarr-movies.png (100%) rename docs/{Misc => Hardlinks}/images/radarr-root-folder.png (100%) rename docs/{Misc => Hardlinks}/images/rtorrent-settings-autotools.png (100%) rename docs/{Misc => Hardlinks}/images/rtorrent-settings-downloads.png (100%) rename docs/{Misc => Hardlinks}/images/rtorrent.rc.png (100%) rename docs/{Misc => Hardlinks}/images/sabnzbd-categories.png (100%) rename docs/{Misc => Hardlinks}/images/sabnzbd-folders.png (100%) rename docs/{Misc => Hardlinks}/images/sonarr-add-new.png (100%) rename docs/{Misc => Hardlinks}/images/sonarr-enable-hardlinks.png (100%) rename docs/{Misc => Hardlinks}/images/sonarr-root-folder.png (100%) rename docs/{Misc => Hardlinks}/images/sonarr-tv.png (100%) delete mode 100644 docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md diff --git a/docs/.pages b/docs/.pages index 210acfd1d..c33876dcb 100644 --- a/docs/.pages +++ b/docs/.pages @@ -7,3 +7,4 @@ nav: - NZBGet - Plex - Misc + - Hardlinks diff --git a/docs/Hardlinks/.pages b/docs/Hardlinks/.pages new file mode 100644 index 000000000..3871776d5 --- /dev/null +++ b/docs/Hardlinks/.pages @@ -0,0 +1,4 @@ +nav: + - Hardlinks - Atomic Moves: Hardlinks-and-Instant-Moves.md + - How-to-setup-for + - Examples: Examples.md diff --git a/docs/Hardlinks/Examples.md b/docs/Hardlinks/Examples.md new file mode 100644 index 000000000..93451e91d --- /dev/null +++ b/docs/Hardlinks/Examples.md @@ -0,0 +1,113 @@ +# Examples + +!!! info + + Pick one path layout and use it for all of them. + + It doesn't matter if you prefer to use `/data`, `/shared`, `/storage` or whatever. + + The screenshots in the examples are using the following root path `/data` + +- [Sonarr](#sonarr) +- [Radarr](#radarr) +- [SABnzbd](#sabnzbd) +- [NZBGet](#nzbget) +- [qBittorrent](#qbittorent) +- [Deluge](#deluge) +- [ruTorrent](#rutorrent) + +??? example "Sonarr Examples" + + ## Sonarr + + `Settings` => `Media Management` => `Importing` + + ![sonarr-enable-hardlinks](images/sonarr-enable-hardlinks.png) + + `Settings` => `Media Management` => `Root Folders` + + ![sonarr-root-folder](images/sonarr-root-folder.png) + + `Series` => `Add New` + + ![sonarr-add-new](images/sonarr-add-new.png) + + ![sonarr-tv](images/sonarr-tv.png) + +??? example "Radarr Examples" + + ## Radarr + + `Settings` => `Media Management` => `Importing` + + ![radarr-enable-hardlinks](images/radarr-enable-hardlinks.png) + + `Settings` => `Media Management` => `Root Folders` + + ![radarr-root-folder](images/radarr-root-folder.png) + + `Movies` => `Add New` + + ![radarr-add-new](images/radarr-add-new.png) + + ![radarr-movies](images/radarr-movies.png) + +??? example "SABnzbd Examples" + + #### SABnzbd + + `SABnzbd config` => `Folders` + + ![sabnzbd-folders](images/sabnzbd-folders.png) + + `SABnzbd config` => `Categories` + + ![sabnzbd-categories](images/sabnzbd-categories.png) + +??? example "NZBGet Examples" + + ## NZBGet + + `Settings` => `PATHS` + + ![nzbget-settings-paths](images/nzbget-settings-paths.png) + + `Settings` => `CATEGORIES` + + ![nzbget-settings-categories](images/nzbget-settings-categories.png) + +??? example "qBittorrent Examples" + + #### qBittorrent + + `Options` => `Downloads` + + ![qbt-options-downloads](images/qbt-options-downloads.png) + +??? example "Deluge Example" + + ## Deluge + + `Preferences` => `Downloads` + + ![deluge-preferences-downloads](images/deluge-preferences-downloads.png) + +??? example "ruTorrent Examples" + + ## ruTorrent + + `../config/rtorrent/config/rtorrent.rc` (path to your appdata) + + ![rtorrent.rc](images/rtorrent.rc.png) + + `Settings` => `Downloads` + + ![rtorrent-settings-downloads](images/rtorrent-settings-downloads.png) + + `Settings` => `Autotools` + + ![rtorrent-settings-autotools](images/rtorrent-settings-autotools.png) + +------ + +Big Thnx to [fryfrog](https://github.com/fryfrog){:target="_blank" rel="noopener noreferrer"} for his [Docker Guide](https://wiki.servarr.com/Docker_Guide){:target="_blank" rel="noopener noreferrer"} that I used as basis for this guide. diff --git a/docs/Hardlinks/Hardlinks-and-Instant-Moves.md b/docs/Hardlinks/Hardlinks-and-Instant-Moves.md new file mode 100644 index 000000000..a6b54e4b5 --- /dev/null +++ b/docs/Hardlinks/Hardlinks-and-Instant-Moves.md @@ -0,0 +1,38 @@ +# Hardlinks and Instant Moves (Atomic-Moves) + +## Description + +!!! info + + If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should. + + Here we will try to explain it. + +This Guide exist out of 3 Sections + +1. This page with a short description. +1. [How to setup for](/Hardlinks/How-to-setup-for/) your installation method. +1. [Examples](/Hardlinks/Examples/) what you should use for your path settings in your used applications. + +So you want one of the following ? + +- Instant moves (Atomic-Moves) during import of the *arr (useful when using Usenet)? +- You don't want to use twice the storage when using torrents. (hardlinks)? +- You want to perma seed? + +Then Continue to [How to setup for](/Hardlinks/How-to-setup-for/) your installation method. + +### FAQ + +??? faq "**What are the `*arr`?**" + + Sonarr, Radarr, Lidarr, etc. + +??? faq "**What are hardlinks?**" + + - Short answer is "having a file in multiple folders" without using double your storage. + - [Long Answer](https://medium.com/@krisbredemeier/the-difference-between-hard-links-and-soft-or-symbolic-links-780149244f7d){:target="_blank" rel="noopener noreferrer"}. + +??? faq "**What are Instant Moves (Atomic Moves)?**" + + A real move and not a copy file from download folder to media folder and then delete file from download folder. diff --git a/docs/Hardlinks/How-to-setup-for/Docker.md b/docs/Hardlinks/How-to-setup-for/Docker.md new file mode 100644 index 000000000..c78c40ef5 --- /dev/null +++ b/docs/Hardlinks/How-to-setup-for/Docker.md @@ -0,0 +1,121 @@ +# Docker + +!!! tip + + If you're new to dockers and want a easy setup I suggest to take a look at [DockSTARTer](https://dockstarter.com/){:target="_blank" rel="noopener noreferrer"}. + I've also created a short guide [HERE](#dockstarter) where I explain the settings for the most used applications. + + The main goal of DockSTARTer is to make it quick and easy to get up and running with Docker. + You may choose to rely on DockSTARTer for various changes to your Docker system or use DockSTARTer as a stepping stone and learn to do more advanced configurations. + + *DockSTARTer was actually my first steps in to the world of dockers.* + +!!! note + + I'm not going to explain how to get dockers installed and running, I will only explain which folder structure we recommend. + +!!! info + +The paths you use on the inside matter. Because of how Docker’s volumes work, passing in two or three volumes such as the commonly suggested `/tv`, `/movies` and `/downloads` makes them look like two or three file systems, even if they aren’t. This means hard links won’t work and instead of an instant move, a slower and more I/O intensive copy + delete is used. + +## Folder Structure + +!!! attention + + It doesn't really matter which path you use for your media and appdata, + + the only thing you should avoid is `/home`. + + Because user folders in `/home` are expected to have some restrictive permissions. + + It just could end up creating a permissions mess, so it's better to just avoid entirely. + +For this example we're going to make use of a share called `data`. + +The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. + +*In this examples I'm using lower case on all folder on purpose, being Linux is case sensitive.* + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +### Breakdown of the Folder Structure + +#### Torrent clients + +qBittorrent, Deluge, ruTorrent + +The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. + +```none +data +└── torrents + ├── movies + ├── music + └── tv +``` + +### Usenet clients + +NZBGet or SABnzbd + +The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. + +```none +data +└── usenet + ├── movies + ├── music + └── tv +``` + +### The arr(s) + +Sonarr, Radarr and Lidarr + +Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +### Media Server + +Plex, Emby, JellyFin and Bazarr + +Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. + +```none +data +└── media + ├── movies + ├── music + └── tv +``` + +**Don't forget to look at the [Examples](/Hardlinks/Examples/) how to setup the paths inside your applications.** diff --git a/docs/Hardlinks/How-to-setup-for/Dockstarter.md b/docs/Hardlinks/How-to-setup-for/Dockstarter.md new file mode 100644 index 000000000..2bac1346b --- /dev/null +++ b/docs/Hardlinks/How-to-setup-for/Dockstarter.md @@ -0,0 +1,171 @@ +# Dockstarter + +!!! note + + I'm using the default paths in this example, and will keep the other paths unchanged so nothing will break if you make a mistake. + +## Folder Structure + +We're going to use a mounted drive that we're going to use as storage for downloads and your media. +In this example the mounted drive will be mounted to `/mnt/` with the following folder structure. + +```none +storage +├── downloads +| ├── torrents +│ | ├── movies +│ | ├── music +│ | └── tv +| └── usenet +│ ├── movies +│ ├── music +│ └── tv +└── medialibrary + ├── movies + ├── music + └── tv +``` + +## Changes to the .env + +To accomplish this we need to change first a few paths in your `.env` (Usually `~/.docker/compose/.env`) + +``` yaml +# Global Settings +COMPOSE_HTTP_TIMEOUT=60 +DOCKERCONFDIR=~/.config/appdata +DOCKERGID=999 +DOCKERHOSTNAME=DockSTARTer +DOCKERLOGGING_MAXFILE=10 +DOCKERLOGGING_MAXSIZE=200k +DOCKERSTORAGEDIR=/mnt/storage +PGID=1000 +PUID=1000 +TZ=America/Chicago + +# DEPRECATED Settings (will be removed at the end of 2020) +DOCKERSHAREDDIR=~/shared +DOWNLOADSDIR=/mnt/downloads +MEDIADIR_AUDIOBOOKS=/mnt/medialibrary/audiobooks +MEDIADIR_BOOKS=/mnt/medialibrary/books +MEDIADIR_COMICS=/mnt/medialibrary/comics +MEDIADIR_MOVIES=/mnt/medialibrary/movies +MEDIADIR_MUSIC=/mnt/medialibrary/music +MEDIADIR_TV=/mnt/medialibrary/tv +``` + +### Changes to your paths + +When that's all set then you will need to change the paths you're going to use in the containers from: + +`/downloads` => `/storage/downloads` + +`/audiobooks` => `/storage/medialibrary/audiobooks` + +`/books` => `/storage/medialibrary/books` + +`/comics` => `/storage/medialibrary/comics` + +`/movies` => `/storage/medialibrary/movies` + +`/music` => `/storage/medialibrary/music` + +`/tv` => `/storage/medialibrary/tv` + +## DockSTARTer Examples + +!!! info + + The screenshots in the examples are using the following root path `/storage` + +??? example "Sonarr Examples" + + ###### Sonarr + + `Settings` => `Media Management` => `Importing` + + ![sonarr-enable-hardlinks](/Hardlinks/images/sonarr-enable-hardlinks.png) + + `Settings` => `Media Management` => `Root Folders` + + ![ds-sonarr-root-folder](images/ds-sonarr-root-folder.png) + + `Series` => `Add New` + + ![ds-sonarr-add-new](images/ds-sonarr-add-new.png) + + ![ds-sonarr-tv](images/ds-sonarr-tv.png) + +??? example "Radarr Examples" + + ###### Radarr + + `Settings` => `Media Management` => `Importing` + + ![radarr-enable-hardlinks](/Hardlinks/images/radarr-enable-hardlinks.png) + + `Settings` => `Media Management` => `Root Folders` + + ![ds-radarr-root-folder](images/ds-radarr-root-folder.png) + + `Movies` => `Add New` + + ![ds-radarr-add-new](images/ds-radarr-add-new.png) + + ![ds-radarr-movies](images/ds-radarr-movies.png) + +??? example "SABnzbd Examples" + + ###### SABnzbd + + `SABnzbd config` => `Folders` + + ![ds-sabnzbd-folders](images/ds-sabnzbd-folders.png) + + `SABnzbd config` => `Categories` + + ![ds-sabnzbd-categories](images/ds-sabnzbd-categories.png) + +??? example "NZBGet Examples" + + ###### NZBGet + + `Settings` => `PATHS` + + ![ds-nzbget-settings-paths](images/ds-nzbget-settings-paths.png) + + `Settings` => `CATEGORIES` + + ![ds-nzbget-settings-categories](images/ds-nzbget-settings-categories.png) + +??? example "qBittorrent Examples" + + ###### qBittorrent + + `Options` => `Downloads` + + ![ds-qbt-options-downloads](images/ds-qbt-options-downloads.png) + +??? example "Deluge Example" + + ###### Deluge + + `Preferences` => `Downloads` + + ![ds-deluge-preferences-downloads](images/ds-deluge-preferences-downloads.png) + +??? example "ruTorrent Examples" + + ###### ruTorrent + + `../config/rtorrent/config/rtorrent.rc` (path to your appdata) + + ![ds-rtorrent.rc](images/ds-rtorrent.rc.png) + + `Settings` => `Downloads` + + ![ds-rtorrent-settings-downloads](images/ds-rtorrent-settings-downloads.png) + + `Settings` => `Autotools` + + ![ds-rtorrent-settings-autotools](images/ds-rtorrent-settings-autotools.png) diff --git a/docs/Hardlinks/How-to-setup-for/Native.md b/docs/Hardlinks/How-to-setup-for/Native.md new file mode 100644 index 000000000..da9aa7250 --- /dev/null +++ b/docs/Hardlinks/How-to-setup-for/Native.md @@ -0,0 +1,120 @@ +# Native + +!!! note + + I'm not going to explain how to install all the applications, I will only explain which folder structure we recommend. + +------ + +## Folder Structure + +!!! attention + + It doesn't really matter which path you use for your media, + + the only thing you should avoid is `/home`. + + Because user folders in `/home` are expected to have some restrictive permissions. + + It just could end up creating a permissions mess, so it's better to just avoid entirely. + +For this example we're going to make use of a share called `data`. + +The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. + +*I'm using lower case on all folder on purpose, being Linux is case sensitive.* + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +## Breakdown of the Folder Structure + +### Torrent clients + +qBittorrent, Deluge, ruTorrent + +The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. + +```none +data +└── torrents + ├── movies + ├── music + └── tv +``` + +### Usenet clients + +NZBGet or SABnzbd + +The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. + +```none +data +└── usenet + ├── movies + ├── music + └── tv +``` + +### The arr(s) + +Sonarr, Radarr and Lidarr + +Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +### Media Server + +Plex, Emby, JellyFin and Bazarr + +Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. + +```none +data +└── media + ├── movies + ├── music + └── tv +``` + +------ + +## Permissions + +Recursively chown user and group and Recursively chmod to 775/664 + +```bash +sudo chown -R $USER:$USER /data +sudo chmod -R a=,a+rX,u+w,g+w /data +``` + +**Don't forget to look at the [Examples](/Hardlinks/How-to-setup-for/) how to setup the paths inside the applications.** diff --git a/docs/Hardlinks/How-to-setup-for/Synology.md b/docs/Hardlinks/How-to-setup-for/Synology.md new file mode 100644 index 000000000..e730b7141 --- /dev/null +++ b/docs/Hardlinks/How-to-setup-for/Synology.md @@ -0,0 +1,270 @@ +# Synology + +!!! note + + Being I don't have a Synology myself and I kind of hate the Synology GUI for the dockers, I'm doing this with the use of docker-compose. + + This works like 10x faster then the GUI and after adding it shows up in the GUI. + + Thnx to faxity for the initial compose that I used to create the Synology Guide. + +We need to get some information that we need later to setup the docker-compose file. + +## PUID and PGID + +In order for the Docker container to access the shares on the Synology, +we need to give it the same permissions as your main user who has access to those shares. +For this we need to figure out the PUID and the PGID of the user having access to your shares. + +You will need to SSH into your Synology. +If you didn't already enable it you need to do that first + +![!synology-control-panel](images/synology-control-panel.png) + +Then use a program like Putty and SSH to your Synology. + +Login if you get a popup asking if you want to trust the key, +Just press `OK` or `ACCEPT` + +Enter the login information of your main Synology user account. + +![!synology-id](images/synology-id.png) + +Once logged in type `id`. +This will show your UID (aka PUID). +Which in this screenshot is `1026` for the administrator +and the GID (aka PGID) which is `100` for the users group. +Remember these values for later use. + +!!! note + + Yes we know it's not recommended to use the admin account but if you already know this then you wouldn't need to read this ;) + +------ + +## Folder Structure + +!!! attention + + To get Hardlinks and Atomic-Moves working with your Synology you will need to make use of **ONE** share with subfolders. + +For this example we're going to make use of a share called `data`. + +On the host (Synology) you will need to add `/volume1/` before it. So `/volume1/data` + +The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. + +These subfolders you need to create your self. + +*I'm using lower case on all folder on purpose, being Linux is case sensitive.* + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +## Breakdown of the Folder Structure + +### Torrent clients + +qBittorrent, Deluge, ruTorrent + +The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. + +```none +data +└── torrents + ├── movies + ├── music + └── tv +``` + +### Usenet clients + +NZBGet or SABnzbd + +The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. + +```none +data +└── usenet + ├── movies + ├── music + └── tv +``` + +### The arr(s) + +Sonarr, Radarr and Lidarr + +Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +### Media Server + +Plex, Emby, JellyFin and Bazarr + +Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. + +```none +data +└── media + ├── movies + ├── music + └── tv +``` + +------ + +## Appdata + +Your appdata will be stored in `/volume1/docker/appdata/{appname}` +These `{appname}` sub folders you need to create your self. (*This is a limitation of the Synology*) +We're going to do this in Putty or a similar program. + +```bash +sudo mkdir /volume1/docker/appdata +cd /volume1/docker/appdata +sudo mkdir radarr sonarr bazarr plex tautulli +``` + +So your appdata folder will look like this. + +```bash +ls -al /volume1/docker/appdata +``` + +```none +docker +└── appdata + ├── radarr + ├── sonarr + ├── bazarr + ├── plex + └── tautulli +``` + +------ + +## Needed files + +First we will download the `docker-compose.yml` file + +Download this [docker-compose.yml](https://github.com/TRaSH-/Guides-Synology-Templates/blob/main/docker-compose/docker-compose.yml){:target="_blank" rel="noopener noreferrer"} to your `/volume1/docker/appdata` location so you got your important stuff together. + +```bash +sudo wget https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/docker-compose/docker-compose.yml +``` + +??? question "What's included and What's not included" + + This docker-compose file will have the following docker containers included. + + - Radarr + - Sonarr + - Bazarr (Subtitle searcher and downloaded) + - Plex + - Tautulli + - Watchtower (automatic docker container updater at 4am) + + What's not included. + + I didn't add a downloader to it because it depends on what you prefer usenet/torrents and which client you prefer, so i created a new [Repository](https://github.com/TRaSH-/Guides-Synology-Templates){:target="_blank" rel="noopener noreferrer"} on Github where I provide and maintain some templates that you can find in the `template` folder ready to use with the main `docker-compose.yml`. + + The only thing you need to do is copy/paste what's inside the `.yml` file in to the main `docker-compose.yml`, the template also has the command what you need to use to create the [appdata](#appdata) folder that we explained earlier. + +Second we will download the `.env` file + +Download this [.env](https://github.com/TRaSH-/Guides-Synology-Templates/blob/main/docker-compose/.env){:target="_blank" rel="noopener noreferrer"} to your `/volume1/docker/appdata` location so you got your important stuff together. + +```bash +sudo wget https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/docker-compose/.env +``` + +------ + +### Changes you need to do + +The `.env` we downloaded holds the variables/information you need to change so everything works (I added also a description in the `.env` file) + +1. DOCKERCONFDIR (only change this if you know what you're doing and decide to use another path then in this guide used) +1. DOCKERDATADIR (only change this if you know what you're doing and decide to use another path then in this guide used) +1. PUID/PGID (this info you got earlier from [HERE](#puid-and-pgid)) +1. TZ (Change to your timezone) + +It holds more variables/information for other containers but they are described in the `.env` + +------ + +### Permissions + +Now we need to make sure that the newly created files and folders have the correct permissions. + +!!! note + If you're using another user then `admin` then you need to change it in the commands below !!! + +```bash +sudo chown -R admin:users /volume1/data /volume1/docker +sudo chmod -R a=,a+rX,u+w,g+w /volume1/data /volume1/docker +``` + +------ + +### Run the Docker Compose + +!!! important + make sure you deleted/removed all your existing dockers from the GUI and also remove your native installs of these applications !!! + +When you did all the above steps you only need to type the following in your `/volume1/docker/appdata` + +```bash +cd /volume1/docker/appdata +sudo docker-compose up -d +``` + +You will notice that all the images will be downloaded, and after that the containers will be started. If you get a error then look at the error what it says and try to fix it. If you still got issues then put your used docker-compose.yml on pastebin and join the guides-discord [here](https://trash-guides.info/discord){:target="_blank" rel="noopener noreferrer"} and provide the pastebin link with the error, have patience because of timezone differences. + +------ + +**Don't forget to look at the [Examples](/Hardlinks/Examples/) how to setup the paths inside your applications.** + +!!! attention + + If you need to do any changes only edit the `docker-compose.yml` file and activate the changes when you type `sudo docker-compose up -d` again. + + Any changes you do/did in the GUI will be reverted when you run the docker-compose. + + Just don't use the GUI !!! + +??? hint "docker-compose commands" + + - `sudo docker-compose up -d` (This Docker-compose command helps builds the image, then creates and starts Docker containers. The containers are from the services specified in the compose file. If the containers are already running and you run docker-compose up, it recreates the container.) + - `sudo docker-compose pull` (Pulls an image associated with a service defined in a docker-compose.yml) + - `sudo docker-compose down` (The Docker-compose down command also stops Docker containers like the stop command does. But it goes the extra mile. Docker-compose down, doesn’t just stop the containers, it also removes them.) + - `sudo docker system prune -a --volumes --force` (Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes.) diff --git a/docs/Hardlinks/How-to-setup-for/Unraid.md b/docs/Hardlinks/How-to-setup-for/Unraid.md new file mode 100644 index 000000000..be1d96b4e --- /dev/null +++ b/docs/Hardlinks/How-to-setup-for/Unraid.md @@ -0,0 +1,187 @@ +# Unraid + +!!! note + + The first thing you need to do is forget the suggested paths from the Spaceinvader One YouTube Tutorials, + + and don't use the predefined paths from the unraid templates. + + (Spaceinvader One YouTube guides are great to learn how to start with unraid or how to setup certain applications, and yes I did and still do use them. Probably the main reason why he's using those path is because they are predefined in the template) + +------ + +## Create the main share + +!!! attention + + To get Hardlinks and Atomic-Moves working with Unraid you will need to make use of **ONE** share with subfolders. + +For this example I'm using my own setup and preferred share `data`. + +Go to your dashboard and on the top select `shares` select `add share` . + +![!unraid-main-share](images/unraid-main-share.png) + +1. use `data` +1. if you got a cache drive and want to make use of it put it on `Yes` or keep it disabled (Hardlinks will stay in tact if you're using the cache) +1. click on `ADD SHARE` + +!!! note + + Keep in mind regarding the use of the Cache drive, The mover can't move files that are in use, like when seeding with torrents. You will need to shutdown your client or stop/pause the torrents so the mover can move them to your Array. + + With Usenet you won't have any issues. + +------ + +## Folder Structure + +On the host (Unraid) you will need to add `/mnt/user` before it. **So `/mnt/user/data`** + +The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. + +These subfolders you need to create your self, you can use krusader or winscp to create them or any other way you prefer. + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +*I'm using lower case on all folder on purpose, being Linux is case sensitive.* + +------ + +## Setting up the containers + +After you created all the needed folders it's time to setup the paths in the docker containers. + +Go to your dashboard and select your docker container you want to edit or if you're starting fresh add the docker containers you want to use or prefer. + +Unraid makes it actually pretty clear what's the Host Path and what's the Container Path. + +`Container Path:` => The path that will be used inside the container. + +`Host Path:` => The path on your Unraid Server (The Host). + +------ + +### Torrent clients + +qBittorrent, Deluge, ruTorrent + +![unraid-torrent-clients](images/unraid-torrent-clients.png) + +`Container Path:` => `/data/torrents/` + +`Host Path:` => `/mnt/user/data/torrents/` + +!!! info + + The reason why we use `/data/torrents/` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. + +```none +data +└── torrents + ├── movies + ├── music + └── tv +``` + +------ + +### Usenet clients + +NZBGet or SABnzbd + +![unraid-usenet-client](images/unraid-usenet-client.png) + +`Container Path:` => `/data/usenet/` + +`Host Path:` => `/mnt/user/data/usenet/` + +!!! info + + The reason why we use `/data/usenet/` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. + +```none +data +└── usenet + ├── movies + ├── music + └── tv +``` + +------ + +### The arr(s) + +Sonarr, Radarr and Lidarr + +![unraid-arr](images/unraid-arr.png) + +`Container Path:` => `/data` + +`Host Path:` => `/mnt/user/data/` + +!!! info + + Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. + +```none +data +├── torrents +│ ├── movies +│ ├── music +│ └── tv +├── usenet +│ ├── movies +│ ├── music +│ └── tv +└── media + ├── movies + ├── music + └── tv +``` + +------ + +### Media Server + +Plex, Emby, JellyFin and Bazarr + +![unraid-media-server](images/unraid-media-server.png) + +`Container Path:` => `/data/media` + +`Host Path:` => `/mnt/user/data/media/` + +!!! info + + Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. + +```none +data +└── media + ├── movies + ├── music + └── tv +``` + +------ + +## Final Result + +![!unraid-final-result](images/unraid-final-result.png) + +**Don't forget to look at the [Examples](/Hardlinks/Examples/) how to setup the paths inside your applications.** diff --git a/docs/Misc/images/ds-deluge-preferences-downloads.png b/docs/Hardlinks/How-to-setup-for/images/ds-deluge-preferences-downloads.png similarity index 100% rename from docs/Misc/images/ds-deluge-preferences-downloads.png rename to docs/Hardlinks/How-to-setup-for/images/ds-deluge-preferences-downloads.png diff --git a/docs/Misc/images/ds-nzbget-settings-categories.png b/docs/Hardlinks/How-to-setup-for/images/ds-nzbget-settings-categories.png similarity index 100% rename from docs/Misc/images/ds-nzbget-settings-categories.png rename to docs/Hardlinks/How-to-setup-for/images/ds-nzbget-settings-categories.png diff --git a/docs/Misc/images/ds-nzbget-settings-paths.png b/docs/Hardlinks/How-to-setup-for/images/ds-nzbget-settings-paths.png similarity index 100% rename from docs/Misc/images/ds-nzbget-settings-paths.png rename to docs/Hardlinks/How-to-setup-for/images/ds-nzbget-settings-paths.png diff --git a/docs/Misc/images/ds-qbt-options-downloads.png b/docs/Hardlinks/How-to-setup-for/images/ds-qbt-options-downloads.png similarity index 100% rename from docs/Misc/images/ds-qbt-options-downloads.png rename to docs/Hardlinks/How-to-setup-for/images/ds-qbt-options-downloads.png diff --git a/docs/Misc/images/ds-radarr-add-new.png b/docs/Hardlinks/How-to-setup-for/images/ds-radarr-add-new.png similarity index 100% rename from docs/Misc/images/ds-radarr-add-new.png rename to docs/Hardlinks/How-to-setup-for/images/ds-radarr-add-new.png diff --git a/docs/Misc/images/ds-radarr-movies.png b/docs/Hardlinks/How-to-setup-for/images/ds-radarr-movies.png similarity index 100% rename from docs/Misc/images/ds-radarr-movies.png rename to docs/Hardlinks/How-to-setup-for/images/ds-radarr-movies.png diff --git a/docs/Misc/images/ds-radarr-root-folder.png b/docs/Hardlinks/How-to-setup-for/images/ds-radarr-root-folder.png similarity index 100% rename from docs/Misc/images/ds-radarr-root-folder.png rename to docs/Hardlinks/How-to-setup-for/images/ds-radarr-root-folder.png diff --git a/docs/Misc/images/ds-rtorrent-settings-autotools.png b/docs/Hardlinks/How-to-setup-for/images/ds-rtorrent-settings-autotools.png similarity index 100% rename from docs/Misc/images/ds-rtorrent-settings-autotools.png rename to docs/Hardlinks/How-to-setup-for/images/ds-rtorrent-settings-autotools.png diff --git a/docs/Misc/images/ds-rtorrent-settings-downloads.png b/docs/Hardlinks/How-to-setup-for/images/ds-rtorrent-settings-downloads.png similarity index 100% rename from docs/Misc/images/ds-rtorrent-settings-downloads.png rename to docs/Hardlinks/How-to-setup-for/images/ds-rtorrent-settings-downloads.png diff --git a/docs/Misc/images/ds-rtorrent.rc.png b/docs/Hardlinks/How-to-setup-for/images/ds-rtorrent.rc.png similarity index 100% rename from docs/Misc/images/ds-rtorrent.rc.png rename to docs/Hardlinks/How-to-setup-for/images/ds-rtorrent.rc.png diff --git a/docs/Misc/images/ds-sabnzbd-categories.png b/docs/Hardlinks/How-to-setup-for/images/ds-sabnzbd-categories.png similarity index 100% rename from docs/Misc/images/ds-sabnzbd-categories.png rename to docs/Hardlinks/How-to-setup-for/images/ds-sabnzbd-categories.png diff --git a/docs/Misc/images/ds-sabnzbd-folders.png b/docs/Hardlinks/How-to-setup-for/images/ds-sabnzbd-folders.png similarity index 100% rename from docs/Misc/images/ds-sabnzbd-folders.png rename to docs/Hardlinks/How-to-setup-for/images/ds-sabnzbd-folders.png diff --git a/docs/Misc/images/ds-sonarr-add-new.png b/docs/Hardlinks/How-to-setup-for/images/ds-sonarr-add-new.png similarity index 100% rename from docs/Misc/images/ds-sonarr-add-new.png rename to docs/Hardlinks/How-to-setup-for/images/ds-sonarr-add-new.png diff --git a/docs/Misc/images/ds-sonarr-root-folder.png b/docs/Hardlinks/How-to-setup-for/images/ds-sonarr-root-folder.png similarity index 100% rename from docs/Misc/images/ds-sonarr-root-folder.png rename to docs/Hardlinks/How-to-setup-for/images/ds-sonarr-root-folder.png diff --git a/docs/Misc/images/ds-sonarr-tv.png b/docs/Hardlinks/How-to-setup-for/images/ds-sonarr-tv.png similarity index 100% rename from docs/Misc/images/ds-sonarr-tv.png rename to docs/Hardlinks/How-to-setup-for/images/ds-sonarr-tv.png diff --git a/docs/Misc/images/synology-control-panel.png b/docs/Hardlinks/How-to-setup-for/images/synology-control-panel.png similarity index 100% rename from docs/Misc/images/synology-control-panel.png rename to docs/Hardlinks/How-to-setup-for/images/synology-control-panel.png diff --git a/docs/Misc/images/synology-id.png b/docs/Hardlinks/How-to-setup-for/images/synology-id.png similarity index 100% rename from docs/Misc/images/synology-id.png rename to docs/Hardlinks/How-to-setup-for/images/synology-id.png diff --git a/docs/Misc/images/unraid-arr.png b/docs/Hardlinks/How-to-setup-for/images/unraid-arr.png similarity index 100% rename from docs/Misc/images/unraid-arr.png rename to docs/Hardlinks/How-to-setup-for/images/unraid-arr.png diff --git a/docs/Misc/images/unraid-final-result.png b/docs/Hardlinks/How-to-setup-for/images/unraid-final-result.png similarity index 100% rename from docs/Misc/images/unraid-final-result.png rename to docs/Hardlinks/How-to-setup-for/images/unraid-final-result.png diff --git a/docs/Misc/images/unraid-main-share.png b/docs/Hardlinks/How-to-setup-for/images/unraid-main-share.png similarity index 100% rename from docs/Misc/images/unraid-main-share.png rename to docs/Hardlinks/How-to-setup-for/images/unraid-main-share.png diff --git a/docs/Misc/images/unraid-media-server.png b/docs/Hardlinks/How-to-setup-for/images/unraid-media-server.png similarity index 100% rename from docs/Misc/images/unraid-media-server.png rename to docs/Hardlinks/How-to-setup-for/images/unraid-media-server.png diff --git a/docs/Misc/images/unraid-torrent-clients.png b/docs/Hardlinks/How-to-setup-for/images/unraid-torrent-clients.png similarity index 100% rename from docs/Misc/images/unraid-torrent-clients.png rename to docs/Hardlinks/How-to-setup-for/images/unraid-torrent-clients.png diff --git a/docs/Misc/images/unraid-usenet-client.png b/docs/Hardlinks/How-to-setup-for/images/unraid-usenet-client.png similarity index 100% rename from docs/Misc/images/unraid-usenet-client.png rename to docs/Hardlinks/How-to-setup-for/images/unraid-usenet-client.png diff --git a/docs/Hardlinks/How-to-setup-for/index.md b/docs/Hardlinks/How-to-setup-for/index.md new file mode 100644 index 000000000..d78e9ad83 --- /dev/null +++ b/docs/Hardlinks/How-to-setup-for/index.md @@ -0,0 +1,5 @@ +# How to setup for + +Here you will find a collection How to setup Hardlinks and Instant Moves(Atomic Moves) Guides. + +Choose on the left your installation method. diff --git a/docs/Misc/images/deluge-preferences-downloads.png b/docs/Hardlinks/images/deluge-preferences-downloads.png similarity index 100% rename from docs/Misc/images/deluge-preferences-downloads.png rename to docs/Hardlinks/images/deluge-preferences-downloads.png diff --git a/docs/Misc/images/nzbget-settings-categories.png b/docs/Hardlinks/images/nzbget-settings-categories.png similarity index 100% rename from docs/Misc/images/nzbget-settings-categories.png rename to docs/Hardlinks/images/nzbget-settings-categories.png diff --git a/docs/Misc/images/nzbget-settings-paths.png b/docs/Hardlinks/images/nzbget-settings-paths.png similarity index 100% rename from docs/Misc/images/nzbget-settings-paths.png rename to docs/Hardlinks/images/nzbget-settings-paths.png diff --git a/docs/Misc/images/qbt-options-downloads.png b/docs/Hardlinks/images/qbt-options-downloads.png similarity index 100% rename from docs/Misc/images/qbt-options-downloads.png rename to docs/Hardlinks/images/qbt-options-downloads.png diff --git a/docs/Misc/images/radarr-add-new.png b/docs/Hardlinks/images/radarr-add-new.png similarity index 100% rename from docs/Misc/images/radarr-add-new.png rename to docs/Hardlinks/images/radarr-add-new.png diff --git a/docs/Misc/images/radarr-enable-hardlinks.png b/docs/Hardlinks/images/radarr-enable-hardlinks.png similarity index 100% rename from docs/Misc/images/radarr-enable-hardlinks.png rename to docs/Hardlinks/images/radarr-enable-hardlinks.png diff --git a/docs/Misc/images/radarr-movies.png b/docs/Hardlinks/images/radarr-movies.png similarity index 100% rename from docs/Misc/images/radarr-movies.png rename to docs/Hardlinks/images/radarr-movies.png diff --git a/docs/Misc/images/radarr-root-folder.png b/docs/Hardlinks/images/radarr-root-folder.png similarity index 100% rename from docs/Misc/images/radarr-root-folder.png rename to docs/Hardlinks/images/radarr-root-folder.png diff --git a/docs/Misc/images/rtorrent-settings-autotools.png b/docs/Hardlinks/images/rtorrent-settings-autotools.png similarity index 100% rename from docs/Misc/images/rtorrent-settings-autotools.png rename to docs/Hardlinks/images/rtorrent-settings-autotools.png diff --git a/docs/Misc/images/rtorrent-settings-downloads.png b/docs/Hardlinks/images/rtorrent-settings-downloads.png similarity index 100% rename from docs/Misc/images/rtorrent-settings-downloads.png rename to docs/Hardlinks/images/rtorrent-settings-downloads.png diff --git a/docs/Misc/images/rtorrent.rc.png b/docs/Hardlinks/images/rtorrent.rc.png similarity index 100% rename from docs/Misc/images/rtorrent.rc.png rename to docs/Hardlinks/images/rtorrent.rc.png diff --git a/docs/Misc/images/sabnzbd-categories.png b/docs/Hardlinks/images/sabnzbd-categories.png similarity index 100% rename from docs/Misc/images/sabnzbd-categories.png rename to docs/Hardlinks/images/sabnzbd-categories.png diff --git a/docs/Misc/images/sabnzbd-folders.png b/docs/Hardlinks/images/sabnzbd-folders.png similarity index 100% rename from docs/Misc/images/sabnzbd-folders.png rename to docs/Hardlinks/images/sabnzbd-folders.png diff --git a/docs/Misc/images/sonarr-add-new.png b/docs/Hardlinks/images/sonarr-add-new.png similarity index 100% rename from docs/Misc/images/sonarr-add-new.png rename to docs/Hardlinks/images/sonarr-add-new.png diff --git a/docs/Misc/images/sonarr-enable-hardlinks.png b/docs/Hardlinks/images/sonarr-enable-hardlinks.png similarity index 100% rename from docs/Misc/images/sonarr-enable-hardlinks.png rename to docs/Hardlinks/images/sonarr-enable-hardlinks.png diff --git a/docs/Misc/images/sonarr-root-folder.png b/docs/Hardlinks/images/sonarr-root-folder.png similarity index 100% rename from docs/Misc/images/sonarr-root-folder.png rename to docs/Hardlinks/images/sonarr-root-folder.png diff --git a/docs/Misc/images/sonarr-tv.png b/docs/Hardlinks/images/sonarr-tv.png similarity index 100% rename from docs/Misc/images/sonarr-tv.png rename to docs/Hardlinks/images/sonarr-tv.png diff --git a/docs/Misc/.pages b/docs/Misc/.pages index 11048c23d..53708b97e 100644 --- a/docs/Misc/.pages +++ b/docs/Misc/.pages @@ -1,6 +1,5 @@ nav: - Home: index.md - How to provide a docker compose: how-to-provide-a-docker-compose.md - - How To Set Up Hardlinks and Atomic-Moves: how-to-set-up-hardlinks-and-atomic-moves.md - Setup TorGuard for port forwarding: How-to-setup-Torguard-for-port-forwarding.md - x265-4k and Golden Rule: x265-4k.md \ No newline at end of file diff --git a/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md b/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md deleted file mode 100644 index b080b277e..000000000 --- a/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md +++ /dev/null @@ -1,1049 +0,0 @@ -# How To Set Up Hardlinks and Atomic-Moves - -## Description - -!!! info - - If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should. - - Here we will try to explains it. - - The paths you use on the inside matter. Because of how Docker’s volumes work, passing in two or three volumes such as the commonly suggested `/tv`, `/movies` and `/downloads` makes them look like two or three file systems, even if they aren’t. This means hard links won’t work and instead of an instant move, a slower and more I/O intensive copy + delete is used. - -So you want one of the following ? - -- Instant moves (Atomic-Moves) during import of the *arr (useful when using Usenet)? -- You don't want to use twice the storage when using torrents. (hardlinks)? -- You want to perma seed? - -Then keep reading. - -??? faq "FAQ" - - ### FAQ - - 1. Q: **What are the `*arr`?** - - - Sonarr, Radarr, Lidarr, etc. - - 1. Q: **What are hardlinks?** - - - Short answer is "having a file in multiple folders" without using up your storage, [Long Answer](https://medium.com/@krisbredemeier/the-difference-between-hard-links-and-soft-or-symbolic-links-780149244f7d){:target="_blank" rel="noopener noreferrer"}. - - 1. Q: **What's Atomic Moves?** - - - A real move and not a copy file from download folder to media folder and then delete file from download folder. - ------- - -### How to Setup for - -- [DockSTARTer](#dockstarter) -- [UnRaid](#unraid) -- [Synology](#synology) -- [Docker](#docker) -- [Bare Metal (Native)](#native) - -??? summary "DockSTARTer" - - #### DockSTARTer - - !!! note - - I'm using the default paths in this example, and will keep the other paths unchanged so nothing will break if you make a mistake. - - ##### Folder Structure - - We're going to use a mounted drive that we're going to use as storage for downloads and your media. - In this example the mounted drive will be mounted to `/mnt/` with the following folder structure. - - ``` - storage - ├── downloads - | ├── torrents - │ | ├── movies - │ | ├── music - │ | └── tv - | └── usenet - │ ├── movies - │ ├── music - │ └── tv - └── medialibrary - ├── movies - ├── music - └── tv - ``` - - ##### Changes to the .env - To accomplish this we need to change first a few paths in your `.env` (Usually `~/.docker/compose/.env`) - - ``` yaml - # Global Settings - COMPOSE_HTTP_TIMEOUT=60 - DOCKERCONFDIR=~/.config/appdata - DOCKERGID=999 - DOCKERHOSTNAME=DockSTARTer - DOCKERLOGGING_MAXFILE=10 - DOCKERLOGGING_MAXSIZE=200k - DOCKERSTORAGEDIR=/mnt/storage - PGID=1000 - PUID=1000 - TZ=America/Chicago - - # DEPRECATED Settings (will be removed at the end of 2020) - DOCKERSHAREDDIR=~/shared - DOWNLOADSDIR=/mnt/downloads - MEDIADIR_AUDIOBOOKS=/mnt/medialibrary/audiobooks - MEDIADIR_BOOKS=/mnt/medialibrary/books - MEDIADIR_COMICS=/mnt/medialibrary/comics - MEDIADIR_MOVIES=/mnt/medialibrary/movies - MEDIADIR_MUSIC=/mnt/medialibrary/music - MEDIADIR_TV=/mnt/medialibrary/tv - ``` - - ##### Changes to your paths - - When that's all set then you will need to change the paths you're going to use in the containers from: - - `/downloads` => `/storage/downloads` - - `/audiobooks` => `/storage/medialibrary/audiobooks` - - `/books` => `/storage/medialibrary/books` - - `/comics` => `/storage/medialibrary/comics` - - `/movies` => `/storage/medialibrary/movies` - - `/music` => `/storage/medialibrary/music` - - `/tv` => `/storage/medialibrary/tv` - - ##### DockSTARTer Examples - - !!! info - - The screenshots in the examples are using the following root path `/storage` - - - - ??? example "Sonarr Examples" - - ###### Sonarr - - `Settings` => `Media Management` => `Importing` - - ![sonarr-enable-hardlinks](images/sonarr-enable-hardlinks.png) - - `Settings` => `Media Management` => `Root Folders` - - ![ds-sonarr-root-folder](images/ds-sonarr-root-folder.png) - - `Series` => `Add New` - - ![ds-sonarr-add-new](images/ds-sonarr-add-new.png) - - ![ds-sonarr-tv](images/ds-sonarr-tv.png) - - ??? example "Radarr Examples" - - ###### Radarr - - `Settings` => `Media Management` => `Importing` - - ![radarr-enable-hardlinks](images/radarr-enable-hardlinks.png) - - `Settings` => `Media Management` => `Root Folders` - - ![ds-radarr-root-folder](images/ds-radarr-root-folder.png) - - `Movies` => `Add New` - - ![ds-radarr-add-new](images/ds-radarr-add-new.png) - - ![ds-radarr-movies](images/ds-radarr-movies.png) - - ??? example "SABnzbd Examples" - - ###### SABnzbd - - `SABnzbd config` => `Folders` - - ![ds-sabnzbd-folders](images/ds-sabnzbd-folders.png) - - `SABnzbd config` => `Categories` - - ![ds-sabnzbd-categories](images/ds-sabnzbd-categories.png) - - ??? example "NZBGet Examples" - - ###### NZBGet - - `Settings` => `PATHS` - - ![ds-nzbget-settings-paths](images/ds-nzbget-settings-paths.png) - - `Settings` => `CATEGORIES` - - ![ds-nzbget-settings-categories](images/ds-nzbget-settings-categories.png) - - ??? example "qBittorrent Examples" - - ###### qBittorrent - - `Options` => `Downloads` - - ![ds-qbt-options-downloads](images/ds-qbt-options-downloads.png) - - ??? example "Deluge Example" - - ###### Deluge - - `Preferences` => `Downloads` - - ![ds-deluge-preferences-downloads](images/ds-deluge-preferences-downloads.png) - - ??? example "ruTorrent Examples" - - ###### ruTorrent - - `../config/rtorrent/config/rtorrent.rc` (path to your appdata) - - ![ds-rtorrent.rc](images/ds-rtorrent.rc.png) - - `Settings` => `Downloads` - - ![ds-rtorrent-settings-downloads](images/ds-rtorrent-settings-downloads.png) - - `Settings` => `Autotools` - - ![ds-rtorrent-settings-autotools](images/ds-rtorrent-settings-autotools.png) - -??? summary "UnRaid" - - #### UnRaid - - !!! note - - The first thing you need to do is forget the suggested paths from the Spaceinvader One YouTube Tutorials, - - and don't use the predefined paths from the unraid templates. - - (Spaceinvader One YouTube guides are great to learn how to start with unraid or how to setup certain applications, and yes I did and still do use them. Probably the main reason why he's using those path is because they are predefined in the template) - - ------ - - ##### Create the main share - - !!! attention - - To get Hardlinks and Atomic-Moves working with Unraid you will need to make use of **ONE** share with subfolders. - - For this example I'm using my own setup and preferred share `data`. - - Go to your dashboard and on the top select `shares` select `add share` . - - ![!unraid-main-share](images/unraid-main-share.png) - - 1. use `data` - 1. if you got a cache drive and want to make use of it put it on `Yes` or keep it disabled (Hardlinks will stay in tact if you're using the cache) - 1. click on `ADD SHARE` - - !!! note - - Keep in mind regarding the use of the Cache drive, The mover can't move files that are in use, like when seeding with torrents. You will need to shutdown your client or stop/pause the torrents so the mover can move them to your Array. - - With Usenet you won't have any issues. - - ------ - - ##### Folder Structure - - On the host (Unraid) you will need to add `/mnt/user` before it. **So `/mnt/user/data`** - - The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. - - These subfolders you need to create your self, you can use krusader or winscp to create them or any other way you prefer. - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - *I'm using lower case on all folder on purpose, being Linux is case sensitive.* - - ------ - - ##### Setting up the containers - - After you created all the needed folders it's time to setup the paths in the docker containers. - - Go to your dashboard and select your docker container you want to edit or if you're starting fresh add the docker containers you want to use or prefer. - - Unraid makes it actually pretty clear what's the Host Path and what's the Container Path. - - `Container Path:` => The path that will be used inside the container. - - `Host Path:` => The path on your Unraid Server (The Host). - - ------ - - ##### Torrent clients - - qBittorrent, Deluge, ruTorrent - - ![unraid-torrent-clients](images/unraid-torrent-clients.png) - - `Container Path:` => `/data/torrents/` - - `Host Path:` => `/mnt/user/data/torrents/` - - !!! info - - The reason why we use `/data/torrents/` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. - - ```none - data - └── torrents - ├── movies - ├── music - └── tv - ``` - - ------ - - ##### Usenet clients - - NZBGet or SABnzbd - - ![unraid-usenet-client](images/unraid-usenet-client.png) - - `Container Path:` => `/data/usenet/` - - `Host Path:` => `/mnt/user/data/usenet/` - - !!! info - - The reason why we use `/data/usenet/` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. - - ```none - data - └── usenet - ├── movies - ├── music - └── tv - ``` - - ------ - - ##### The arr(s) - - Sonarr, Radarr and Lidarr - - ![unraid-arr](images/unraid-arr.png) - - `Container Path:` => `/data` - - `Host Path:` => `/mnt/user/data/` - - !!! info - - Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ------ - - ##### Media Server - - Plex, Emby, JellyFin and Bazarr - - ![unraid-media-server](images/unraid-media-server.png) - - `Container Path:` => `/data/media` - - `Host Path:` => `/mnt/user/data/media/` - - !!! info - - Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. - - ```none - data - └── media - ├── movies - ├── music - └── tv - ``` - - ------ - - ##### Final Result - - ![!unraid-final-result](images/unraid-final-result.png) - - **Don't forget to look at the [Examples](#examples) how to setup the paths inside the containers.** - -??? summary "Synology" - - #### Synology - - !!! note - - Being I don't have a Synology myself and I kind of hate the Synology GUI for the dockers, I'm doing this with the use of docker-compose. - - This works like 10x faster then the GUI and after adding it shows up in the GUI. - - Thnx to faxity for the initial compose that I used to create the Synology Guide. - - We need to get some information that we need later to setup the docker-compose file. - - ##### PUID and PGID - - In order for the Docker container to access the shares on the Synology, - we need to give it the same permissions as your main user who has access to those shares. - For this we need to figure out the PUID and the PGID of the user having access to your shares. - - You will need to SSH into your Synology. - If you didn't already enable it you need to do that first - - ![!synology-control-panel](images/synology-control-panel.png) - - Then use a program like Putty and SSH to your Synology. - - Login if you get a popup asking if you want to trust the key, - Just press `OK` or `ACCEPT` - - Enter the login information of your main Synology user account. - - ![!synology-id](images/synology-id.png) - - Once logged in type `id`. - This will show your UID (aka PUID). - Which in this screenshot is `1026` for the administrator - and the GID (aka PGID) which is `100` for the users group. - Remember these values for later use. - - !!! note - - Yes we know it's not recommended to use the admin account but if you already know this then you wouldn't need to read this ;) - - ------ - - ##### Folder Structure - - !!! attention - - To get Hardlinks and Atomic-Moves working with your Synology you will need to make use of **ONE** share with subfolders. - - For this example we're going to make use of a share called `data`. - - On the host (Synology) you will need to add `/volume1/` before it. So `/volume1/data` - - The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. - - These subfolders you need to create your self. - - *I'm using lower case on all folder on purpose, being Linux is case sensitive.* - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ??? summary "Breakdown of the Folder Structure" - - ##### Breakdown of the Folder Structure - - ###### Torrent clients - - qBittorrent, Deluge, ruTorrent - - The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. - - ```none - data - └── torrents - ├── movies - ├── music - └── tv - ``` - - ###### Usenet clients - - NZBGet or SABnzbd - - The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. - - ```none - data - └── usenet - ├── movies - ├── music - └── tv - ``` - - ###### The arr(s) - - Sonarr, Radarr and Lidarr - - Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ###### Media Server - - Plex, Emby, JellyFin and Bazarr - - Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. - - ```none - data - └── media - ├── movies - ├── music - └── tv - ``` - - ------ - - ##### Appdata - - Your appdata will be stored in `/volume1/docker/appdata/{appname}` - These `{appname}` sub folders you need to create your self. (*This is a limitation of the Synology*) - We're going to do this in Putty or a similar program. - - ```bash - sudo mkdir /volume1/docker/appdata - cd /volume1/docker/appdata - sudo mkdir radarr sonarr bazarr plex tautulli - ``` - - So your appdata folder will look like this. - - ```bash - ls -al /volume1/docker/appdata - ``` - - ```none - docker - └── appdata - ├── radarr - ├── sonarr - ├── bazarr - ├── plex - └── tautulli - ``` - - ------ - - ##### Needed files - - First we will download the `docker-compose.yml` file - - Download this [docker-compose.yml](https://github.com/TRaSH-/Guides-Synology-Templates/blob/main/docker-compose/docker-compose.yml){:target="_blank" rel="noopener noreferrer"} to your `/volume1/docker/appdata` location so you got your important stuff together. - - ```bash - sudo wget https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/docker-compose/docker-compose.yml - ``` - - ??? question "What's included and What's not included" - - This docker-compose file will have the following docker containers included. - - - Radarr - - Sonarr - - Bazarr (Subtitle searcher and downloaded) - - Plex - - Tautulli - - Watchtower (automatic docker container updater at 4am) - - What's not included. - - I didn't add a downloader to it because it depends on what you prefer usenet/torrents and which client you prefer, so i created a new [Repository](https://github.com/TRaSH-/Guides-Synology-Templates){:target="_blank" rel="noopener noreferrer"} on Github where I provide and maintain some templates that you can find in the `template` folder ready to use with the main `docker-compose.yml`. - - The only thing you need to do is copy/paste what's inside the `.yml` file in to the main `docker-compose.yml`, the template also has the command what you need to use to create the [appdata](#appdata) folder that we explained earlier. - - Second we will download the `.env` file - - Download this [.env](https://github.com/TRaSH-/Guides-Synology-Templates/blob/main/docker-compose/.env){:target="_blank" rel="noopener noreferrer"} to your `/volume1/docker/appdata` location so you got your important stuff together. - - ```bash - sudo wget https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/docker-compose/.env - ``` - - ------ - - ##### Changes you need to do - - The `.env` we downloaded holds the variables/information you need to change so everything works (I added also a description in the `.env` file) - - 1. DOCKERCONFDIR (only change this if you know what you're doing and decide to use another path then in this guide used) - 1. DOCKERDATADIR (only change this if you know what you're doing and decide to use another path then in this guide used) - 1. PUID/PGID (this info you got earlier from [HERE](#puid-and-pgid)) - 1. TZ (Change to your timezone) - - It holds more variables/information for other containers but they are described in the `.env` - - ------ - - ##### Permissions - - Now we need to make sure that the newly created files and folders have the correct permissions. - - !!! note - If you're using another user then `admin` then you need to change it in the commands below !!! - - ```bash - sudo chown -R admin:users /volume1/data /volume1/docker - sudo chmod -R a=,a+rX,u+w,g+w /volume1/data /volume1/docker - ``` - - ------ - - ##### Run the Docker Compose - - !!! important - make sure you deleted/removed all your existing dockers from the GUI and also remove your native installs of these applications !!! - - When you did all the above steps you only need to type the following in your `/volume1/docker/appdata` - - ```bash - cd /volume1/docker/appdata - sudo docker-compose up -d - ``` - - You will notice that all the images will be downloaded, and after that the containers will be started. If you get a error then look at the error what it says and try to fix it. If you still got issues then put your used docker-compose.yml on pastebin and join the guides-discord [here](https://trash-guides.info/discord){:target="_blank" rel="noopener noreferrer"} and provide the pastebin link with the error, have patience because of timezone differences. - - ------ - - **Don't forget to look at the [Examples](#examples) how to setup the paths inside the containers.** - - !!! attention - - If you need to do any changes only edit the `docker-compose.yml` file and activate the changes when you type `sudo docker-compose up -d` again. - - Any changes you do/did in the GUI will be reverted when you run the docker-compose. - - Just don't use the GUI !!! - - ??? hint "docker-compose commands" - - - `sudo docker-compose up -d` (This Docker-compose command helps builds the image, then creates and starts Docker containers. The containers are from the services specified in the compose file. If the containers are already running and you run docker-compose up, it recreates the container.) - - `sudo docker-compose pull` (Pulls an image associated with a service defined in a docker-compose.yml) - - `sudo docker-compose down` (The Docker-compose down command also stops Docker containers like the stop command does. But it goes the extra mile. Docker-compose down, doesn’t just stop the containers, it also removes them.) - - `sudo docker system prune -a --volumes --force` (Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes.) - -??? summary "Docker" - - #### Docker - - !!! tip - - If you're new to dockers and want a easy setup I suggest to take a look at [DockSTARTer](https://dockstarter.com/){:target="_blank" rel="noopener noreferrer"}. - I've also created a short guide [HERE](#dockstarter) where I explain the settings for the most used applications. - - The main goal of DockSTARTer is to make it quick and easy to get up and running with Docker. - You may choose to rely on DockSTARTer for various changes to your Docker system or use DockSTARTer as a stepping stone and learn to do more advanced configurations. - - *DockSTARTer was actually my first steps in to the world of dockers.* - - !!! note - - I'm not going to explain how to get dockers installed and running, I will only explain which folder structure we recommend. - - ##### Folder Structure - - !!! attention - - It doesn't really matter which path you use for your media and appdata, - - the only thing you should avoid is `/home`. - - Because user folders in `/home` are expected to have some restrictive permissions. - - It just could end up creating a permissions mess, so it's better to just avoid entirely. - - For this example we're going to make use of a share called `data`. - - The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. - - *In this examples I'm using lower case on all folder on purpose, being Linux is case sensitive.* - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ??? summary "Breakdown of the Folder Structure" - - ##### Breakdown of the Folder Structure - - ###### Torrent clients - - qBittorrent, Deluge, ruTorrent - - The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. - - ```none - data - └── torrents - ├── movies - ├── music - └── tv - ``` - - ###### Usenet clients - - NZBGet or SABnzbd - - The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. - - ```none - data - └── usenet - ├── movies - ├── music - └── tv - ``` - - ###### The arr(s) - - Sonarr, Radarr and Lidarr - - Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ###### Media Server - - Plex, Emby, JellyFin and Bazarr - - Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. - - ```none - data - └── media - ├── movies - ├── music - └── tv - ``` - - **Don't forget to look at the [Examples](#examples) how to setup the paths inside the containers.** - -??? summary "Bare Metal (Native)" - - #### Native - - !!! note - - I'm not going to explain how to install all the applications, I will only explain which folder structure we recommend. - - ------ - - ##### Folder Structure - - - !!! attention - - It doesn't really matter which path you use for your media, - - the only thing you should avoid is `/home`. - - Because user folders in `/home` are expected to have some restrictive permissions. - - It just could end up creating a permissions mess, so it's better to just avoid entirely. - - For this example we're going to make use of a share called `data`. - - The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin. - - *I'm using lower case on all folder on purpose, being Linux is case sensitive.* - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ??? summary "Breakdown of the Folder Structure" - - ##### Breakdown of the Folder Structure - - ###### Torrent clients - - qBittorrent, Deluge, ruTorrent - - The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`. - - ```none - data - └── torrents - ├── movies - ├── music - └── tv - ``` - - ###### Usenet clients - - NZBGet or SABnzbd - - The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`. - - ```none - data - └── usenet - ├── movies - ├── music - └── tv - ``` - - ###### The arr(s) - - Sonarr, Radarr and Lidarr - - Sonarr, Radarr and Lidarr gets access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete. - - ```none - data - ├── torrents - │ ├── movies - │ ├── music - │ └── tv - ├── usenet - │ ├── movies - │ ├── music - │ └── tv - └── media - ├── movies - ├── music - └── tv - ``` - - ###### Media Server - - Plex, Emby, JellyFin and Bazarr - - Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders. - - ```none - data - └── media - ├── movies - ├── music - └── tv - ``` - - ------ - - ##### Permissions - - Recursively chown user and group and Recursively chmod to 775/664 - - ```bash - sudo chown -R $USER:$USER /data - sudo chmod -R a=,a+rX,u+w,g+w /data - ``` - - **Don't forget to look at the [Examples](#examples) how to setup the paths inside the containers.** - ------- - -### Examples - -!!! info - - Pick one path layout and use it for all of them. - - It doesn't matter if you prefer to use `/data`, `/shared`, `/storage` or whatever. - - The screenshots in the examples are using the following root path `/data` - -- [Sonarr](#sonarr) -- [Radarr](#radarr) -- [SABnzbd](#sabnzbd) -- [NZBGet](#nzbget) -- [qBittorrent](#qbittorent) -- [Deluge](#deluge) -- [ruTorrent](#rutorrent) - -??? example "Sonarr Examples" - - #### Sonarr - - `Settings` => `Media Management` => `Importing` - - ![sonarr-enable-hardlinks](images/sonarr-enable-hardlinks.png) - - `Settings` => `Media Management` => `Root Folders` - - ![sonarr-root-folder](images/sonarr-root-folder.png) - - `Series` => `Add New` - - ![sonarr-add-new](images/sonarr-add-new.png) - - ![sonarr-tv](images/sonarr-tv.png) - -??? example "Radarr Examples" - - #### Radarr - - `Settings` => `Media Management` => `Importing` - - ![radarr-enable-hardlinks](images/radarr-enable-hardlinks.png) - - `Settings` => `Media Management` => `Root Folders` - - ![radarr-root-folder](images/radarr-root-folder.png) - - `Movies` => `Add New` - - ![radarr-add-new](images/radarr-add-new.png) - - ![radarr-movies](images/radarr-movies.png) - -??? example "SABnzbd Examples" - - #### SABnzbd - - `SABnzbd config` => `Folders` - - ![sabnzbd-folders](images/sabnzbd-folders.png) - - `SABnzbd config` => `Categories` - - ![sabnzbd-categories](images/sabnzbd-categories.png) - -??? example "NZBGet Examples" - - #### NZBGet - - `Settings` => `PATHS` - - ![nzbget-settings-paths](images/nzbget-settings-paths.png) - - `Settings` => `CATEGORIES` - - ![nzbget-settings-categories](images/nzbget-settings-categories.png) - -??? example "qBittorrent Examples" - - #### qBittorrent - - `Options` => `Downloads` - - ![qbt-options-downloads](images/qbt-options-downloads.png) - -??? example "Deluge Example" - - #### Deluge - - `Preferences` => `Downloads` - - ![deluge-preferences-downloads](images/deluge-preferences-downloads.png) - -??? example "ruTorrent Examples" - - #### ruTorrent - - `../config/rtorrent/config/rtorrent.rc` (path to your appdata) - - ![rtorrent.rc](images/rtorrent.rc.png) - - `Settings` => `Downloads` - - ![rtorrent-settings-downloads](images/rtorrent-settings-downloads.png) - - `Settings` => `Autotools` - - ![rtorrent-settings-autotools](images/rtorrent-settings-autotools.png) - ------- - -Big Thnx to [fryfrog](https://github.com/fryfrog){:target="_blank" rel="noopener noreferrer"} for his [Docker Guide](https://wiki.servarr.com/Docker_Guide){:target="_blank" rel="noopener noreferrer"} that I used as basis for this guide. diff --git a/mkdocs.yml b/mkdocs.yml index c1b23bd70..893ad9d48 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -59,8 +59,9 @@ plugins: Sonarr/V3/Remote-Path-Mappings-explained-for-Sonarr.md: Sonarr/V3/Sonarr-remote-path-mapping.md Misc/Discord-Notifier-Basic-Setup.md: Notifiarr/Quick-Start.md Misc/Discord-Notifiarr-Setup.md: Notifiarr/Quick-Start.md - hardlinks.md: Misc/how-to-set-up-hardlinks-and-atomic-moves.md - hardlink.md: Misc/how-to-set-up-hardlinks-and-atomic-moves.md + Misc/how-to-set-up-hardlinks-and-atomic-moves.md: Hardlinks/Hardlinks-and-Instant-Moves.md + hardlinks.md: Hardlinks/Hardlinks-and-Instant-Moves.md + hardlink.md: Hardlinks/Hardlinks-and-Instant-Moves.md custom-formats.md: Radarr/V3/Radarr-collection-of-custom-formats.md cf.md: Radarr/V3/Radarr-collection-of-custom-formats.md TorGuard.md: Misc/How-to-setup-Torguard-for-port-forwarding.md