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) shrink array best way to copy data

Featured Replies

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.

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

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

 

 

  • Community Expert

Leave the trailing /

To preserve permissions add -x to the command

  • Community Expert

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

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

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

 

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

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

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

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

  • CaptainTivo changed the title to (Solved) shrink array best way to copy data

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.