Solved! How to remove a drive from an UnRAID array


Recommended Posts

I'm new to UnRAID having used it for about a week now.

 

I found this link telling me how to remove a drive from my array:

https://www.lime-technology.com/wiki/index.php/Replacing_Multiple_Data_Drives_with_a_Single_Larger_Drive

 

I'm at the point where I've removed the drive I wanted to remove (after rsync'ing the data to another drive)...  

The linked procedure says "Use New Config to unassign removed drive(s)."  

 

Where is this in the webGUI?  

 

I've unassigned the drive, but the option I get for Array Operation is:

"Start will disable the missing disk and then bring the array on-line. 
Install a replacement disk as soon as possible."

 

I don't want to start it with UnRAID assuming I want to eventually replace the missing disk.

 

How do a new a "new config"? Is this terminology from an older version of UnRAID?

 

Edit:  Nevermind!  I found it under Tools.  I should have just looked around a bit more before posting.  Sorry!

Edited by Taige
Solved my own problem.
  • Like 1
  • Thanks 1
  • Haha 1
Link to comment

Look on the tools tab.

 

Many people with unRAID arrays become somewhat anal about having parity protection. A second without it is a second when you are at risk for data loss if a drive fails. Rebuilding parity is a relatively slow process, and until it is done you are not protected. For that reason, many people prefer not to remove a disk if they can help it. After all, eventually you'll need more space. 

 

But it is pretty easy to do. You just tell unRAID to foget about your current array (New Config) and then redefine the array without the disk you wanted to remove. Just make sure to assign regularly parity to parity. If you have dual parity, you'd have to rebuild the second parity (probably best to leave it out, and then add it back after the new array is started and stopped once. And it would rebuild it.)

 

There is a trickier way taking advantage of the fact that a drive full of binary zero is "invisible" to parity. So you can fill a disk with zeroes while it is in the array, then do the New Config telling it to trust parity. And define the array without that disk, telling the New Config to trust parity. Because you zeroed out the disk, parity will still be accurate. And you would have silently removed the disk (destroying any use of the disk as a backup of the data is contained). You can do a fancier trick to pull out two drives - just clone a disk (sector by sector). Two identical disks cancel each other out parity wise (at least single parity, maybe not dual) . But anyway, I digress .. :) 

 

I used to be the kind of person that looked for these "maintain parity at all costs" methods, but not any more.

 

Instead, I recommend running a parity check before removing it, and looking at the SMART attributes for every disk, before and after. By comparing the before and after values, you can see if any of the disk is having signs of impending failure. Values like reallocated sectors and pending sectors on the rise are danger signs. If you see these problems it is not a good time to remove a disk (except THAT one)! But if the before and after SMART values for these are both 0, and nothing else is looking concerning, doing the new config and rebuilding parity is very low risk.

 

Enjoy your array!

  • Like 2
  • Thanks 1
Link to comment
  • 3 years later...

When is there going to be an automatic procedure for this? Like a "prepare drive for removal" button, a "prepare drive for decommissioning" button and then also a "securely erase decommissioned drive" button. Is there a feature request that is already being worked on?

On 4/27/2017 at 11:37 AM, SSD said:

it is pretty easy to do. You just tell unRAID to foget about your current array (New Config) and then redefine the array without the disk you wanted to remove.

At this point it could alert you that you have useful data on the "decommissioning" drive and do this for you... (and by doing this for you, I mean moving the data to free space on the array for you, maintaining data safety)

Edited by skidaddl3
  • Like 9
  • Upvote 2
Link to comment
  • 1 month later...

I was just about to migrate data from 2 x 2TB disk to a single 8TB disk and then remove the 2 x 2TB drives to get back some disk bays. I didnt realise the removal process was so painful. I just added a 14TB parity disk yesterday (future proof!) and really dont want another parity check so soon (though understandable if unavoidable). But, a simple 'remove disk' option which says to poweroff, remove disk and then poweron again would be very welcome to ease my worries. Creating a new config seems a bit scary, though i'm sure I would be fine, it seems a bit against the grain to do something so drastic for a procedure most people will do at some point.

Edited by rootisgod
  • Like 3
Link to comment
16 minutes ago, rootisgod said:

I was just about to migrate data from 2 x 2TB disk to a single 8TB disk and then remove the 2 x 2TB drives to get back some disk bays. I didnt realise the removal process was so painful. I just added a 14TB parity disk yesterday (future proof!) and really dont want another parity check so soon (though understandable if unavoidable). But, a simple 'remove disk' option which says to poweroff, remove disk and then poweron again would be very welcome to ease my worries. Creating a new config seems a bit scary, though i'm sure I would be fine, it seems a bit against the grain to do something so drastic for a procedure most people will do at some point.

Since the removed disks are part of parity, parity is invalid until rebuilt without those disks. So there is going to be some process involved which takes some time. Providing an automated way to do it has probably not been a high priority since it isn't often needed and there are well documented ways to do it yourself.

 

Why did you want to "get back some disk bays" though? If the purpose is so you can add larger disks to the array instead of those smaller disks, then there is no need to "remove" anything. Just replace the smaller disks with the larger disks and let it rebuild (one at a time).

 

Link to comment
3 minutes ago, trurl said:

Since the removed disks are part of parity, parity is invalid until rebuilt without those disks. So there is going to be some process involved which takes some time. Providing an automated way to do it has probably not been a high priority since it isn't often needed and there are well documented ways to do it yourself.

 

Why did you want to "get back some disk bays" though? If the purpose is so you can add larger disks to the array instead of those smaller disks, then there is no need to "remove" anything. Just replace the smaller disks with the larger disks and let it rebuild (one at a time).

 

I didn't look at it that way before actually, replacing when I actually have a new disk is better. Plus it makes it one step, thanks!

So, could I in theory just rip out disk x, insert a blank new one of higher capacity, tell it to use that as the new disk x, then parity recovers all the data for me to the new disk? Or would that be a bit daft to rely on and it would be better to migrate data off to an existing disk first (using unbalance say) assuming I had existing space elsewhere on the array to do that?

Link to comment
13 minutes ago, rootisgod said:

So, could I in theory just rip out disk x, insert a blank new one of higher capacity, tell it to use that as the new disk x, then parity recovers all the data for me to the new disk?

Except for that "rip out" part. Hot swap isn't recommended in the array, and wouldn't help anyway since you still must stop the array in order to assign the replacement disk. So stop the array and shutdown to replace the disk. Then assign the new disk to the same slot and start the array to begin rebuilding.

15 minutes ago, rootisgod said:

Or would that be a bit daft to rely on and it would be better to migrate data off to an existing disk first (using unbalance say) assuming I had existing space elsewhere on the array to do that?

More trouble to do it that way with no added benefit. Just keep the original disk until you are satisfied the rebuild was successful.

Link to comment

Yup, I meant a 'safe' rip out! I'm not that crazy.... Great, that's very helpful. I also forgot that the original disk still has the data so I really can't lose. Thanks very much!

 

Though you may have just cost me hundreds in new hard disks ;)

 

EDIT:
I checked the new config tool just to be sure what it did, and it does seem to have a preserve option so you dont have to be super paranoid about putting things back as they were after removing some disks. So i take back my original suggestion somewhat, it seems to do the job nicely. Relevant part highlighted in green.
 

Quote

 

FROM THE NEW CONFIG TOOL SCREEN
This is a utility to reset the array disk configuration so that all disks appear as "New" disks, as if it were a fresh new server.

This is useful when you have added or removed multiple drives and wish to rebuild parity based on the new configuration.

Use the 'Preserve current assignments' selection to populate the desired disk slots after the array has been reset. By default no disk slots are populated.

DO NOT USE THIS UTILITY THINKING IT WILL REBUILD A FAILED DRIVE - it will have the opposite effect of making it impossible to rebuild an existing failed drive - you have been warned!

 

 

Edited by rootisgod
Info update
Link to comment
  • 2 years later...

I will say as of right now I would love to just remove my 24th disk that has no drive or data and is currently emulated by hitting a button and then letting my system do a parity rebuild instead of having to do the scary new config option as I have before. it takes a long time to rebuild 3TB

my total parity check takes 1.5 days on 52 TB

gets crazy when you have 28 drives in your system

Edited by SundarNET
info add
Link to comment
3 hours ago, SundarNET said:

system do a parity rebuild instead of having to do the scary new config option as I have before.

New Config is not scary, why do you think it is? Parity rebuild is exactly what New Config does by default after letting you change drive assignments. It doesn't do anything else.

 

3 hours ago, SundarNET said:

it takes a long time to rebuild 3TB

Typically 2-3 hours per TB unless you have port multipliers or hardware problems.

 

3 hours ago, SundarNET said:

total parity check takes 1.5 days on 52 TB

Time required isn't related to total size of array, only size of largest parity disk.

 

If you don't have dual parity with that many drives you definitely should take care of that too. You can add parity2 at the same time as you remove disk24 with New Config and rebuild both parity, won't take any longer than single parity.

 

No magic button is going to make rebuild any faster. If you remove a drive from the array all of parity has to be rebuilt.

 

Link to comment

i have my system check parity on the entire drive once a month it takes more than a day

new config is scary as youre removing your array if done wrong its all wonky and takes hours to fix 'scary as i get death threats when my plex server isnt running ;) JJ

I would still love a little button next to the drive that says remove me and rebuild parity but anyway.

Link to comment
  • 5 months later...
On 9/14/2022 at 11:49 AM, trurl said:

New Config is not scary, why do you think it is? Parity rebuild is exactly what New Config does by default after letting you change drive assignments. It doesn't do anything else.

 

Typically 2-3 hours per TB unless you have port multipliers or hardware problems.

 

Time required isn't related to total size of array, only size of largest parity disk.

 

If you don't have dual parity with that many drives you definitely should take care of that too. You can add parity2 at the same time as you remove disk24 with New Config and rebuild both parity, won't take any longer than single parity.

 

No magic button is going to make rebuild any faster. If you remove a drive from the array all of parity has to be rebuilt.

 

i don't understand why removing a drive from the array necessitates rebuilding the entire parity though.  if i have a 18TB parity drive and i remove a 1 TB drive from the array why does that effect the parity drive beyond the 1st terabyte.  my understanding of parity is fairly limited when it comes to galois fields but xor parity shouldn't require rebuilding the entire parity in such a case according to what i know and i'm pretty sure dual parity should work similarly

Link to comment
4 hours ago, duelistjp said:

i don't understand why removing a drive from the array necessitates rebuilding the entire parity though.  if i have a 18TB parity drive and i remove a 1 TB drive from the array why does that effect the parity drive beyond the 1st terabyte.  my understanding of parity is fairly limited when it comes to galois fields but xor parity shouldn't require rebuilding the entire parity in such a case according to what i know and i'm pretty sure dual parity should work similarly

You are correct that in theory you could get away with just rebuilding part of parity in such a case, but the problem is identifying in a fool proof way programmatically when these use cases occur and changing the parity build process to take this into account.  I think the strategy is therefore to simply play safe.

 

A 'hack' might be to use the New Config tool and check the parity is valid checkbox, and then after starting the array immediately start a correcting parity check which will start correcting parity errors in the first 1TB and then abandon the check once you get past that point and no more errors are being corrected.   However if you try this it is at your own risk, and whether it is faster I am not sure.  

Link to comment

I have a similar situation and instead of starting a new thread, I'm hoping I can put the question here.

 

I'm also a new unraid user and I've set up a test server using 2 old 1TB drives I had lying around.  One was assigned the parity and one was used as a data drive in the array.  I've set up the shares and a few docker containers along the way.  I'm now comfortable with the set up that I would like to add the real drives that I will be using on the new server.  I've purchased 2 x 18TB drives and I've already replaced the 1TB parity drive with one of the 18TB drives.  I've successfully completed a parity check.  Now I'm trying to figure out what is the easiest/quickest way to replace the 1TB data drive with the other 18TB drive.  I've pre-cleared the 18TB drive already.  But here's where I'm not sure what's the best way to replace the 1TB drive.

 

I've read that I can simply shut down the server, remove the 1TB data drive, and stick in the 18TB pre-cleared drive.  The server is supposed to be able to rebuild the array on the new 18TB drive.  But my question is... with only 1 data drive in the array (which would get removed), is that possible?  

 

Link to comment
  • 3 months later...

ok so I have been hammering my HDD's upgrading them all to 12G SAS dives all on full 12G backplanes and controllers for happy fun super fastness.

regarding the fear I have had myself of the way this all works !! I have fixed all my worries and dove into the deep end! its not scary just a little painful sometimes if you got heaps of data on the drives you want to remove

I found as long as you know your parity drives you can easily work out the rest of the drives in your system. then all you need to do is use krusader or some other type of file browser system to shuffle files from the drives you want to remove to the keepers and just do the ' new config thing and keep no assignments ' and then add/remove as many drives as you like old and new, and just keep your parity drives as the correct assignments 'they will get rewritten each new config' and this way you can add multiple new drives to an exsiting array and remove multiples at the same time 'AS LONG AS YOU COPY YOUR DATA CORRECTLY'! 

Edited by SundarNET
grammar
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.