Moving Files - Moves them back to Cache


Recommended Posts

Hello,

 

I am still fairly new to unraid, but so far I've been using krusader to accomplish the moving of files around.  What I usually do is that new files are downloaded to the Cache, and then I manually move them to the appropriate folder.   It was working with no issues, but now lately when I go to move it to the User/subfolder it seems to move it to Cache/subfolder (versus a disk).    If I try to move it to user0/subfolder (saw this time on another post) it will move it to the correct location and not to the cache drive.   

 

I have the sharefolder/subfolder in question set to Cache No.   

 

I thought the approved guidance was to always do things within the User folder (not directly within the cache, disk, user0, etc.)

 

Unraid v6.5.2

binhex Krusader

 

Any help is greatly appreciated!

 

Thanks,

Nate

Link to comment
7 hours ago, Nate5452 said:

What I usually do is that new files are downloaded to the Cache, and then I manually move them to the appropriate folder. 

 

7 hours ago, Nate5452 said:

I thought the approved guidance was to always do things within the User folder (not directly within the cache, disk, user0, etc.)

 

Right, which is why you shouldn't be doing what you first stated moving from cache to user.

 

If you really want to manually manage things, work ONLY with the disks, which include disk1-diskX and cache. /mnt/user INCLUDES the cache drive, so moving things from cache to user is risky if you don't understand what's going on under the hood.

 

Either keep source and destination in /mnt/user, or in /mnt/diskX and /mnt/cache. Don't mix and match with user and disks. Cache is one of the disks.

 

7 hours ago, Nate5452 said:

I have the sharefolder/subfolder in question set to Cache No.

That really only effects new files copied to the user shares that don't already have a folder on the cache drive. It won't prevent a folder that already exists on the cache drive from participating in the user share, both reading existing files and adding files to folders that are already on the cache drive.

 

All root folders on the array disks including the cache drive are user shares.

Link to comment

Thank you for the response, but I guess I should clarify.

 

I go to user/downloads (set to cache - only) and try to transfer and move the files  to user/TV Shows (set to cache -no).    For some reason the past few weeks I've tried to do this, the move seems to be completed and it moves the files from the downloads folder, but when I go view that new folder on disk-1 it is not there, but if I go to cache a new folder was created called TV Show and my file ends up there.     

 

Of course I know when this happens because the copy of a 50gb season only takes 5-10 seconds versus if i go to user0/tv shows to transfer it to the appropriate folder it takes 20 minutes.

 

Nate

Link to comment
19 hours ago, Nate5452 said:

using krusader

 

29 minutes ago, Nate5452 said:

I go to user/downloads (set to cache - only) and try to transfer and move the files  to user/TV Shows (set to cache -no)

What you're seeing is expected, correct, and normal, although it is counter-intuitive.

 

Linux (actually, every OS ever made including Windows / iOS) when moving files between the same mount point will always try and rename the file to the destination instead of a copy / delete operation.


Since TV Shows and downloads are both subfolders from user (which is the mount point), the OS decides that its correct to do a rename operation.  user0 is a different mount point, so moving anything from user to user0 will always entail a copy / delete. 

The same thing would happen if you were using the command line, or something like midnight commander.  Any low-level commands will basically override the useCache setting and instead utilize the most efficient way of handling the file operations.

 

But, be aware that moving a file from some folder in user to the exact same folder/filename in user0 will corrupt the file.  AKA the user-share copy bug which isn't a bug per se. but another side effect that also makes sense when you think about what's going on behind the scenes.

Edited by Squid
  • Upvote 1
Link to comment

When you have a subfolder being moved in the same mount point, it's executed as a rename of the parent folder. /user/downloads/show moved to /user/tvshows/show is just a matter of renaming, no copy and delete is attempted when the rename succeeds since it's the same root path.

 

That's the way any OS works, moving a file from one location to another on the same drive is just a rename. If you present the folders to krusader as being separate mount points instead of being subfolders inside of /user, then it should do a copy and delete and that follow the share allocation rules.

 

If you use "tools" "new network connection" to connect to your download share in one pane and tvshows share in the other, it should work as you intend.

 

@Squid replied as I was typing, but screw it, I'm posting anyway. ?

  • Like 1
Link to comment
3 minutes ago, Nate5452 said:

Thanks to both of you!  maybe I will try to figure out mover

 

Nate

If you set tvshows to cache yes instead of no, then your instant move from downloads to tvshows will be moved to the array drives following the allocation rules when mover runs. You get the best of both worlds, you get to manage stuff manually like you want, and it happens instantly for you, and the commitment to the parity protected array takes place after hours with the mover.

Link to comment
15 hours ago, Nate5452 said:

Thank you for the response, but I guess I should clarify.

 

I go to user/downloads (set to cache - only) and try to transfer and move the files  to user/TV Shows (set to cache -no).    For some reason the past few weeks I've tried to do this, the move seems to be completed and it moves the files from the downloads folder, but when I go view that new folder on disk-1 it is not there, but if I go to cache a new folder was created called TV Show and my file ends up there.     

 

Of course I know when this happens because the copy of a 50gb season only takes 5-10 seconds versus if i go to user0/tv shows to transfer it to the appropriate folder it takes 20 minutes.

 

Nate

In this case you almost certainly want the TV Shows share to be set to cache =Yes.   That is the setting that is required to make mover move files from the cache disk to the main array when it runs.   Turning on the Help in the GUI to see the implications of the different settings for the Use Cache option might help clarify this.

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.