Jump to content

SOLVED: How to "move" data between hard drives


Recommended Posts

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

 

 

 

Link to comment

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.

Link to comment

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

 

Link to comment

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 ?

Link to comment

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?

 

 

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

Archived

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

×
×
  • Create New...