CaptainTivo

(Solved) shrink array best way to copy data

11 posts in this topic Last Reply

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

 

 

Share this post


Link to post

Leave the trailing /

To preserve permissions add -x to the command

Share this post


Link to post

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

Share this post


Link to post
Posted (edited)
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

Share this post


Link to post

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

 

Share this post


Link to post
5 minutes ago, pwm said:

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.

 

 

Oops.  You are right. I upgraded a couple of weeks ago and forgot to update my .sig.

Thanks.

Share this post


Link to post
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

Share this post


Link to post
10 hours ago, johnnie.black said:

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

 

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

Got it.  Quite a useful tool.

I just copied about 980 Gig from disk to disk at about 39 MB/s.  That seem right?

Share this post


Link to post
9 hours ago, CaptainTivo said:

I just copied about 980 Gig from disk to disk at about 39 MB/s.  That seem right? 

Sounds right if using parity, it might go a little faster with turbo write enable.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Copyright © 2005-2018 Lime Technology, Inc.
unRAID® is a registered trademark of Lime Technology, Inc.