[SOLVED] Hardlinked duplicates on cache won't move


Recommended Posts

[EDIT: I totally misunderstood the problem: mover wasn't moving because of Split Level. Resolution at or near the end.]

 

My cache has filled up with files that also exist on a share (same paths). But they're hardlinked, it seems, and deleting the files on cache deletes the same file on the share. Is there a way to manually remove the cache items without affecting the share items?

Edited by MisterSanders
Clarifying the problem to save others time
Link to comment

They're not hardlinked, they ARE the same files.

 

User shares are all the files in all the disks in the share named root folder.

 

36 minutes ago, MisterSanders said:

My cache has filled up with files

If you set the share in question to cache:yes and run the mover, those files will get transferred to the array disks as long as nothing is holding them open.

Link to comment

The shares have always been set to cache:yes, but the mover isn't moving them. Making up an example, I have the following:

 

On my cache drive, /storage/cache/media/tv/seinfeld/season01/seinfeld.s01e04.mp4, taking up 802mb

On my share, /media/tv/seinfeld/season01/seinfeld.s01e04.mp4, also taking up 802mb

 

Deleting either seinfeld.s01e04.mp4 file deletes the other, freeing up 802mb on the share, and 802mb on the cache. This is what made me reason they were hardlinked. Looking for a way to delete the cache versions.

 

I've attached my diagnostics log to this post.

city6-diagnostics-20211209-1542.zip

Link to comment
1 hour ago, MisterSanders said:

Deleting either seinfeld.s01e04.mp4 file deletes the other, freeing up 802mb on the share, and 802mb on the cache. This is what made me reason they were hardlinked. Looking for a way to delete the cache versions.

 

As @JonathanM said, they ARE the same file.  If you look at the share, it will contain files from the cache drive and from the share itself.  If you delete the file from the user share and that file happens to still be on the cache drive, then you're deleting the file from the cache drive because it is 100% the same file as what's appearing on the user share.  It's not a duplicate, hardlink etc.  It's the same thing

 

All shares are nothing but a combination of all the files stored within say /mnt/disk1/media, /mnt/disk2/media, and /mnt/cache/media.  This combined view is the exported share of /media, or if you're looking at things via the command prompt, /mnt/user/media.

 

Your problem with the media management share is most likely the  split level.  To be quite honest, this concept also messes me right up but I don't particularly care about it as I couldn't give 2 cents as to where the file(s) wind up.  It doesn't bother me if S01E01 and S01E02 are on different disks.  Look at https://wiki.unraid.net/UnRAID_6/Shares

Link to comment
4 hours ago, MisterSanders said:

On my cache drive, /storage/cache/media/tv/seinfeld/season01/seinfeld.s01e04.mp4, taking up 802mb

On my share, /media/tv/seinfeld/season01/seinfeld.s01e04.mp4, also taking up 802mb

These are not Unraid paths. They are not even network paths. I can only assume these are paths from one or more of your docker mappings. Unraid paths are /mnt/user/media for example (the user share named media), or /mnt/cache/media (that portion of the media user share on cache). Anything in /mnt/cache/media is also part of the media user share in /mnt/user/media.

 

These same paths would be media (for the media user share) on the network, or cache/media (or cache\media) if you actually share disks on the network (not recommended).

 

Link to comment

I see how I was misunderstanding the file paths. Thanks for the explanations. 👍

 

4 hours ago, Squid said:

Your problem with the media management share is most likely the  split level.  To be quite honest, this concept also messes me right up but I don't particularly care about it as I couldn't give 2 cents as to where the file(s) wind up.  It doesn't bother me if S01E01 and S01E02 are on different disks.  Look at https://wiki.unraid.net/UnRAID_6/Shares

 

@Squid, you were right, this was the problem that prevented the mover from moving these files off my cache. I changed the share to split at any directory, and the mover's now moving these files over. Thank you!

Link to comment
  • MisterSanders changed the title to [SOLVED] Hardlinked duplicates on cache won't move
  • 1 month later...

I just ran into this same problem.  There was a file stuck in my cache drive that I could not clear.  There was a copy of the file in the Share folder so it was apparently moved at some point, but it must have only been copied and not actually moved.  Just to be safe, I copied the file from the Share folder to my main PC and then deleted the file from the Share.  I  invoked the mover and it moved the file from the cache drive to the Share folder to restore the deleted file and then it was cleared from the cache automatically.

 

FYI - I had all of the settings for the cache drive previously set to all of the settings recommended in the above posts.  I can only assume that perhaps something glitched the transfer during a move and it copied the file but failed to delete it upon completion.

Edited by captain_video
Link to comment
41 minutes ago, captain_video said:

copy of the file in the Share folder

Unless you mean the file existed on cache and also existed on one or more array disks at the same time, then it sounds like you just don't understand how user shares work.

8 minutes ago, itimpi said:

cache drive is part of the share

 

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.