Hard links with Torrents (Deluge) and automation (Sonarr)


Recommended Posts

I'm familiar with hard links and in my question to fully automate all my torrents and usenet for media, many of the apps have options for hard links which makes sense to reduce actual disk usage.

 

Normally if I was dealing with a single large disk, i understand how this works. However, with Unraid I'm worried about potential weirdness.

 

For example, for torrents, I keep them on a single disk location (/mnt/disk3/torrents/seeds/) to prevent all disks from spinning while seeding (aka limiting only disk 3 to be spinning).

 

I have Deluge setup to move to different folders within /mnt/disk3/torrens/seeds/ based on labels --- e.g. /mtn/disk3/torrents/seeds/movies vs. /mtn/disk3/torrents/seeds/tv.

 

Couchpotato is in the picture and it's currently watching that folder, and then copying the file the proper movies user share (/mnt/user/media-movies/movies/) which is set to be able to distributed across all my disks in the array (4 disks).  I have it setup to not use hard links.

 

I am trying to setup Sonarr now, and started thinking about how this should work.  Sonarr will monitor torrent sites, queue to deluge and it has a setting for "Use Hardlinks instead of Copy", which I have disabled as well.

 

So my question is that since torrents are downloaded to a single disk (disk3), how do hardlinks work? My assumption is that it won't work well since the torrent seeds only live on disk3, but the array is meant to be spread across all four disks.  My thought is that these media files will NEVER be split across the 4 disks and only live on disk3.

 

is this correct? If not, where is my thinking wrong?

 

How can I better set this up?

Link to comment
  • 3 weeks later...
  • 2 months later...

I've been working on this very issue:

 

https://forums.sonarr.tv/t/alternative-to-hard-linking-and-copying/11069/21

 

However, since you keep all your torrents on the same disk, you should be ok. You cannot create a hard link on a user share, since the user share is just a virtual conglomeration of many disks. Since hard links have to be on the same disk, if you try to make a hard link from the user share, there is no mechanism to be able to tell which disk you will actually be linking to and from. However, since it is just a virtual conglomeration of all the disks, there is no reason you cannot make a hard link on the actual disk and still be able to see the link from the user share.

 

So, in short, you cannot create a hard link on a user share but user shares have no problem recognizing the hard links on the disk shares behind them. So as long as you create a hard link on the disk itself, disk 3 in your case, your share won't have any issue recognizing it.

Link to comment

I've been working on this very issue:

 

https://forums.sonarr.tv/t/alternative-to-hard-linking-and-copying/11069/21

 

However, since you keep all your torrents on the same disk, you should be ok. You cannot create a hard link on a user share, since the user share is just a virtual conglomeration of many disks. Since hard links have to be on the same disk, if you try to make a hard link from the user share, there is no mechanism to be able to tell which disk you will actually be linking to and from. However, since it is just a virtual conglomeration of all the disks, there is no reason you cannot make a hard link on the actual disk and still be able to see the link from the user share.

 

So, in short, you cannot create a hard link on a user share but user shares have no problem recognizing the hard links on the disk shares behind them. So as long as you create a hard link on the disk itself, disk 3 in your case, your share won't have any issue recognizing it.

What happens if you configure your app to write the hard link to a cached share? Original file is on the cache drive in the cache only download folder, the hardlink gets written to a TV share that is cached, so when the mover runs, what happens? Now, after you are done with the hard link and want the mover to transfer the file to another disk, how is that handled?

 

Or am I not understanding something?

Link to comment
  • 2 months later...

Sorry to revive an old thread - I'm trying to solve for the same problem. Did you ever figure out a workable solution? Unfortunately, Sonarr does not support symlinks which would be the ideal way to handle this.

 

I'd like to be able to seed indefinitely and have no problem with Sonarr making a copy of a file in order to do so, but the Completed Download Handler isn't working as expected. Here's the message I get:

 

Import failed, path does not exist or is not accessible by Sonarr: /data/user/Automation/docker/delugevpn/downloads/complete/<filename>

 

Any advice?

 

EDIT: Had to do with volume mappings after all. Didn't realize that my deluge container was passing along the incorrect path for the completed downloads folder.

 

Link to comment
  • 2 years later...

just reviving because 1st result in google;

 

binhex sonarr template maps /data to its appdata and it's what binhex deluge/vpn uses as its media path. so you'll need to map a path that both can access/use/rw and match in both mapping and target path, i.e. /completed/ to /mnt/user0/data/completed.

 

For proper automation, jackett grabs indexes, sonarr grabs all files, picks best match and throws it over to deluge with label of whatever set to move to dl to /downloads/ which sonarr has mapped as well and is able to pick up that file, then hardlink/copy and rename in right path that your media player can pick up in correct and renamed format. Then you just set label to seed to whatever, forever if you care, or just seed low value like .1 and delete on target which will remove badly named seed and it'll keep hardlink alive and well in right place.

 

Works well, with few rss feeds to auto feed new titles in etc which sonarr will add and pick up future releases, can just leave it to do its thing.

Edited by Mizerka
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.