You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.8 KiB
78 lines
2.8 KiB
4 years ago
|
# How to check if hardlinks are working
|
||
4 years ago
|
|
||
5 months ago
|
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.
|
||
4 years ago
|
|
||
3 years ago
|
You can use 3 options to check if you got working hardlinks.
|
||
4 years ago
|
|
||
5 months ago
|
_All methods require you to log in to your terminal with PuTTY or similar software._
|
||
4 years ago
|
|
||
2 years ago
|
!!! warning
|
||
7 months ago
|
|
||
5 months ago
|
- You **CAN'T** create hardlinks for directories :bangbang:
|
||
|
- You **CAN'T** hardlink across separate file systems, partitions, or mounts :bangbang:
|
||
|
- Some file systems, such as exFAT, are known not to support hardlinks and should be avoided (double-check if you are unsure!)
|
||
3 years ago
|
|
||
4 years ago
|
---
|
||
3 years ago
|
|
||
3 years ago
|
## Usenet
|
||
|
|
||
5 months ago
|
!!! info "If you are using Usenet, these examples won't work due to making use of instant/atomic moves and not hardlinks.<br><br>Still want to test if it works?<br><br>Test an import of a 4k remux, or any other big file, and you should notice it's almost instant and not a slower and more I/O intensive copy + delete."
|
||
4 years ago
|
|
||
2 months ago
|
## Mac or Linux Method 1: Using ls
|
||
4 years ago
|
|
||
6 months ago
|
This is the easiest to check in our opinion.
|
||
4 years ago
|
|
||
4 years ago
|
In your terminal `cd` to your download location and run `ls -al` or type `ls -al /path/to/your/download/location/`
|
||
4 years ago
|
|
||
4 years ago
|
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.
|
||
4 years ago
|
|
||
|
![!Hardlinks check ls -al](images/hardlinks-ls-al.png)
|
||
|
|
||
|
- Red rectangle - Not Hardlinked
|
||
|
- Green rectangle - Hardlinks
|
||
6 months ago
|
- Blue rectangle - Folders/Directories you will need to go into them to check if the files are hardlinked.
|
||
4 years ago
|
|
||
|
---
|
||
|
|
||
2 months ago
|
## Mac or Linux Method 2: Using stat
|
||
4 years ago
|
|
||
|
This way requires a bit more work.
|
||
|
|
||
3 years ago
|
- In the terminal type: `stat /path/to/your/download/location/file.mkv`
|
||
|
- In the terminal type: `stat /path/to/your/media/location/file.mkv`
|
||
4 years ago
|
|
||
4 years ago
|
You will get 2 results you can use to compare several things.
|
||
4 years ago
|
|
||
|
![!Hardlinks check stat](images/hardlinks-stat.png)
|
||
|
|
||
6 months ago
|
1. Links: Everything above 1 means it's hardlinked
|
||
|
1. Inode: if the numbers match, you know the files are hardlinked
|
||
3 years ago
|
|
||
5 months ago
|
---
|
||
|
|
||
2 months ago
|
## Mac or Linux Method 3: Using Inode copies
|
||
3 years ago
|
|
||
|
- In your terminal `cd` to your download location and run `ls -i file.mkv` or type `ls -i /path/to/your/download/location/file.mkv`
|
||
|
|
||
|
This will reveal the inode of your file on the left side of the file.
|
||
|
|
||
|
![!Hardlinks check ls -i](images/hardlinks-ls-i.png)
|
||
|
|
||
|
- In your terminal type: `find /mnt/user/data/ -inum ###` or `find . -inum ###` if you're in your root folder.
|
||
|
|
||
|
!!! note ""
|
||
7 months ago
|
|
||
3 years ago
|
`###` = Your inode number on the left of the file you found.
|
||
|
|
||
|
![!hardlinks inode](images/hardlinks-inode.png)
|
||
|
|
||
|
It will list all files linked with the same inode number.
|
||
2 months ago
|
|
||
|
## Windows Method 1: Using fsutil
|
||
|
|
||
|
- In the command line type: `fsutil hardlink list c:\path\to\your\download\location\file.mkv`
|
||
|
|
||
|
It will list all hardlinked files.
|
||
2 months ago
|
|
||
|
--8<-- "includes/support.md"
|