Exclude sub-folder from mover task - hardlinks, seeding, shares


Recommended Posts

I have a subfolder in my cache drive under the share 'TV Series' (TV Series/.Seeding) that i always want to be on the cache, while the rest of the share 'TV Series' moves off to my array.

Is there any way to exclude this folder from being relocated by the mover? the documentation seem to suggest that only top-level directories can be excluded with a leading '.' but i was wondering if theres a way to exclude a specific subfolder.

i found some topics talking about it from almost a decade ago how the leading '.' relates to macOS and ways to change it to an '_' instead. but since these topics were discussed such a long time ago i'm sure there have been updates to the way things work and maybe even a better solution to my problem.

https://forums.unraid.net/topic/7896-newbie-cache-drive-question/?tab=comments#comment-78708

https://web.archive.org/web/20160701083939/http://lime-technology.com/forum/index.php?topic=1783

---------

I should probably try to explain what i'm trying to do, and then you can tell me if it would even work in the first place.

 

I capture torrents via sonarr/radarr and send it to deluge which runs the download on a Cache-prefer share 'Torrents' to 'Torrents/incomplete'. When the download is completed it is sent according to its label to either the 'TV Series' cache-yes share folder 'TV Series/.Seeding', or to the 'Movies' cache-yes share folder 'Movies/.Seeding'.

 

Sonarr/radarr then creates a hardlink of the downloaded file to the share directory 'TV Series or Movies/name of series or movie/filename.ext'. After the torrent hits it's ratio it is then removed from deluge and *removed* from the .Seeding folder and is now only availible in the 'name of series or movie' folder and should be moved off to a HDD on the next mover task

---------

I'm not sure how the hardlinks are handled in this case either though, if theres something in the cache under 'TV Series/.Seeding/GoT/S01E01.mkv' and also under 'TV Series/GoT/S01E01.mkv' would mover try to move the link thats not in the '.Seeding' sub-folder off of the cache? which i'm not even sure is possible due to how hardlinks work the file would have a link on an SSD and on an HDD when i want it to stay on the SSD until its ratio is met.

At this moment the file is being moved off of the cache even while it is seeding due to there being no way to exclude this '.Seeding' sub-folder from the mover task.

Sorry if i'm being a bit confusing i'll clarify if something is unclear, and if there is a better way to do what i'm trying to do please share 😁

thanks

Link to comment

Let me see if i can formulate this a bit better:

 

When a file is downloading it is put on a "prefer-cache share". /mnt/user/Torrents/incomplete/filename.ext

When it is finished it is moved to a folder on a "cache-yes share". /mnt/user/Movies/.Seeding/filename.ext OR /mnt/user/TV_Series/.Seeding/filename.ext

Sonarr/Radarr then grabs a hard-link of this file and directs it to either /mnt/user/Movies/moviename/filename.ext OR /mnt/user/TV_Series/tvseriesname/filename.ext

 

At this point all is well, the file is on the cache, is accessible by plex/sonarr/radarr, and is seeding on deluge.

 

However when the mover runs, and since the file is in a cache-yes share, it is moved off of the cache to the array where it keeps seeding and spinning up my HDDs.

 

After the torrent hits it's ratio it is then deleted from the /.Seeding/ directory, but it still exists in its /movies/ or /TV_Series/ folder.

At this point i want the file to be moved off of the cache and into long term storage on the array.

 

The problem i'm having is how to keep the file seeding AND accessible by sonarr/radarr/plex in a file structure that makes sense. Or how to get the mover to exclude files that have 2 links somehow? idk...

 

If i can avoid it i would prefer to not have the file on the array and spinning up my discs, but i still want it accessible by my other dockers so it can be organized and still be played.

 

Is this even possible? would it include some over complicated scripting? am i missing something obvious that would fix my problems?

Edited by MammothJerk
Link to comment

So I just ran mover and am I correct to assume that as long as the files are in the DOWNLOADS share in cache it won't move it?  It needs to be in the /CACHE share or am I just oddly not thinking this through?  

 

Oct 1 19:25:59 Skynet root: mover: started Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/RARBG.txt Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/RARBG_DO_NOT_MIRROR.exe Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR.mkv Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/wwe.monday.night.raw.2019.09.30.720p.hdtv.x264-kyr.nfo Oct 1 19:26:05 Skynet root: mover: finished

Link to comment
4 hours ago, cbr600ds2 said:

So I just ran mover and am I correct to assume that as long as the files are in the DOWNLOADS share in cache it won't move it?  It needs to be in the /CACHE share or am I just oddly not thinking this through?  

 

Oct 1 19:25:59 Skynet root: mover: started Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/RARBG.txt Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/RARBG_DO_NOT_MIRROR.exe Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR.mkv Oct 1 19:25:59 Skynet move: move: skip /mnt/cache/Downloads/complete/WWE.Monday.Night.RAW.2019.09.30.720p.HDTV.x264-KYR[rarbg]/wwe.monday.night.raw.2019.09.30.720p.hdtv.x264-kyr.nfo Oct 1 19:26:05 Skynet root: mover: finished

Be careful with your file/folder names - in Linux they are case significant!   Because Samba shares are not case significant having folders with the same name but different capitalisation at the Linux level can result in the contents of only one of them being visible on the network at the Samba level.

 

you also need to be careful about shares relating to physical devices and user shares.   /mnt/cache refers to a physical device and normally shows up as the ‘cache’ share.   All top level folders on physical devices show up as User Shares so /mnt/cache/Downloads is part of the ‘Downloads’ share.   User Shares are also shown at the Linux level under /mnt/user.    This means that can be multiple paths at the Linux level that refer to the same file/folder - one at its physical location and one at its logical location as a User Share.
 

Whether files in the ‘Downloads’ share get moved to the array depends on the Use Cache setting for that particular share.   There is also the fact that files that are currently open are never moved by the mover process.

Link to comment
8 hours ago, itimpi said:

Whether files in the ‘Downloads’ share get moved to the array depends on the Use Cache setting for that particular share.   There is also the fact that files that are currently open are never moved by the mover process.

So if its in transmission it won't be moved because its technically "open" / in use?  This may solve an issue for me...I'd like mover to NOT move files from downloads...

Link to comment
1 minute ago, cbr600ds2 said:

So if its in transmission it won't be moved because its technically "open" / in use?  This may solve an issue for me...I'd like mover to NOT move files from downloads...

If you set the Downloads share to have a Use Cache setting of ‘only’ or ‘prefer’ then mover will never try to move it to the array.    You might want to read the Help built into the GUI to see the effect of the various options for this setting.

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.