Nate5452

Moving Files - Moves them back to Cache

8 posts in this topic Last Reply

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

Share this post


Link to post
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.

Share this post


Link to post

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

Share this post


Link to post
Posted (edited)
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

Share this post


Link to post

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

Share this post


Link to post

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

 

Nate

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Copyright © 2005-2018 Lime Technology, Inc.
unRAID® is a registered trademark of Lime Technology, Inc.