How-to reduce array size by removing disks?


Odom

Recommended Posts

Hello,

 

I would like to remove two disks in my array, in order to reduce the amount of disks used. I replaced some 6TB disks with 14TB ones, and now that I have more space I would like to remove two other 6TB disks. The goal is to reduce the number of disks in the case (and I don't need those disks anymore).

I have 12 disks in my array, +2 parity drives

 

On Reddit somebody pointed to this procedure on a related post:
https://wiki.unraid.net/Shrink_array#Procedure

Quote

Procedure

  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 to commit the changes; system is usable now, but it will take a long time rebuilding parity

...copy-paste for ease...

 

However, the person asking at the time had 1 parity drive, whereas I have 2 parity drives. Would the same procedure still apply?

Link to comment
3 minutes ago, jonathanm said:

Yes.

 

Are the drives you are planning to remove already empty?

Yes, I used unBalance to skatter all the data from those two drives and confirmed via Krusader that nothing is on them. I also removed them from the Share Settings, so that nothing would be re-added to them.

 

Thanks very much to the both of you, I'll go and try that then.

 

Regards,

Odom

 

Link to comment
7 minutes ago, Odom said:

I also removed them from the Share Settings, so that nothing would be re-added to them.

After you successfully complete the procedure, I recommend walking through all the settings on shares and individual disks to make sure everything is set back like you want it.

 

Keep in mind that include and exclude are to be used either / or for each area. Don't populate both, use the one that utilizes the fewest entries for any given area.

Link to comment
  • 4 weeks later...

I finally got around to doing the procedure and my array is now rebuilding the parity information. I simply unassigned the drives I wanted to remove later, so my array now  looksl ike  this:

 

image.png.ce9987827f835d27a6520562c9f3f77a.png   image.png.746f2f678fd31162a972666784380f46.png

 

As you can see, some disk numbers are missing, as they are listed further down in the Unassigned Devices. Is this an issue?

Once the parity is done, I plan to shut down the server and physically remove the 4 drives in the Unassigned Devices. At that point, and before I start the array back up, can I re-assign the drives to sequencial numbers? For example, switch Disk 5 to Disk 4, then Disk 6 to Disk 5, so that they are sequential numbers again. Or will the array do this automatically once I remove the older drives?

 

Thank you all again for all your help so far, and I wish you all a Happy New Year!!

 

Odom

 

Link to comment

You would have to do another New Config to re-arrange the remaining drives.    Since the parity2 calculation takes into account drive position this would invalidate parity2.   Parity1 is unaffected by disk position - just that the same drives are involved.  I think the best way to do what you want would be:

  • do the New Config option with the option to retain current assignments
  • return to the Main tab and unassign parity2, and move disk12 to its new position (didk9?).   If any disks need moving between slots for any reason now is the time to do it.
  • tick the Parity is Valid checkbox and start the array to commit the assignments.    The array should mount all devices and will be protected by parity1
  • stop the array
  • assign parity2 again
  • start the array to rebuild parity2 with the new disk assignments.
  • (optional) run a non-correcting parity check.    If everything is good this will report zero errors.
Link to comment

In fact, if you haven't already, you might as well stop that other parity build since it can't have completed yet, and start over with the New Config with the disks assigned as you want. You would have to rebuild both parity in that case since the rebuild of parity1 will not have been completed, but it would save you all the time of doing 2 parity rebuilds with 14TB parity.

Link to comment
On 12/31/2020 at 2:26 PM, itimpi said:

You would have to do another New Config to re-arrange the remaining drives.    Since the parity2 calculation takes into account drive position this would invalidate parity2.   Parity1 is unaffected by disk position - just that the same drives are involved.  I think the best way to do what you want would be:

  • do the New Config option with the option to retain current assignments
  • return to the Main tab and unassign parity2, and move disk12 to its new position (didk9?).   If any disks need moving between slots for any reason now is the time to do it.
  • tick the Parity is Valid checkbox and start the array to commit the assignments.    The array should mount all devices and will be protected by parity1
  • stop the array
  • assign parity2 again
  • start the array to rebuild parity2 with the new disk assignments.
  • (optional) run a non-correcting parity check.    If everything is good this will report zero errors.

I tried following your procedure. In Step 2 I re-assigned all the drives so that the numbers would be sequential, and unassigned Parity 2:

image.thumb.png.a5157976b8dc9ba3fa246ddfa492d29f.png

 

However in Step 3 it doesn't allow me to start the array. I do not see the option "Parity is valid". Did I do something wrong?

 

Link to comment

According to your screen shot you have not unassigned disk12 and parity2 so they are shown as 'missing' and disk5-disk8 are showing as assigned but 'wrong' (presumably because their serial numbers are being reported slightly differently).   This will need correcting before you can start the array.

Link to comment

I see what I did wrong.... On the New Config screen, I did select "Retain current assignments", but I forgot to check the box "Yes, I want to do this".....

I now managed to go through the steps you outlined and Parity 2 is rebuilding:

 

image.png.28a1186f319100658a1651bd5bc684ce.png

 

Thank you very, very much for your help!! 😀

 

Happy New Year to all!!

 

Odom

Link to comment
  • 7 months later...

When I built my array I accidently assigned a disk to the array that I did not want to.  Is this what I am going to have to go through to remove that disk from the array?

I have already ensured there is nothing stored on it.  I just can't believe there isn't an easier way to do this.

Link to comment
5 minutes ago, givmedew said:

When I built my array I accidently assigned a disk to the array that I did not want to.  Is this what I am going to have to go through to remove that disk from the array?

I have already ensured there is nothing stored on it.  I just can't believe there isn't an easier way to do this.

No easier way than rebuilding parity for the disks you want to keep. ;)
 

The problem is that even though you ‘think’ there is nothing on the disk as far as UnRaid is concerned this not true as there are still the file system level entries that define an empty file system and these have been included when calculating parity.    The moment you remove a disk which does not have all sectors set to zeroes you are invalidating parity.

Link to comment
  • 3 weeks later...
On 8/27/2021 at 5:49 AM, itimpi said:

The moment you remove a disk which does not have all sectors set to zeroes you are invalidating parity.

After me move all the data off a drive that we want to remove, we need a way to zero that drive in the array, so we can remove it, and not need parity rebuild.  So we have continuous parity protection.  Or is there a flaw in this idea?

Edited by xrqp
Link to comment
27 minutes ago, xrqp said:

After me move all the data off a drive that we want to remove, we need a way to zero that drive in the array, so we can remove it, and not need parity rebuild.  So we have continuous parity protection.  Or is there a flaw in this idea?

Other than the time required (typically days) that works just fine. There are directions on how to do it posted.

 

The reason it's not typically recommended is the time required to zero the drives vs. the time to build parity. Time to do just one drive is probably double the time to build parity, and if you try to do multiple drives at a time it would take a LONG time.

Link to comment

Maybe what you say is because if we zeroed it in the array, the parity would have to be writing the changes as well as the disk being zeroed for removal.  Is that what you mean?

And is that about half speed of the normal method of writing to just one disk (writing the emulated disk on to the new disk via parity sync)?  

Link to comment
On 8/27/2021 at 2:40 PM, givmedew said:

When I built my array I accidently assigned a disk to the array that I did not want to.  Is this what I am going to have to go through to remove that disk from the array?

I have already ensured there is nothing stored on it.  I just can't believe there isn't an easier way to do this.

I agree, unbelievably complex. This procedure should at the very least be scripted/automatable, I think. It is in most other NAS systems, like Drobo, Synology, OMV, etc.

Link to comment

It's not really that complex. Simple way, just New Config without the disk and rebuild parity.

 

More complicated way, clear the disk (zeros to every bit of the disk) while it is in the array so parity gets updated and then the clear disk can be removed with New Config, and parity is already valid because of all those zeros on the removed disk, so it doesn't have to be rebuilt.

 

Either way it is going to take some considerable time and there is no way to avoid that time and keep parity valid. 

Link to comment

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.