Correct way to move files between shares?


VoNpo

Recommended Posts

2 hours ago, unrateable said:

unraid takes care of the split levels and follows the rules you set.

 

as long as you move between shares. never move between disk(s) and shares. it may break things.

 

there is no best way. Kruzer docker, mc via CLI, root share, or copy with vm as intermediary are popular ways...

What do you mean with "never move between disk(s) and shares"?

 

My current setup have "Download share" in one disk, where all different linux distros are downloaded. I want to move these to other shares, which are located in other disks in array.

 

Do you mean krusader app?

If so, think I have wrong settings or there is a user error with this app. With my experience, krusader wont respect any share rules.

(No excluded/included disk or split level if using "move" option.)

Link to comment

 

1 hour ago, VoNpo said:

What do you mean with "never move between disk(s) and shares"?

Don't move data from /mnt/disk1/MyShare/... to /mnt/user/MyShare/... (or vice versa)

 

That is considered mixing drive shares with user shares and it just doesn't work out well at all.

 

You can go from /mnt/disk1/MyShare/... to /mnt/disk2/MyShare/... or /mnt/user/Share1/... to /mnt/user/Share2/... without problem, using whatever tool (Krusader/Dolphin/MC/command line/etc) you'd like.

  • Like 1
Link to comment
1 hour ago, VoNpo said:

What do you mean with "never move between disk(s) and shares"?

He is referring to disk shares vs. user shares.  If you look in the unRAID Shares tab, you will see both.  It is recommended that you DO NOT export disk shares.

 

Disk shares (/mnt/disk/diskx) refer to individual disks whereas user shares (/mnt/user/{sharename} can span several or all disks.

 

Moving data between disk shares and user shares can result in data loss as data in user shares is also on one or more disk(s) and you could actually be working unknowingly with two different views of the same file(s).  Attempting to move files may actually be overwriting the same file with itself and will result in data loss.

 

You will see your user shares in Krusader under /mnt/user (this could be different depending on how you set up your Krusader docker volume mappings) and, yes, all of the methods mentioned (Krusader/Dolphin/MC/CLI, etc.) will honor your user share settings as far as split level, allocation method, etc. since they are just working with the unRAID file system.

Link to comment

Think I get it now.

 

I've been using file structure in Krusader as "Root>Media>All created shares" in both windows. So think I haven't touched any disk shares. Actually I didn't even find a way to do that.

 

Example:

I have 50gb file in disk 4 which in dedicated to share named X. (Share X settings: Included disk 4, exluded none)

I want to move this file to share Y (Share Y settings: Included disk all, exluded disk 4)

With crusader I can "F6 Move" it instantly to share Y, but file will stay in disk 4.

In that case none of setting are honored. And just checked, none of these files haven't move to correct disk in last few weeks.

Am I doing something totally wrong?

 

 

Edited by VoNpo
Link to comment

Linux sees all user shares as being mounted at /mnt/user. So when you try to move from one user share to another, Linux will see they are on the same mount, and instead of copying from source to destination and then deleting from source, as it would if you were moving between disks, it will instead just rename to a different path. This is instantaneous but it stays on the same disk, not the result you wanted.

 

You will have to do the move in 2 steps. Copy from source to destination. That will make another copy that follows the user share settings of the destination. Then delete it from the source.

Link to comment

That problem is sort of the compliment of the other problem being mentioned earlier, mixing disks and user shares when moving/copying.

 

If you move/copy from a user share to a disk, or from a disk to a user share, Linux doesn't realize that the source path and the destination path might actually be the same file. So it tries to overwrite the file it is trying to read.

Link to comment
  • 1 year later...
On 2/17/2019 at 2:35 PM, FreeMan said:

 

Don't move data from /mnt/disk1/MyShare/... to /mnt/user/MyShare/... (or vice versa)

 

That is considered mixing drive shares with user shares and it just doesn't work out well at all.

 

You can go from /mnt/disk1/MyShare/... to /mnt/disk2/MyShare/... or /mnt/user/Share1/... to /mnt/user/Share2/... without problem, using whatever tool (Krusader/Dolphin/MC/command line/etc) you'd like.

Very useful. I have a cache drive. I usually copy a drive-share to a user-share. Is that proper? Or there a better way to copy files? Though if I copy from a drive share to a user share, unraid will decide on which drive to put the files. 

 

Any of the file transfer tools you mentioned have a GUI?

Edited by razz
Link to comment
1 minute ago, razz said:

I usually copy a drive-share to a media-share. Is that proper?

It sounds like you mean exactly what he said you shouldn't do in this part you quoted:

On 2/17/2019 at 2:35 PM, FreeMan said:

Don't move data from /mnt/disk1/MyShare/... to /mnt/user/MyShare/... (or vice versa)

 

Or as I explained just above your post:

On 2/17/2019 at 3:57 PM, trurl said:

If you move/copy from a user share to a disk, or from a disk to a user share, Linux doesn't realize that the source path and the destination path might actually be the same file. So it tries to overwrite the file it is trying to read.

Link to comment

So, I'm suppose to specify which disk I wan to copy from my cache-drive?

What if the disk in question does not have the user-share (folders) on it?

I.e. Movie folder/share? Do I create the folder name then copy the file from the cache-share?

Link to comment

I recommend not even sharing drives (including cache) over the network. If you want to copy or move files from one disk to another then you should do that on the server with the command line, the builtin mc (Midnight Commander), or Krusader docker.

 

And you shouldn't make a copy of a user share file on multiple disks as you are suggesting here:

11 minutes ago, razz said:

What if the disk in question does not have the user-share (folders) on it?

I.e. Movie folder/share? Do I create the folder name then copy the file from the cache-share?

Moving between disks is OK, or copying to a different share is OK. Copying to the same share on another disk is not OK, and moving or copying from a user share to a disk or a disk to a user share is not OK.

Link to comment
  • 7 months later...
On 2/17/2019 at 12:53 PM, trurl said:

Linux sees all user shares as being mounted at /mnt/user. So when you try to move from one user share to another, Linux will see they are on the same mount, and instead of copying from source to destination and then deleting from source, as it would if you were moving between disks, it will instead just rename to a different path. This is instantaneous but it stays on the same disk, not the result you wanted.

 

You will have to do the move in 2 steps. Copy from source to destination. That will make another copy that follows the user share settings of the destination. Then delete it from the source.

if I have user shares /mnt/user/data using only disk 1, and /mnt/user/apps using only disk 2, to move from data to apps, I thought would be 1 step and it would automatically move it from disk 1 to disk 2.  No?

Link to comment
5 hours ago, xrqp said:

if I have user shares /mnt/user/data using only disk 1, and /mnt/user/apps using only disk 2, to move from data to apps, I thought would be 1 step and it would automatically move it from disk 1 to disk 2.  No?

Only if you do it over the network where the User Shares are then seen as different mount points.

 

If you do it locally within the server then Linux (which is not aware of User Shares) thinks both source and destination are on the same mount point so it uses a rename rather than a copy/delete operation which leaves the file on the same drive.

Link to comment
  • 4 months later...
10 hours ago, theone said:

When copying files from one share to another share via an intermediate Windows10 VM is the virtual network connection a limiting factor?

If you use windows explorer (or robocopy) files will be copied locally, they won't use the network, using Samba's server side copy.

Link to comment
  • 3 months later...
On 2/17/2019 at 3:53 PM, trurl said:

Linux sees all user shares as being mounted at /mnt/user. So when you try to move from one user share to another, Linux will see they are on the same mount, and instead of copying from source to destination and then deleting from source, as it would if you were moving between disks, it will instead just rename to a different path. This is instantaneous but it stays on the same disk, not the result you wanted.

 

You will have to do the move in 2 steps. Copy from source to destination. That will make another copy that follows the user share settings of the destination. Then delete it from the source.

Hi, very new to UnRAID and I am experiencing the issue described above.  Not realizing, I used Krusader to move a bunch of files and it moved instantaneously, but did not really move the files from my Pool to my Array.  My Array is my UnRAID Array and My Pool is a separate set of disks formatted btrfs.  What I see now is space still being occupied in the Pool.  Since the files have been “moved”, how can I tell what still physically resides on the Pool so I can physically move them to the Array?  Thank you!

Link to comment
14 hours ago, Hammer8 said:

how can I tell what still physically resides on the Pool so I can physically move them to the Array?

An easy solution is to set the User Share concerned to Use Cache=Yes and then invoke Mover manually from the Main tab which will sort this out for you without any risk of making a mistake that could lose data.  Afterwards you can set the share's Use Cache setting back to the behaviour you want going forward.

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.