Fixed: Hardlink-Formatting-Layout

pull/220/head
TRaSH 3 years ago
parent 2e804a6ab6
commit 4f7528abab

@ -1,20 +1,20 @@
# Check if hardlinks are working
# How to check if hardlinks are working
You've followed the guide step by step but still want to check if hardlinks are working, or someone on the Sonarr/Radarr support team asked you to check if your files are hardlinked ?
You've followed the guide step by step but still want to check if hardlinks are working, or someone on the Sonarr/Radarr support team asked you to check if your files are hardlinked?
For this you can use 2 options to check if you got working hardlinks.
You can use 2 options to check if you got working hardlinks.
Both ways requires you to login to your terminal with Putty or similar.
*Both ways requires you to login to your terminal with PuTTY or similar software.*
---
## The ls -al method
## Method 1: Using ls
This is the easiest to check in my opinion.
In your terminal cd to your download location or type `ls -al /path/to/your/download/location/`
In your terminal `cd` to your download location and run `ls-al` or type `ls -al /path/to/your/download/location/`
You will get a listing of all your files and on the left side you will see a couple of numbers, every files with a number above 1 are hardlinks.
You will get a listing of all your files and on the left side you will see a couple of numbers, every file with a number above 1 are hardlinks.
![!Hardlinks check ls -al](images/hardlinks-ls-al.png)
@ -24,15 +24,15 @@ You will get a listing of all your files and on the left side you will see a cou
---
## The stat method
## Method 2: Using stat
This way requires a bit more work.
In your terminal type: `stat /path/to/your/download/location/file.mkv`
- On the terminal type: `stat /path/to/your/download/location/file.mkv`
and also type: `stat /path/to/your/media/location/file.mkv`
- On the terminal type: `stat /path/to/your/media/location/file.mkv`
you then will get 2 results you can use to compare several things.
You will get 2 results you can use to compare several things.
![!Hardlinks check stat](images/hardlinks-stat.png)

@ -23,17 +23,37 @@ So you want one of the following ?
Then Continue to [How to setup for](/Hardlinks/How-to-setup-for/) your installation method.
### FAQ
## FAQ
### What are Hardlinks
??? faq "**What are hardlinks?**"
- [Short answer] Having a file in multiple folders without using double your storage space.
- [Long answer] Hard links are a way for a copy operation to be instant and not consume space for those additional copies. Every file is a hard link: some metadata that points at blocks on the file system, which is why they're restricted to the same file system. There can be as many metadata files pointing at those blocks as needed and the blocks know how many links point to them. Once the blocks have 0 links, they're considered deleted. That means you can delete any "copy" w/o impacting the others. Your download client can remove it's copy w/o impacting the library copy. The library copy can be removed by Plex or Sonarr/Radarr or yourself w/o impacting the download client copy. But space is only regained when all copies are deleted. Of note is that modifying the file will impact all copies. For example, modifying the id3 tags of a .mp3 download after import would modify the download client copy, breaking the torrent.
- [**Short answer**] Having a file in multiple locations without using double your storage space.
- [**Long answer**] Hard links are a way for a copy operation to be instant and not consume space for those additional copies.
Every file is a hard link: some metadata that points at blocks on the file system, **which is why they're restricted to the same file system**. There can be as many metadata files pointing at those blocks as needed and the blocks know how many links point to them. Once the blocks have 0 links, they're considered deleted.
This means:
- You can delete any "copy" w/o impacting the others.
Your download client can remove it's "copy" w/o impacting the library "copy". The library "copy" can be removed by Plex or Sonarr/Radarr or yourself w/o impacting the download client "copy".
- Space is only regained when all "copies" are deleted.
- Modifying the file will impact all "copies".
For example, modifying the id3 tags of a .mp3 download after import would modify the download client "copy", resulting in breaking the torrent.
### What are Instant Moves (Atomic Moves)
??? 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.
### What are the arr
??? faq "**What are the `*arr`?**"
Sonarr, Radarr, Lidarr, etc.

@ -2,33 +2,29 @@
!!! 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.
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](/Hardlinks/How-to-setup-for/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.
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.*
*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 Dockers 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 arent. This means hard links wont work and instead of an instant move, a slower and more I/O intensive copy + delete is used.
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,
It doesn't really matter which path you use for your media and appdata,
the only thing you should avoid is `/home`.
the only thing you should avoid is `/home`.
Because user folders in `/home` are expected to have some restrictive permissions.
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.
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`.
@ -54,6 +50,10 @@ data
### Breakdown of the Folder Structure
!!! info
The paths you use on the inside matter. Because of how Dockers 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 arent. This means hard links wont work and instead of an instant move, a slower and more I/O intensive copy + delete is used.
#### Torrent clients
qBittorrent, Deluge, ruTorrent
@ -68,7 +68,7 @@ data
└── tv
```
### Usenet clients
#### Usenet clients
NZBGet or SABnzbd
@ -82,7 +82,7 @@ data
└── tv
```
### The arr(s)
#### The arr(s)
Sonarr, Radarr and Lidarr
@ -104,7 +104,7 @@ data
└── tv
```
### Media Server
#### Media Server
Plex, Emby, JellyFin and Bazarr

@ -2,7 +2,7 @@
!!! note
I'm not going to explain how to install all the applications, I will only explain which folder structure we recommend.
I'm not going to explain how to install all the applications, I will only explain which folder structure we recommend.
------

@ -76,6 +76,10 @@ data
## Breakdown of the Folder Structure
!!! info
The paths you use on the inside matter. Because of how Dockers 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 arent. This means hard links wont work and instead of an instant move, a slower and more I/O intensive copy + delete is used.
### Torrent clients
qBittorrent, Deluge, ruTorrent

@ -62,6 +62,12 @@ data
------
### Breakdown of the Folder Structure
!!! info
The paths you use on the inside matter. Because of how Dockers 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 arent. This means hard links wont work and instead of an instant move, a slower and more I/O intensive copy + delete is used.
## Setting up the containers
After you created all the needed folders it's time to setup the paths in the docker containers.

Loading…
Cancel
Save