Add new drive - pre-clear?


Recommended Posts

i've seen various discussions on the topic, and in general it looks like in newer versions of unraid, you may not have to pre-clear a new drive to add it?  is this true?  should it be just as simple as plugging a brand new drive in and adding it to the array?

Link to comment

Preclear has NEVER been necessary. Ever.

 

Originally, many many years ago, unraid wouldn't fully start and allow you to use it while a new drive was being cleared in preparation to participate in the parity calculation. That created a need for the ability to clear the drive before you added it, and pre-clear was born. It matured into a drive testing tool and continues in that role today.

 

Now, when you add a drive to a parity protected array, Unraid starts fully and allows you to use all the normal array functions while the newly added drive is cleared in the background. When it's done clearing, you will be given the option to format it and start using it to store data. Pre-clear isn't necessary now, and it wasn't necessary before, just a convenience.

 

However... because unraid requires the full rated capacity of ALL drives, even empty ones, to be perfectly readable to accurately reconstruct a failed drive, it is prudent to test drives before trusting them in the array. This can be accomplished with the drive manufacturers tools, third party drive testing utilities, or preclear. It's just one option, a very thorough option, to test drives.

 

If a drive is precleared successfully, then as long as it remains in that state with no changes, format, partition or otherwise, then when you add the drive to the parity protected array unraid detects the special preclear signature and trusts that the drive is clear and immediately offers to format it instead of clearing it. However, the preclear utility takes WAY longer to do its job than the built in clear which doesn't do testing and verification does, so the fastest option is indeed just to plug in the new drive and add it to the array.

Link to comment
3 hours ago, bonzovt said:

so plugging it in and allowing it to clear in the background is enough for the array to detect that the drive is good to add into the array?

Yes. 

 

The wisdom I've used is brand new drives you can just plug it in and add to the array using native functionality, and used drives it makes sense to do a full pre-clear run.

Link to comment
9 hours ago, bonzovt said:

so plugging it in and allowing it to clear in the background is enough for the array to detect that the drive is good to add into the array?

Noooo! (see below)

5 hours ago, plttn said:

Yes. 

 

The wisdom I've used is brand new drives you can just plug it in and add to the array using native functionality, and used drives it makes sense to do a full pre-clear run.

Noooo!

 

You both missed the point.

A drive should be tested before being added to the array, regardless if brand new or used.

  • The built-in clear function is to prep the disk for the array. It does nothing in determining whether the disk is "good" or not i.e. it is not a testing tool.
  • Brand new disks can certainly fail, too. The probability may be less than used ones but it's certainly neither zero nor negligible. Are you sure the courier hasn't dropped it? Are you sure it is free of manufacturing defects? A lot of things can go wrong along the way by the time the disk arrives in your hand.

As jonathanm said, it doesn't matter what you use, you should test the disk before adding to the array. The pre-clear plugin is simply a free convenient universal tool at your disposal.

 

Remember:

  1. If your data is important, you don't want it to be the guinea pig to see if a disk is good or not.
  2. Even if your data is not that important, your time is. A failed disk will cost you time trying to diagnose and rectify issues.

 

Also, just in case you haven't seen the warning elsewhere. NEVER run pre-clear on an SSD.

Edited by testdasi
Link to comment

Personally, I have had more FAILED NEW DRIVES than used ones when pre-clearing them over the years.  I would never just trust a new drive, or an old drive when adding it to an array.  To me the whole purpose of using unraid is for more data safety and peace of mind.  Not an increase in headaches and risk while gambling with my data.

Link to comment
On 6/7/2019 at 10:53 AM, testdasi said:

Also, just in case you haven't seen the warning elsewhere. NEVER run pre-clear on an SSD.

Perhaps you ought to explain why not. Of course, it's completely unnecessary and will wear it a bit but it isn't going to destroy it, is it? I'm not sure it warrants a warning in bold, red and with capitals. I don't see how it would do any more damage than filling it up with files and then deleting them, which is how a lot of people use an SSD as a cache disk. Are logic zeros more wearing to write to NAND flash than a random mix of ones and zeros? I don't know. I'm just curious.

Link to comment
19 hours ago, John_M said:

Perhaps you ought to explain why not. Of course, it's completely unnecessary and will wear it a bit but it isn't going to destroy it, is it? I'm not sure it warrants a warning in bold, red and with capitals. I don't see how it would do any more damage than filling it up with files and then deleting them, which is how a lot of people use an SSD as a cache disk. Are logic zeros more wearing to write to NAND flash than a random mix of ones and zeros? I don't know. I'm just curious.

I accidentally ran a preclear on the SM951 to about 10% completion.

There was actually no error during the preclear process but within a few hours, reallocated sector count went up to 8 and Uncorrectable error count went up to 102.

The drive was in perfect health before that and the counts have been stable since so I can only attribute those errors to the preclear.

 

I reckon the way preclear does its writes may be messing with the controller, perhaps the wear-levelling algorithm.

RSC = 8 looks rather coincidentally suspicious to me since 8 sectors = 4k, sounds to me like the controller tries to write repeatedly to the same cell or something.

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.