From baeaaa02d0656fb2c600d1ae86a99738c3367022 Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sat, 19 Jun 2021 22:14:06 +0200 Subject: [PATCH 1/8] Fixed: indentation --- includes/docker/docker-compose.yml | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/includes/docker/docker-compose.yml b/includes/docker/docker-compose.yml index 19d89fa5f..8bf7c5190 100644 --- a/includes/docker/docker-compose.yml +++ b/includes/docker/docker-compose.yml @@ -51,21 +51,21 @@ services: - /etc/localtime:/etc/localtime:ro - /docker/appdata/bazarr:/config - /data/media:/data/media -sabnzbd: - container_name: sabnzbd - image: ghcr.io/hotio/sabnzbd:latest - restart: unless-stopped - logging: - driver: json-file - network_mode: bridge - ports: - - 8080:8080 - - 9090:9090 - environment: - - PUID=1000 - - PGID=1000 - - TZ=Europe/Amsterdam - volumes: - - /etc/localtime:/etc/localtime:ro - - /docker/appdata/sabnzbd:/config - - /data/usenet:/data/usenet:rw + sabnzbd: + container_name: sabnzbd + image: ghcr.io/hotio/sabnzbd:latest + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 8080:8080 + - 9090:9090 + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Amsterdam + volumes: + - /etc/localtime:/etc/localtime:ro + - /docker/appdata/sabnzbd:/config + - /data/usenet:/data/usenet:rw From 8a19ed483b5030d1b0492171eafa9914b4c9268f Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sat, 19 Jun 2021 22:20:24 +0200 Subject: [PATCH 2/8] Changed: to Snippets for easier maintenace (insert content from other files) --- docs/Downloaders/Deluge/Deluge-Basic-Setup.md | 14 +------------- docs/Downloaders/NZBGet/Basic-Setup.md | 16 +--------------- docs/Downloaders/SABnzbd/Basic-Setup.md | 16 +--------------- docs/Downloaders/qBittorrent/Basic-Setup.md | 16 +--------------- .../ruTorrent/ruTorrent-Basic-Setup.md | 14 +------------- includes/downloaders/basic-setup.md | 17 +++++++++++++++++ 6 files changed, 22 insertions(+), 71 deletions(-) create mode 100644 includes/downloaders/basic-setup.md diff --git a/docs/Downloaders/Deluge/Deluge-Basic-Setup.md b/docs/Downloaders/Deluge/Deluge-Basic-Setup.md index d165d9715..5ed078998 100644 --- a/docs/Downloaders/Deluge/Deluge-Basic-Setup.md +++ b/docs/Downloaders/Deluge/Deluge-Basic-Setup.md @@ -1,18 +1,6 @@ # Deluge - Basic Setup -This basic example is based on the use of docker images - -!!! note "" - Keep in mind I've setup my paths so it works with hardlinks and you get instant moves. - -!!! attention "" - The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. - - But you're able to change this, by not using the pre-defined/recommended paths like: - - - `/downloads` => `/data/downloads` - - `/movies` => `/data/media/movies` - - `/tv` => `/data/media/tv`. +--8<-- "includes/downloaders/basic-setup.md" ------ diff --git a/docs/Downloaders/NZBGet/Basic-Setup.md b/docs/Downloaders/NZBGet/Basic-Setup.md index be45cc6fa..610094e78 100644 --- a/docs/Downloaders/NZBGet/Basic-Setup.md +++ b/docs/Downloaders/NZBGet/Basic-Setup.md @@ -1,20 +1,6 @@ # NZBGet - Basic Setup -This basic example is based on the use of docker images - -!!! tip "" - Keep in mind the path are setup so it works with hardlinks and instant moves. - - More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} - -!!! attention "" - The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. - - But you're able to change this, by not using the pre-defined/recommended paths like: - - - `/downloads` => `/data/downloads` - - `/movies` => `/data/media/movies` - - `/tv` => `/data/media/tv`. +--8<-- "includes/downloaders/basic-setup.md" ------ diff --git a/docs/Downloaders/SABnzbd/Basic-Setup.md b/docs/Downloaders/SABnzbd/Basic-Setup.md index aafd8ee7f..a2b5f2aa2 100644 --- a/docs/Downloaders/SABnzbd/Basic-Setup.md +++ b/docs/Downloaders/SABnzbd/Basic-Setup.md @@ -1,20 +1,6 @@ # SABnzbd - Basic Setup -This basic example is based on the use of docker images - -!!! tip "" - Keep in mind the path are setup so it works with hardlinks and instant moves. - - More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} - -!!! attention "" - The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. - - But you're able to change this, by not using the pre-defined/recommended paths like: - - - `/downloads` => `/data/downloads` - - `/movies` => `/data/media/movies` - - `/tv` => `/data/media/tv`. +--8<-- "includes/downloaders/basic-setup.md" ------ diff --git a/docs/Downloaders/qBittorrent/Basic-Setup.md b/docs/Downloaders/qBittorrent/Basic-Setup.md index 2a55eb96d..7d3238766 100644 --- a/docs/Downloaders/qBittorrent/Basic-Setup.md +++ b/docs/Downloaders/qBittorrent/Basic-Setup.md @@ -1,20 +1,6 @@ # qBittorrent - Basic Setup -This basic example is based on the use of docker images - -!!! tip "" - Keep in mind the path are setup so it works with hardlinks and instant moves. - - More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} - -!!! attention "" - The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. - - But you're able to change this, by not using the pre-defined/recommended paths like: - - - `/downloads` => `/data/downloads` - - `/movies` => `/data/media/movies` - - `/tv` => `/data/media/tv`. +--8<-- "includes/downloaders/basic-setup.md" ------ diff --git a/docs/Downloaders/ruTorrent/ruTorrent-Basic-Setup.md b/docs/Downloaders/ruTorrent/ruTorrent-Basic-Setup.md index 88e0c860d..8b4eab9df 100644 --- a/docs/Downloaders/ruTorrent/ruTorrent-Basic-Setup.md +++ b/docs/Downloaders/ruTorrent/ruTorrent-Basic-Setup.md @@ -1,18 +1,6 @@ # ruTorrent - Basic Setup -This basic example is based on the use of docker images - -!!! note "" - Keep in mind I've setup my paths so it works with hardlinks and you get instant moves. - -!!! attention "" - The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. - - But you're able to change this, by not using the pre-defined/recommended paths like: - - - `/downloads` => `/data/downloads` - - `/movies` => `/data/media/movies` - - `/tv` => `/data/media/tv`. +--8<-- "includes/downloaders/basic-setup.md" ------ diff --git a/includes/downloaders/basic-setup.md b/includes/downloaders/basic-setup.md new file mode 100644 index 000000000..12d2401d7 --- /dev/null +++ b/includes/downloaders/basic-setup.md @@ -0,0 +1,17 @@ +# + +This basic example is based on the use of docker images + +!!! tip "" + Keep in mind the path are setup so it works with hardlinks and instant moves. + + More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} + +!!! attention "" + The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. + + But you're able to change this, by not using the pre-defined/recommended paths like: + + - `/downloads` => `/data/downloads` + - `/movies` => `/data/media/movies` + - `/tv` => `/data/media/tv`. From e5ddec1c5a0510823b1f8d02b9dcb09fec7f2ef0 Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sat, 19 Jun 2021 22:20:36 +0200 Subject: [PATCH 3/8] Changed: to Snippets for easier maintenace (insert content from other files) --- docs/Downloaders/NZBGet/Paths-and-Categories.md | 15 ++------------- docs/Downloaders/SABnzbd/Paths-and-Categories.md | 15 +-------------- docs/Downloaders/qBittorrent/Paths.md | 15 ++------------- includes/downloaders/path.md | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 40 deletions(-) create mode 100644 includes/downloaders/path.md diff --git a/docs/Downloaders/NZBGet/Paths-and-Categories.md b/docs/Downloaders/NZBGet/Paths-and-Categories.md index d2ed010f7..37eee39db 100644 --- a/docs/Downloaders/NZBGet/Paths-and-Categories.md +++ b/docs/Downloaders/NZBGet/Paths-and-Categories.md @@ -1,19 +1,8 @@ # NZBGet - Paths and Categories -This basic example is based on the use of docker images +--8<-- "includes/downloaders/path.md" -!!! tip "" - Keep in mind the path are setup so it works with hardlinks and instant moves. - - More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} - -!!! 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` +--- `Settings` => `PATHS` diff --git a/docs/Downloaders/SABnzbd/Paths-and-Categories.md b/docs/Downloaders/SABnzbd/Paths-and-Categories.md index 884e13643..95f0ad147 100644 --- a/docs/Downloaders/SABnzbd/Paths-and-Categories.md +++ b/docs/Downloaders/SABnzbd/Paths-and-Categories.md @@ -1,19 +1,6 @@ # SABnzbd - Paths and Categories -This basic example is based on the use of docker images - -!!! tip "" - Keep in mind the path are setup so it works with hardlinks and instant moves. - - More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} - -!!! 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` +--8<-- "includes/downloaders/path.md" --- diff --git a/docs/Downloaders/qBittorrent/Paths.md b/docs/Downloaders/qBittorrent/Paths.md index 737f0b504..7f79cacc1 100644 --- a/docs/Downloaders/qBittorrent/Paths.md +++ b/docs/Downloaders/qBittorrent/Paths.md @@ -1,19 +1,8 @@ # qBittorrent - Paths -This basic example is based on the use of docker images +--8<-- "includes/downloaders/path.md" -!!! tip "" - Keep in mind the path are setup so it works with hardlinks and instant moves. - - More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} - -!!! 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` +--- `Options` => `Downloads` diff --git a/includes/downloaders/path.md b/includes/downloaders/path.md new file mode 100644 index 000000000..5e9b9fdfd --- /dev/null +++ b/includes/downloaders/path.md @@ -0,0 +1,16 @@ +# + +This basic example is based on the use of docker images + +!!! tip "" + Keep in mind the path are setup so it works with hardlinks and instant moves. + + More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} + +!!! 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` From e3316bec9fd80b492327621e7bd0e57341cf512b Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sun, 20 Jun 2021 00:25:53 +0200 Subject: [PATCH 4/8] Changed: to Snippets for easier maintenace (insert content from other files) --- docs/Hardlinks/How-to-setup-for/Docker.md | 104 +--------------- docs/Hardlinks/How-to-setup-for/Native.md | 115 +----------------- docs/Hardlinks/How-to-setup-for/Synology.md | 79 +----------- .../hardlinks/breakdown-folder-structure.md | 69 +++++++++++ includes/hardlinks/docker-compose-commands.md | 8 ++ includes/hardlinks/folder-structure.md | 33 +++++ includes/hardlinks/permissions.md | 8 ++ 7 files changed, 130 insertions(+), 286 deletions(-) create mode 100644 includes/hardlinks/breakdown-folder-structure.md create mode 100644 includes/hardlinks/docker-compose-commands.md create mode 100644 includes/hardlinks/folder-structure.md create mode 100644 includes/hardlinks/permissions.md diff --git a/docs/Hardlinks/How-to-setup-for/Docker.md b/docs/Hardlinks/How-to-setup-for/Docker.md index a8808930b..b74c0d8e6 100644 --- a/docs/Hardlinks/How-to-setup-for/Docker.md +++ b/docs/Hardlinks/How-to-setup-for/Docker.md @@ -20,111 +20,15 @@ For example `//data`, or even `/data`. -## 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 - !!! 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. -#### 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}`. +--8<-- "includes/hardlinks/folder-structure.md" -```none -data -└── torrents - ├── movies - ├── music - └── tv -``` +--8<-- "includes/hardlinks/breakdown-folder-structure.md" -#### 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.** +--8<-- "includes/hardlinks/permissions.md" ## Docker-compose Example @@ -140,3 +44,5 @@ data ```yml --8<-- "includes/docker/docker-compose.yml" ``` + +--8<-- "includes/hardlinks/docker-compose-commands.md" diff --git a/docs/Hardlinks/How-to-setup-for/Native.md b/docs/Hardlinks/How-to-setup-for/Native.md index 64715aaa4..aa9368899 100644 --- a/docs/Hardlinks/How-to-setup-for/Native.md +++ b/docs/Hardlinks/How-to-setup-for/Native.md @@ -4,117 +4,10 @@ I'm not going to explain how to install all the applications, I will only explain which folder structure we recommend. ------- +--- -## Folder Structure +--8<-- "includes/hardlinks/folder-structure.md" -!!! attention +--8<-- "includes/hardlinks/breakdown-folder-structure.md" - 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.** +--8<-- "includes/hardlinks/permissions.md" diff --git a/docs/Hardlinks/How-to-setup-for/Synology.md b/docs/Hardlinks/How-to-setup-for/Synology.md index 9c64d42e0..2808bfb80 100644 --- a/docs/Hardlinks/How-to-setup-for/Synology.md +++ b/docs/Hardlinks/How-to-setup-for/Synology.md @@ -74,75 +74,7 @@ data └── tv ``` -## Breakdown of the Folder Structure - -!!! 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. - -### 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 -``` +--8<-- "includes/hardlinks/breakdown-folder-structure.md" ------ @@ -240,7 +172,7 @@ sudo chmod -R a=,a+rX,u+w,g+w /volume1/data /volume1/docker ------ -### Run the Docker Compose +## 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 !!! @@ -266,9 +198,4 @@ You will notice that all the images will be downloaded, and after that the conta Just don't use the GUI !!! -??? hint "docker-compose commands - [CLICK TO EXPAND]" - - - `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.) +--8<-- "includes/hardlinks/docker-compose-commands.md" diff --git a/includes/hardlinks/breakdown-folder-structure.md b/includes/hardlinks/breakdown-folder-structure.md new file mode 100644 index 000000000..90a8f6b22 --- /dev/null +++ b/includes/hardlinks/breakdown-folder-structure.md @@ -0,0 +1,69 @@ +### 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 the applications.** diff --git a/includes/hardlinks/docker-compose-commands.md b/includes/hardlinks/docker-compose-commands.md new file mode 100644 index 000000000..57bba696a --- /dev/null +++ b/includes/hardlinks/docker-compose-commands.md @@ -0,0 +1,8 @@ +### Docker-Compose Commands + +??? hint "docker-compose commands - [CLICK TO EXPAND]" + + - `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/includes/hardlinks/folder-structure.md b/includes/hardlinks/folder-structure.md new file mode 100644 index 000000000..f7d64ea2b --- /dev/null +++ b/includes/hardlinks/folder-structure.md @@ -0,0 +1,33 @@ +## 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 +``` diff --git a/includes/hardlinks/permissions.md b/includes/hardlinks/permissions.md new file mode 100644 index 000000000..3d93868fd --- /dev/null +++ b/includes/hardlinks/permissions.md @@ -0,0 +1,8 @@ +### 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 +``` From a25b1d43b0e714ed41469f4179de3eab62ed4690 Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sun, 20 Jun 2021 00:27:19 +0200 Subject: [PATCH 5/8] Removed: fake heading --- includes/downloaders/basic-setup.md | 2 -- includes/downloaders/path.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/includes/downloaders/basic-setup.md b/includes/downloaders/basic-setup.md index 12d2401d7..2a7db2772 100644 --- a/includes/downloaders/basic-setup.md +++ b/includes/downloaders/basic-setup.md @@ -1,5 +1,3 @@ -# - This basic example is based on the use of docker images !!! tip "" diff --git a/includes/downloaders/path.md b/includes/downloaders/path.md index 5e9b9fdfd..346d3c6e8 100644 --- a/includes/downloaders/path.md +++ b/includes/downloaders/path.md @@ -1,5 +1,3 @@ -# - This basic example is based on the use of docker images !!! tip "" From 5d79de0dbdb82526735aff83319c609bc28d85f2 Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sun, 20 Jun 2021 00:28:44 +0200 Subject: [PATCH 6/8] Added: Ignore MD041 The reason why I ignore this is to make it easier for me to make use of Snippets (insert content from other files) for easier maintance --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b4c35890b..57c6017a0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - name: markdownlint run: | - find ~+ ${github_workspace} -name '*.md' | xargs docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} markdownlint/markdownlint -r ~MD013,~MD033,~MD034,~MD046,~MD002 + find ~+ ${github_workspace} -name '*.md' | xargs docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} markdownlint/markdownlint -r ~MD013,~MD033,~MD034,~MD046,~MD002,~MD041 yamllint: runs-on: ubuntu-latest From c9d6b4020512cd607ec0444858a969e4108b5b64 Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sun, 20 Jun 2021 00:49:54 +0200 Subject: [PATCH 7/8] Fixed: not working direct links to the examples --- docs/Hardlinks/Examples.md | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/docs/Hardlinks/Examples.md b/docs/Hardlinks/Examples.md index 301c58f99..cc9d59256 100644 --- a/docs/Hardlinks/Examples.md +++ b/docs/Hardlinks/Examples.md @@ -8,18 +8,10 @@ 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) +## Sonarr ??? example "Sonarr Examples" - ## Sonarr - `Settings` => `Media Management` => `Importing` ![sonarr-enable-hardlinks](images/sonarr-enable-hardlinks.png) @@ -34,9 +26,9 @@ ![sonarr-tv](images/sonarr-tv.png) -??? example "Radarr Examples" +## Radarr - ## Radarr +??? example "Radarr Examples" `Settings` => `Media Management` => `Importing` @@ -52,9 +44,9 @@ ![radarr-movies](images/radarr-movies.png) -??? example "SABnzbd Examples" +## SABnzbd - ## SABnzbd +??? example "SABnzbd Examples" `SABnzbd config` => `Folders` @@ -64,9 +56,9 @@ ![sabnzbd-categories](images/sabnzbd-categories.png) -??? example "NZBGet Examples" +## NZBGet - ## NZBGet +??? example "NZBGet Examples" `Settings` => `PATHS` @@ -76,25 +68,25 @@ ![nzbget-settings-categories](images/nzbget-settings-categories.png) -??? example "qBittorrent Examples" +## qBittorrent - ## qBittorrent +??? example "qBittorrent Examples" `Options` => `Downloads` ![qbt-options-downloads](images/qbt-options-downloads.png) -??? example "Deluge Example" +## Deluge - ## Deluge +??? example "Deluge Example" `Preferences` => `Downloads` ![deluge-preferences-downloads](images/deluge-preferences-downloads.png) -??? example "ruTorrent Examples" +## ruTorrent - ## ruTorrent +??? example "ruTorrent Examples" `../config/rtorrent/config/rtorrent.rc` (path to your appdata) From bf60c9640afef4fe4853981c1fd0190c910a9def Mon Sep 17 00:00:00 2001 From: TRaSH Date: Sun, 20 Jun 2021 21:47:45 +0200 Subject: [PATCH 8/8] Changed: description about the suggested mounts --- includes/downloaders/basic-setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/downloaders/basic-setup.md b/includes/downloaders/basic-setup.md index 2a7db2772..292439133 100644 --- a/includes/downloaders/basic-setup.md +++ b/includes/downloaders/basic-setup.md @@ -6,7 +6,7 @@ This basic example is based on the use of docker images More info [HERE](/Hardlinks/Hardlinks-and-Instant-Moves/){:target="_blank" rel="noopener noreferrer"} !!! attention "" - The default path setup recommended by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move. + The default path setup suggested by some docker developers that encourages people to use mounts like `/movies`, `/tv` and `/downloads` is very suboptimal because it makes them look like two or three file systems, even if they aren’t. It is the easiest way to get started. While easy to use, it has a major drawback. Mainly losing the ability to hardlink or instant move, resulting in a slower and more I/O intensive copy + delete is used. But you're able to change this, by not using the pre-defined/recommended paths like: