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.

SOLVED: How to "move" data between hard drives

Featured Replies

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

 

 

 

cp -r /mnt/disk6/hd/action /mnt/disk8/hd

 

Then delete the original using the client, e.g., windows, mac.

  • 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.

nohup cp -r /mnt/disk6/hd/action /mnt/disk8/hd &

 

better, no?

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.

  • 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?

-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.

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.

I also have the same question.

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

 

 

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/.

 

is there a reason no one's recommending midnight commander (what i use)?

  • 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 ?

  • 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?

 

 

I also use MC to do this.  (Midnight Commander)

 

 

Personally I always go through 1 run of Joe's preclear script.  Any reallocated sectors.... the drive goes back to the manufacturer.

  • 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!!!  :)

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.

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.

  • 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.

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.