December 12, 201312 yr So what do I need to type to move a folder from one disk to another? I would like to move a folder called "Zmans photos", no quotes from disk 5 to disk 4. The folder is about 300gigs. I just want to move the folder to the root of the drive /mnt/disk4 Its correctly at /mnt/disk5/Zmans photos thanks
December 12, 201312 yr You can use the move command (mv?) but I always get into midnight commander (mc) to move my files around since it has a text based user interface that lets you browse around the file system and two pane file listings. One I use for source the other for target. Then in source pane I highlight the file or directory I want to move and make sure the target pane is at the correct location and hit a function key (F6 I believe) to move the data.
December 12, 201312 yr Author I've never used MC so I have no idea how it works. I would just rather type in a command and let it go.
December 12, 201312 yr Author I ended up doing this and seems to be copying everything over cp -rf /mnt/disk5/"Zmans photos" /mnt/disk4/
December 12, 201312 yr I ended up doing this and seems to be copying everything over cp -rf /mnt/disk5/"Zmans photos" /mnt/disk4/ I would have added the p option to the cp command to preserve the permissions. If you do not do that you will need to run the newperms command again after the cp command completes to set the correct group/user settings.
December 13, 201312 yr Why do I have to run the script again? Because when you log in to the tower using telnet, or at the local console, you are running as root unless you actively changed to a non-privileged user. When you move files as root, root now owns the files, and the normal unraid users don't have permission to access root owned files. So, you have to run the new permissions script to grant access. Or something like that.
December 13, 201312 yr Why do I have to run the script again? Because when you log in to the tower using telnet, or at the local console, you are running as root unless you actively changed to a non-privileged user. When you move files as root, root now owns the files, and the normal unraid users don't have permission to access root owned files. So, you have to run the new permissions script to grant access. Or something like that. Exactly like that. The key is to change the group to users. The owner doesn't matter. This is what newperms does.
December 13, 201312 yr i've moved many files via Midnight COmmander and never had an access issue over SMB.
December 13, 201312 yr i've moved many files via Midnight COmmander and never had an access issue over SMB. Was this on unRAID 4.7 or 5.0? With the 4.7 release it was OK to have files owned by root, but with the 5.0 release security is a bit tighter and now root is no longer able to access files via shares. Having said that, does MC retain the user/group of the file when moving it? I know that if using the 'cp' command you need to add the -p option to get them retained.
December 13, 201312 yr I've never had a problem with MC either. But I execute it like this: sudo -u nobody mc
December 13, 201312 yr i just type 'mc' at the prompt and move/copy what i need to. never had a permission issue.
December 13, 201312 yr i just type 'mc' at the prompt and move/copy what i need to. never had a permission issue. Same here. AFAIK, mc preserves attributes by default.
December 13, 201312 yr Why not just use a Windows Explorer window? Open disk5, right click and select copy. Change to disk4, right click and paste. Just don't paste the contents into another directory already on disk4 and don't cancel the copy or shutdown the computer while it works. edit - I think you also have to use a -r switch to copy all the sub directories otherwise you will not move them.
December 13, 201312 yr Why not just use a Windows Explorer window? Open disk5, right click and select copy. Change to disk4, right click and paste. Just don't paste the contents into another directory already on disk4 and don't cancel the copy or shutdown the computer while it works. edit - I think you also have to use a -r switch to copy all the sub directories otherwise you will not move them. its way slower this way. it has to transfer from unraid to pc back to unraid.
December 14, 201312 yr I recently did some a quick test copying a 5gig file disk to disk and doing it on the server vs over the network was about the same speed. I have a mix of Toshiba and Hitachi 3T drives in my server and they are decently fast drives. The network wasn't even loaded to 1/2 of what it could theoretically support. So, I doubt it will be "way slower" and it's certainly much simpler.
December 14, 201312 yr I recently did some a quick test copying a 5gig file disk to disk and doing it on the server vs over the network was about the same speed. I have a mix of Toshiba and Hitachi 3T drives in my server and they are decently fast drives. The network wasn't even loaded to 1/2 of what it could theoretically support. So, I doubt it will be "way slower" and it's certainly much simpler. lionelhutz, Do you have a cache drive in your unRAID server?
December 14, 201312 yr A cache drive has absolutely nothing to do with copying directly from disk to disk and is irrelevant.
December 14, 201312 yr I recently did some a quick test copying a 5gig file disk to disk and doing it on the server vs over the network was about the same speed. I have a mix of Toshiba and Hitachi 3T drives in my server and they are decently fast drives. The network wasn't even loaded to 1/2 of what it could theoretically support. So, I doubt it will be "way slower" and it's certainly much simpler. It should be roughly the same using a Gig-e network. The bottleneck is writing to the array.
December 14, 201312 yr Moving within a disk via windows operates at the speed of a console rename/move. It just changes the file location without actually moving the file. The result is that no data moves across your network and in fact no data even moves within the array. Its location name just changes. Moving disk to disk means an array read to an array write, and the cache drive does not come into play. By default, and I know of no way to change it, UnRaid will not use the cache drive for files that already exist on the system. The result is 1) you are running at array read/write speeds and 2) you end up moving data in both directions over your network. Even with a fast array are only likely to use about half of the bandwidth of a well functioning Gig-E network. However it IS slower (at least on my system) because you do get hit with a network overhead penalty. Perhaps worst on SMB and not worth noticing on NFS (I can't validate that, I don't use NFS). It is especially bad for a lot of small files, not so much for a batch of huge files. But in either case it then hammers your network and seems unnecessary when you can just perform the move completely internal to your unraid boxen. Of course for small quick stuff i just do it via windows, but when I'm moving entire libraries (rare but it happens) it is just easier to do it without getting my network involved. It also takes my windows box out of the equation for a multi-hour operation where I might want/need to sleep,reboot or suffer a crash.
December 14, 201312 yr By default, and I know of no way to change it, UnRaid will not use the cache drive for files that already exist on the system. Sure you can. You just copy directly to the cache disk. If I was doing this move, I likely would copy the whole directory to the cache disk, delete the directory on disk5, change the share to use disk4 and finally kick off the mover to move everything to disk4.
December 15, 201312 yr Well right but then you are already delving into CLI, which is fine of course. I've done it myself in addition to using MC. I was just responding re: using windows. If your move operation results in a disk to disk move, even the cache, then all your data is going to move to the windows box and back over the network. A little overhead and not a big deal for reasonable xfers. But I don't like tying up my network or PC for tens of hours at a time when doing big moves
December 15, 201312 yr I've moved files from an array disk to the cache a number of times without the CLI being involved. Just share the cache drive on the network. FYI, your info is wrong anyways. unRAID can use the cache drive if you use Windows and copy or move files from one share to another share (with the cache drive enabled of course). This is a special case where the question was about copying or moving the share, not moving the files to another share. If the OP created a new share on disk4 with the cache drive enabled and then copied the files to that share they would go to the cache drive first.
December 18, 201312 yr I've had problems with Windows and moving files. It will quite often get confused on whether it has actually copied/moved the file or not. I get a Windows error saying it can't find the file so I cancel and then refresh and the file has always shown up. Also I could have a few network issues as I quite often get an error dialog saying the network location is not available any more when I'm copying a large amount of data (TBs). I don't get these issues with midnight commander and copying directly in unRAID from console.
Archived
This topic is now archived and is closed to further replies.