NEW: Check if Hardlinks are working

```yml
Updated: Hardlinks and Instant Moves
- NEW: Check if Hardlinks are working
```
pull/219/head
TRaSH 3 years ago
parent 0accb27e99
commit 647ff281b8

@ -2,3 +2,4 @@ nav:
- Hardlinks - Atomic Moves: Hardlinks-and-Instant-Moves.md
- How-to-setup-for
- Examples: Examples.md
- Check if hardlinks are working: Check-if-hardlinks-are-working.md

@ -0,0 +1,40 @@
# 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 ?
For this 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.
---
## The ls -al method
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/`
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.
![!Hardlinks check ls -al](images/hardlinks-ls-al.png)
- Red rectangle - Not Hardlinked
- Green rectangle - Hardlinks
- Blue rectangle - Folders/Directories you will need to go in to them to check if the files are hardlinked.
---
## The stat method
This way requires a bit more work.
In your terminal type: `stat /path/to/your/download/location/file.mkv`
and also type: `stat /path/to/your/media/location/file.mkv`
you then will get 2 results you can use to compare several things.
![!Hardlinks check stat](images/hardlinks-stat.png)
1. Links: Everything above 1 means it's a hardlink
2. Inode: if the numbers match you know the files are hardlinked

@ -8,11 +8,12 @@
Here we will try to explain it.
This Guide exist out of 3 Sections
This Guide exist out of 4 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.
1. [Check if hardlinks are working](/Hardlinks/Check-if-hardlinks-are-working/)
So you want one of the following ?
@ -24,15 +25,15 @@ Then Continue to [How to setup for](/Hardlinks/How-to-setup-for/) your installat
### 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"}.
- [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.
??? 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.
??? faq "**What are the `*arr`?**"
Sonarr, Radarr, Lidarr, etc.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@ -62,6 +62,7 @@ plugins:
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
check-hardlinks.md: Hardlinks/Check-if-hardlinks-are-working.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

Loading…
Cancel
Save