Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[v6.3.5] Copying large amounts of data from previous Windows file server

Featured Replies

I'm setting up a new unRAID and coming from previously using Windows Server 2012 with DrivePool and SnapRAID. I bought a bunch of the WD Red 8TB EasyStores, shucked them, and should have plenty of space to copy over the data without having to touch/format the previous drives. So I have unRAID running and my new 8TB drives in the array, no parity currently as I hear that can slow down transfers quite a bit so I will add a couple later for that purpose after everything is copied over (also I'm not as worried about losing files because I can maintain my old drives for a while). I have enough space in my Norco so the old NTFS drives are also hooked up physically via SATA.

 

I have installed Unassigned Devices and I can mount the NTFS disks, so that is great. Now I need to start copying data and have a few questions...

 

I know there is Krusader, but that just looks clunky and I have used linux in the past so feel comfortable with CLI. So I'm SSH'ing into unRAID and doing this at the command line (using screen so things don't get f'ed up if I lose my connection). My plan is to mount the disks one at a time and use this cmd:

 

cp -iR --no-preserve=mode,ownership --preserve=timestamps /mnt/disks/<UD-mountpoint>/<data>/* /mnt/diskN/sharename/

 

I've been reading on the forums and such and I've seen it not recommended to copy to the share folders (/mnt/user0/share), but rather to the disk directly as above (/mnt/diskN/sharename). It seemed like that was more about copying from disk to disk already in the array to move/balance data and not as much from an external disk, but not sure which way is safer. Should I copy from my UD mounted external NTFS volume directly to the array disk mount (/mnt/diskN/sharename), or is it ok to copy to the share mount (/mnt/user0/sharename) so that unRAID can balance out the files on the disks as I copy to them?

 

Also, as an aside, this just occurred to me, but if you accidentally copy the same files to the same locations on 2 different disks in the array, what does unRAID do to resolve the conflict? That is the danger I worry about by copying directly to disks rather than through the share name/path where unRAID could do whatever is needed to sort files.

 

Looking at the permissions of some of the files I've started copying, even though I'm using --no-preserve=mode,ownership as part of my cp command, it isn't inheriting but giving the new files ownership of root:root. The mode bits I think are right at 777 for folders and 666 for files, though not sure if that is entirely normal. So after all is said and done copying, I think I have a couple options:

 

- chown -R nobody:users /mnt/user0/sharename 
- Again, don't think I would need to chmod too based on how the copying is going?
- OR I see under Tools there is New Permissions which looks like it would reset all the proper mode/owner bits to what unRAID likes. 

 

Would it be better/easier/faster to use the New Permissions utility on each disk in my array, or just do it via CLI with chown?

4 minutes ago, deusxanime said:

I've been reading on the forums and such and I've seen it not recommended to copy to the share folders (/mnt/user0/share), but rather to the disk directly as above (/mnt/diskN/sharename). It seemed like that was more about copying from disk to disk already in the array to move/balance data and not as much from an external disk, but not sure which way is safer.

Its all about copying from /mnt/diskX to /mnt/user (or user0) and vice versa (ie to/from a disk already assigned to the array to/from the user share system).  That will corrupt the files.

6 minutes ago, deusxanime said:

Should I copy from my UD mounted external NTFS volume directly to the array disk mount (/mnt/diskN/sharename), or is it ok to copy to the share mount (/mnt/user0/sharename) so that unRAID can balance out the files on the disks as I copy to them?

That's fine.  Specifying /mnt/user0 forces the files to go directly to the array instead of going to the cache drive if its enabled for the particular share.

 

7 minutes ago, deusxanime said:

Also, as an aside, this just occurred to me, but if you accidentally copy the same files to the same locations on 2 different disks in the array, what does unRAID do to resolve the conflict? That is the danger I worry about by copying directly to disks rather than through the share name/path where unRAID could do whatever is needed to sort files.

 

unRaid has rules to deal with that.  Generally, the version on the lowest numbered disk takes precedence, but it can certainly be confusing.  If you only copy to /mnt/user, then this situation will never happen.  The Fix Common Problems plugin when running extended tests does look for duplicated files.

 

9 minutes ago, deusxanime said:

The mode bits I think are right at 777 for folders and 666 for files, though not sure if that is entirely normal.

0777 / 0666 and root:root are perfectly fine.

 

10 minutes ago, deusxanime said:

Would it be better/easier/faster to use the New Permissions utility on each disk in my array, or just do it via CLI with chown?

Both have identical results.  Either way if you do use either the CLI or the utility, ensure you don't run them against your appdata share if you have docker containers.  You may impact there ability to run.  If in doubt, Fix Common Problems includes "Docker Safe New Permissions" in the Tools Tab.

  • Author
6 minutes ago, Squid said:

Its all about copying from /mnt/diskX to /mnt/user (or user0) and vice versa (ie to/from a disk already assigned to the array to/from the user share system).  That will corrupt the files.

That's fine.  Specifying /mnt/user0 forces the files to go directly to the array instead of going to the cache drive if its enabled for the particular share.

 

unRaid has rules to deal with that.  Generally, the version on the lowest numbered disk takes precedence, but it can certainly be confusing.  If you only copy to /mnt/user, then this situation will never happen.  The Fix Common Problems plugin when running extended tests does look for duplicated files.

 

0777 / 0666 and root:root are perfectly fine.

 

Both have identical results.  Either way if you do use either the CLI or the utility, ensure you don't run them against your appdata share if you have docker containers.  You may impact there ability to run.  If in doubt, Fix Common Problems includes "Docker Safe New Permissions" in the Tools Tab.

 

Thanks for the info. As I was thinking about it I realized it was probably copying from share to array disk (or vice versa) that was bad as I could see that confusing unRAID as it tried to place the file you were copying on the array and it already existing on a disk, but copying from external to share would be fine since the file doesn't exist yet on the array. I think for the rest of my copies I'll just copy to /mnt/user0/sharename to make it easier and have UR sort out placement of files. I did find out about user0 being for array drives only and that is what I plan on using since these are all my media files and nothing that should be on the cache drives.

 

Interesting point on the duplicate files thing. I shouldn't have that as DrivePool should have sorted them so no files were duplicated between drives, but was just curious about it. I already have FCP installed and was planning on running it once I had data copied and setup most of my preferences in unRAID to see if I missed anything. So if any conflicts are there they will hopefully pop up, but not expecting any.

 

I did see Docker Safe New Permissions in Tools as well. I'll likely use that even though I haven't started playing with Docker yet so my appdata is empty, but just to be safe.

 

Thanks again!

39 minutes ago, deusxanime said:

I did find out about user0 being for array drives only and that is what I plan on using since these are all my media files and nothing that should be on the cache drives.

If the share is set to not use the cache drive, then it doesn't matter if you use /mnt/user or /mnt/user0   Generally you reference everything as user to make everything simpler to understand.  Just set the share to be use cache: no

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.