Jump to content
Adrian

Shrink Array question

12 posts in this topic Last Reply

Recommended Posts

Can someone explain what exactly is going on in the final steps for clearing a drive. Specifically 11-14

 

https://wiki.lime-technology.com/Shrink_array

 

The "Clear Drive Then Remove Drive" Method

 

10. Go to Tools then New Config

11. Click on the Retain current configuration box (says None at first), click on the box for All, then click on close

12. Click on the box for Yes I want to do this, then click Apply then Done

13. 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)!

14. Click the check box for Parity is already valid, make sure it is checked!

15. Start the array! Click the Start button then the Proceed button (on the warning popup that will pop up)

16. Parity should still be valid, however it's highly recommended to do a Parity Check

Share this post


Link to post

Since the disk you're removing has been cleared it can be removed from the array without affecting parity, so parity remains valid without it.

Share this post


Link to post

I was trying to understand more of what each step is doing.

 

Quote

Click on the Retain current configuration box (says None at first), click on the box for All, then click on close

At this point, the drive is unmounted (by the script), but still assigned. How does this prepare unraid to allow me to unassign it at step 13 without causing unraid to complain about a missing disk? If I unassign it without running this, it complains that it's missing, but if I run this, it doesn't. This is the one I'm probably most unclear on that I want to understand better.

 

Quote

Click the check box for Parity is already valid, make sure it is checked!

 

This one I understand, since the drive was zeroes out, it doesn't affect parity. Telling it that parity is valid (which it is) is just a confirmation telling it that you know you removed a drive that doesn't affect parity so it can accept the parity drive as it is?

 

Share this post


Link to post
3 minutes ago, Adrian said:

At this point, the drive is unmounted (by the script), but still assigned. How does this prepare unraid to allow me to unassign it at step 13 without causing unraid to complain about a missing disk? 

Because you'll be doing a new config, and that resets all assignments.

 

4 minutes ago, Adrian said:

is just a confirmation telling it that you know you removed a drive that doesn't affect parity so it can accept the parity drive as it is?

It's not because you removed a drive, it's because you'll be doing a new config with an already valid parity, if this isn't checked a parity sync would begin instead.

 

Share this post


Link to post

Twice I've tried this method and twice it hangs on step 9. When the clearing is complete, stop the array

 

How else can I easily remove a drive that no longer has any files on it? before the steps it mentions the following:

  • One quick way to clean a drive is reformat it! To format an array drive, you stop the array and then on the Main page click on the link for the drive and change the file system type to something different than it currently is, then restart the array. You will then be presented with an option to format it. Formatting a drive removes all of its data, and the parity drive is updated accordingly, so the data cannot be easily recovered.

Could I do this instead of running the script and then continue from step 9? Because whatever this script is doing, Unraid doesn't like it and puts it in a state where it gets stuck stopping the array and I can't even reboot/shut it down cleanly. Removing an empty drive shouldn't be this difficult.

Edited by Adrian

Share this post


Link to post

Any thoughts on what the deal is with doing the drive clear method and unraid getting stuck when I go to stop it? I have another drive I want to remove. I already moved all the files off to another drive.

Share this post


Link to post

I never used the script, it may have issues with latest unRAID, you can still do it manually (array will be inaccessible during the clear):

 

1. If disable enable reconstruct write (aka turbo write): Settings -> Disk Settings -> Tunable (md_write_method)

2. Start array in Maintenance mode. (array will not be accessible during the clearing)

3. Identify which disk you're removing

4. From the command line type:

dd bs=1M if=/dev/zero of=/dev/mdX status=progress

replace X with the correct disk number

 

5. Wait, this will take a long time, about 2 to 3 hours per TB.

6. When the command completes, Stop array, go to Tools -> New Config -> Retain current configuration: All -> Apply

7. Go back to Main page, unassign the cleared device. * with dual parity disk order has to be maintained, including empty slot(s) *

8. Click checkbox "Parity is already valid.", and start the array

 

 

Share this post


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

I never used the script, it may have issues with latest unRAID, you can still do it manually (array will be inaccessible during the clear):

 

1. If disable enable reconstruct write (aka turbo write): Settings -> Disk Settings -> Tunable (md_write_method)

2. Start array in Maintenance mode. (array will not be accessible during the clearing)

3. Identify which disk you're removing

4. From the command line type:

 


dd bs=1M if=/dev/zero of=/dev/mdX status=progress
 

replace X with the correct disk number

 

5. Wait, this will take a long time, about 2 to 3 hours per TB.

6. When the command completes, Stop array, go to Tools -> New Config -> Retain current configuration: All -> Apply

7. Go back to Main page, unassign the cleared device. * with dual parity disk order has to be maintained, including empty slot(s) *

8. Click checkbox "Parity is already valid.", and start the array

 

 

 

Great, thank you!

Edited by Adrian

Share this post


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

dd bs=1M if=/dev/zero of=/dev/mdX status=progress

 

So if this is the disk I'm clearing,

 

image.png.c006851d830875762b6c34da4ecbae3e.png

 

I'd be running the following? dd bs=1M if=/dev/zero of=/dev/md16 status=progress

Share this post


Link to post

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.