August 18, 201114 yr Sorry if this is already posted somewhere--I only looked through the first couple pages. I am the perpetual linux noob. Can someone give me the commands I need to copy a folder from one physical drive to another? e.g., let's say I want to move the \\disk6\hd\action folder to \\disk8\hd\action Thanks
August 18, 201114 yr cp -r /mnt/disk6/hd/action /mnt/disk8/hd Then delete the original using the client, e.g., windows, mac.
August 18, 201114 yr Author thanks. I am trying to move the data from a couple 500GB hard drives onto a new 2TB hard drive. I then want to remove the 500GBs from the array completely.
August 18, 201114 yr Possibly. But you don't want to logout. You want to see when the command is finished so you can check the results and the delete the original.
August 18, 201114 yr Author I can kinda understand dgaschk's syntax (what does the -r mean?) but you just added more stuff I don't get... What does the nohup do? And what does the trailing ampersand do?
August 18, 201114 yr -r is recursive copy. & runs the command in the background, meaning that after you hit return the command line will return immediately but it will output when it completes. nohup keeps the process running if you logout or are disconnected.
August 18, 201114 yr I would use the "mv" command. Get a manpage. It will actually move the files, not copy them and leave a lengthy delete operation to be done after. If you use cp, use the "-rpv" switches. Will recurse, preserve timestamps, and list each file as it copies.
August 18, 201114 yr If you use CP, use "-rpv" switched. Will recurse, preserve timestamps, and list each file as it copies. Agreed; cp -rpv /mnt/disk6/hd/action /mnt/disk8/hd Peter
August 19, 201114 yr If you use CP, use "-rpv" switched. Will recurse, preserve timestamps, and list each file as it copies. Agreed; cp -rpv /mnt/disk6/hd/action /mnt/disk8/hd Peter I usually use this form. Does the same thing, but helps avoid typos in the path names. (Or maybe just habit.) cp -rpv /mnt/disk6/hd/action/* /mnt/disk8/hd/.
August 21, 201114 yr Author I would use the "mv" command. Get a manpage. It will actually move the files, not copy them and leave a lengthy delete operation to be done after. If you use cp, use the "-rpv" switches. Will recurse, preserve timestamps, and list each file as it copies. Thanks for all the replies so far, but I really like the idea of "moving" instead of copying. Does it use the same syntax, with the same -rpv switches that I would use for cp ?
August 21, 201114 yr Author In hindsight, the copy command will work better for me. I am going to be REPLACING these 2 500GB drives with a new 2TB drive. So I don't need to worry about deleting afterwards--they will be getting formatted or some other purpose so whatever is on them won't matter a bit. I just installed the new hard drive, formatted it, and I am copying now. Thanks for the help guys! P.S. It is a new Samsung F4 2TB hard drive, and I guess it is one of those new "AF" drives. I did NOT "pre-clear", or set it up differently with this hard drive than any of my others. Am I giving up a significant performance or reliability advantage by not using that feature?
August 21, 201114 yr Personally I always go through 1 run of Joe's preclear script. Any reallocated sectors.... the drive goes back to the manufacturer.
August 23, 201114 yr Author Well, I copied all the data from my 2 small hard drives (disk1 and disk2) onto the new hard drive (disk8). I want to REMOVE the two small hard drives from the array, put the new drive into the "disk1" position, and go from there. But I can't get unRAID to start the array unless every stinking disk is in it's original position. If I move/remove even ONE DISK, the array will not start, and there is no "RESTORE" or "trust me..." checkbox to force it to start. Which is funny, cause I remember seeing that option when I first added the new disk. Thinking I was being smart, I also upgraded from 4.6 to 4.7 when I took the server down. Don't know if that matters. UPDATE: I searched and discovered that the RESTORE button has been removed. upgrading did matter... NOTE TO LIMETECH: Someone needs to UPDATE YOUR DOCUMENTATION... They still talk about using the "Restore" button... Also, please consider ADDING BACK the "Restore" button. Perhaps available only if there is no parity drive selected at least? Anyway, I stopped the array, removed disk1, disk2, and disk8, ran the initconfig command to rebuild the array list, powered down, removed disk1 and disk2, powered up, and assigned new disk as "disk1". Disk replacement complete... Finally! Thanks to everyone for your help!!!
August 23, 201114 yr Thanks for all the replies so far, but I really like the idea of "moving" instead of copying. Does it use the same syntax, with the same -rpv switches that I would use for cp ? Only the -v option applies. mv automatically recurses and maintains the timestamps.
August 23, 201114 yr Well, I copied all the data from my 2 small hard drives (disk1 and disk2) onto the new hard drive (disk8). I want to REMOVE the two small hard drives from the array, put the new drive into the "disk1" position, and go from there. But I can't get unRAID to start the array unless every stinking disk is in it's original position. If I move/remove even ONE DISK, the array will not start, and there is no "RESTORE" or "trust me..." checkbox to force it to start. Which is funny, cause I remember seeing that option when I first added the new disk. Thinking I was being smart, I also upgraded from 4.6 to 4.7 when I took the server down. Don't know if that matters. UPDATE: I searched and discovered that the RESTORE button has been removed. upgrading did matter... NOTE TO LIMETECH: Someone needs to UPDATE YOUR DOCUMENTATION... They still talk about using the "Restore" button... Also, please consider ADDING BACK the "Restore" button. Perhaps available only if there is no parity drive selected at least? Anyway, I stopped the array, removed disk1, disk2, and disk8, ran the initconfig command to rebuild the array list, powered down, removed disk1 and disk2, powered up, and assigned new disk as "disk1". Disk replacement complete... Finally! Thanks to everyone for your help!!! Glad that you got everything resolved, but I wholeheartedly disagree (as I am sure other member here will) on the addition of the "Restore" button back into the GUI on the main page. The button has returned in 5.0b but is located on the Utils tab if I remember correctly. It is labeled as a "New Config" button I think.
August 23, 201114 yr Author Glad that you got everything resolved, but I wholeheartedly disagree (as I am sure other member here will) on the addition of the "Restore" button back into the GUI on the main page. The button has returned in 5.0b but is located on the Utils tab if I remember correctly. It is labeled as a "New Config" button I think. I understand the reason it was removed. However, I did qualify my request with "only if a parity drive is not selected", which would eliminate the accidental and disastrous use of the button, correct? But, it looks like the point is moot, as it has returned, in some form, in the 5.x version. Hopefully, it will be a solution that works for everyone!
Archived
This topic is now archived and is closed to further replies.