flaggart Posted January 26, 2023 Share Posted January 26, 2023 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 Quote Link to comment
Solution flaggart Posted January 27, 2023 Author Solution Share Posted January 27, 2023 (edited) 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 January 27, 2023 by flaggart 1 Quote Link to comment
Recommended Posts
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.