Moving from disk to disk within the array (not cache to disk), preserving hard links


Go to solution Solved by flaggart,

Recommended Posts

Hello

 

I use the regular tools such as Sonarr, Radarr etc which keep downloaded files and make a hard copy in the final library location.  I want to move all data off of one disk in the array to free it up so that it can be used as second parity disk instead.  I realize I can't just dumb copy all of the files from that disk to other disks, as this would lose the hard links and take more disk space as a result.

 

I know that the mover script checks files on the cache disk to see if they are hard links, and I assume if they are, it then finds the original file, and instead of moving from the cache to the destination disk, it instead creates a new hard link.

 

My question is - is there an existing tool I can use to empty one of my disks in this way, or will I need to make a similar script which checks each file to see if it is a hard link, and if so find the original file, etc etc...

 

Thanks

Link to comment
  • Solution

I think I was overthinking it.  Any hard link created by these apps will initially be on cache, and mover will move onto array disks.  Presumably it is clever enough to move the file and then make the hard link on the same disk filesystem.  This seems to be the case from looking at the output of "find /mnt/disk1/ -type f -not links 1", and therefore I can just use rsync with -H flag to move files from one disk to another preserving hard links.  I think it is unlikely there are any hard links that span different disks but are hard-linked across the array filesystem.

Edited by flaggart
  • Thanks 1
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.