(Solved) shrink array best way to copy data


Recommended Posts

Hi,

I need to consolidate some data and plan to remove a couple of old, low density drives.  I plan to use this procedure: (found here: https://lime-technology.com/wiki/Shrink_array)

 

  1. Make sure that the drive or drives you are removing have been removed from any inclusions or exclusions for all shares, including in the global share settings. Shares should be changed from the default of "All" to "Include". This include list should contain only the drives that will be retained.
  2. Make sure you have a copy of your array assignments, especially the parity drive. You may need this list if the "Retain current configuration" option doesn't work correctly
  3. Stop the array (if it is started)
  4. Go to Tools then New Config
  5. Click on the Retain current configuration box (says None at first), click on the box for All, then click on close
  6. Click on the box for Yes I want to do this, then click Apply then Done
  7. Return to the Main page, and check all assignments. If any are missing, correct them. Unassign the drive(s) you are removing. Double check all of the assignments, especially the parity drive(s)!
  8. Do not click the check box for Parity is already valid; make sure it is NOT checked; parity is not valid now and won't be until the parity build completes
  9. Start the array; system is usable now, but it will take a long time rebuilding parity

 

First, I need to copy all the data from the drive_to_be_removed to a_drive_that_will_stay in the array.

Can I do something as simple as:

 

cp -r /mnt/drive_to_be_removed /mnt/a_drive_that_will_stay, 

e.g cp -r /mnt/disk4 /mnt/disk8

 

Then  change all the shares to include only the disks that will remain and do the "New config".

BTW, after the array is restarted and the parity is rebuilt, can the switch the shares back to default (all drives)?

 

Thanks.

Link to comment
9 hours ago, CaptainTivo said:

cp -r /mnt/drive_to_be_removed /mnt/a_drive_that_will_stay, 

e.g cp -r /mnt/disk4 /mnt/disk8

That will work, I prefer rsync since it will resume the operation if there's need to abort for some reason.

 

9 hours ago, CaptainTivo said:

Then  change all the shares to include only the disks that will remain and do the "New config". 

BTW, after the array is restarted and the parity is rebuilt, can the switch the shares back to default (all drives)?

No need to change this, unless you change the order of the disks and had shares including/excluding specific disks.

Link to comment
7 hours ago, johnnie.black said:

That will work, I prefer rsync since it will resume the operation if there's need to abort for some reason.

 

No need to change this, unless you change the order of the disks and had shares including/excluding specific disks.

 

Ok.  Never used that before.  Read the man pages.

Does this look right?

 

rsync -avh /mnt/disk4/ /mnt/disk8/

 

executed by superuser while telnetted to the server.

not sure if the trailing "/"s are needed.  One page said this meant "copy the files in the directory" not "copy the directory"

also unsure if this preserves the target directory's permissions.

 

Thanks.

 

 

Link to comment
1 hour ago, johnnie.black said:

On second thought I believe -a already maintains permissions, -x keeps extended attributes, on phone so can't confirm now

 

Yeah, -X (capital) keeps the permissions, -x says "This tells rsync to avoid crossing a filesystem boundary when recursing."

but -a does what I want, I think.

 

BTW, I don't see how this can resume if aborted.

 

Thanks for the help.

Edited by CaptainTivo
forgot to add the comment about aborting
Link to comment

Your signature claims you run the ancient v5.0.5.


I guess you haven't turned on the setting to show signatures, and adjusted your signature.

 

1 hour ago, CaptainTivo said:

UnRAID v5.0.5

Motherboard:ECS A885GM-A2

Processor: AMD Athlon II X2 260, Memory: 8GB

RAID card: SUPERMICRO AOC-SASLP-MV8,

Disks: Parity:  HGST 4TB, Array:1x HGST 4TB,  4xWD30EZRX, 2xWD20EARS, 1xWD20EARX,1xWD10EADS, cache: 1xST31000528AS

 

Link to comment
15 hours ago, CaptainTivo said:

Yeah, -X (capital) keeps the permissions, -x says "This tells rsync to avoid crossing a filesystem boundary when recursing."

but -a does what I want, I think.

Yeah, sorry about that, -a (archive) includes -p (permissions)

 

15 hours ago, CaptainTivo said:

BTW, I don't see how this can resume if aborted.

It will skip all completely copied files and continue the copy.

  • Upvote 1
Link to comment
  • CaptainTivo changed the title to (Solved) shrink array best way to copy data

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.