Symlink/Hardlink/Keeplink - torrent share doubts

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
p11ps
Posts: 11
Joined: 26 Oct 2017, 01:16

Symlink/Hardlink/Keeplink - torrent share doubts

Post by p11ps »

I use ZFS as filesystem and each media folder is separated in datasets, something like this:

Code: Select all

tank/media
tank/media/movies
tank/media/tv
tank/torrent_downloads
Problem here is that I am not able to hardlinking files when a download finishes due to ZFS capabilities (each dataset is roughly like a different filesystem). With all of this, it comes up some questions:

[*] Will the filebot rename be performed in the target folder (where the original files will be moved) or in the input one (the symlinks that will be created)? I guess it will be in the target folder, but I prefer to confirm! E.g.:

Input folder (where it is downloaded): /mnt/download/TV_Mediafile.mkv
Target folder (where the original file is moved): /mnt/media/movies/Renamed_TV_Mediafile.mkv

Now the downloaded file is in /mnt/media/movies with the filename modified by Filebot, and the symlink is in the original path (/mnt/download/TV_Mediafile.mkv)

[*] In case of the rename is in the target one, do you know if qBittorrent will be able to share the file after perform the keeplink action? As the files would be moved and renamed to the target folder, I don't know if the tracker will interpret the new symlinks as valid files. If I am not wrong, the tracker website looks for a file with the original name which it was downloaded, and a symlink is only a link to an inode (but the original file now has a different name!), it is not like a hardlink which share the same inode.

I don't know if you understand my question :roll:

Thank you!
User avatar
rednoah
The Source
Posts: 21351
Joined: 16 Nov 2011, 08:59

Re: Symlink/Hardlink/Keeplink - torrent share doubts

Post by rednoah »

:?: You'll probably want to have everything on the same file system. That'll make everything easier, especially if everything is already on the same physical disk already anyway. Where is the benefit in separating things into separate file systems? It'll just make move/rename operations not instant, and prevent you from using hardlinks and CoW clones.



:idea: FileBot will perform move/rename as a single atomic operation, because move/rename is a single atomic operation on the OS and file system level, and so there is no intermediate move/rename operation:

Code: Select all

mv "/input/x.mp4" "/output/y.mp4"


:idea: --action keeplink will likely work. A symlink generally behaves as if it was a normal file (as opposed to *.lnk files used by Windows Explorer) and so things will generally work with any application because applications just read/write data to some file path, and generally don't know or care if that file path happens to be a symlink, since the OS and file system take care of everything.
:idea: Please read the FAQ and How to Request Help.
p11ps
Posts: 11
Joined: 26 Oct 2017, 01:16

Re: Symlink/Hardlink/Keeplink - torrent share doubts

Post by p11ps »

rednoah wrote: 06 Oct 2022, 06:08 :?: You'll probably want to have everything on the same file system. That'll make everything easier, especially if everything is already on the same physical disk already anyway. Where is the benefit in separating things into separate file systems? It'll just make move/rename operations not instant, and prevent you from using hardlinks and CoW clones.



:idea: FileBot will perform move/rename as a single atomic operation, because move/rename is a single atomic operation on the OS and file system level, and so there is no intermediate move/rename operation:

Code: Select all

mv "/input/x.mp4" "/output/y.mp4"


:idea: --action keeplink will likely work. A symlink generally behaves as if it was a normal file (as opposed to *.lnk files used by Windows Explorer) and so things will generally work with any application because applications just read/write data to some file path, and generally don't know or care if that file path happens to be a symlink, since the OS and file system take care of everything.
Hey,

The main reason to have separated filesystem per type of file is to have the possibility to perform snapshots to one dataset, independently of the rest of the pool. Also, with separated datasets, I can set up different recordsizes for performance and defragmentation purposes (there are some more datasets nested to media, as photos, music, etc., with many kind of file sizes).

All is clear now. Thank you for your replies and explains about each concept of your app!

Regards.
Post Reply