Is it possible to skip "Clearing" when adding new disks to the array?


Recommended Posts

Hi Everyone,

 

I just added two new disks to my existing array. Unraid is currently clearing the disks which should take approx. 20 hours.

 

Is there anyway to skip the clearing process, and make the disks usable immediately?

 

I realize this is not considered best practice, but my array is out of space, and I'm unable to store footage from my security cams.

 

Thanks in advance.

Link to comment
9 minutes ago, ssean said:

s there anyway to skip the clearing process, and make the disks usable immediately?

If you are adding a disk to a new slot in an array that has parity, preclear will start automatically.  No way to avoid that.  This is so parity will still be valid after adding the new disk.  The array can still be used while this is happening.  You also have the option of running preclear (plugin) on a disk before adding it to the array.  Again this can be done while the rest of the array functions normally.

 

If you are replacing an existing disk with a new one, preclear is not necessary but unRAID will rebuild the data from the old disk onto the new one.

 

Or there is the "new config" way as mentioned above.

Edited by Hoopster
Link to comment
3 minutes ago, ssean said:

Hi Everyone,

 

I just added two new disks to my existing array. Unraid is currently clearing the disks which should take approx. 20 hours.

 

Is there anyway to skip the clearing process, and make the disks usable immediately?

 

I realize this is not considered best practice, but my array is out of space, and I'm unable to store footage from my security cams.

 

Thanks in advance.


A disk must be all zeroes before it can be added to the array without affecting parity.

 

The  ‘clearing’ process is Unraid doing this by writing zeroes to every sector on the drive at the time you add the drive.

 

The other alternative is to write zeroes to every sector on the drive BEFORE attempting it to the array.   This is known as Pre-Clear (currently best supported by the Unnassigned Devices Preclear plugin) and can be done while the array is being used for other purposes.   If you have done this then the pre-clear writes a special signature to the drive so that when you add the disk to the array then Unraid will realise that the disk is all zeroes and add it and make it immediately available.   The pre-clear process can also be used to carry out a confidence check on the drive before using it in Unraid.

Link to comment
  • 10 months later...
On 4/4/2022 at 1:26 PM, Hoopster said:

If you are adding a disk to a new slot in an array that has parity, preclear will start automatically.  No way to avoid that.  This is so parity will still be valid after adding the new disk.  The array can still be used while this is happening.  You also have the option of running preclear (plugin) on a disk before adding it to the array.  Again this can be done while the rest of the array functions normally.

Sorry for waking up an old thread, but I'm currently using the preclear plugin to preclear a 3TB disk because I didn't want the array to be down the entire time it has to clear that disk.  This is working fine for me, even though it takes quite a while.  But it seems that you are saying here that you can add a new disk to the array and continue to use the array while the new disk is clearing?  Maybe I'm reading your comment wrong.  My understanding is that to add a new disk you have to bring the array down, and it can't be brought up until the disk is cleared, right?  So using the preclear plugin is the only way to do all that clearing while the array is still up?

Link to comment
8 minutes ago, paqman said:

But it seems that you are saying here that you can add a new disk to the array and continue to use the array while the new disk is clearing?  Maybe I'm reading your comment wrong.  My understanding is that to add a new disk you have to bring the array down, and it can't be brought up until the disk is cleared, right? 

You could have just added the disk to the array and Unraid would have formatted it and then ask to start a preclear.  Yes, it takes a while but the array can be used while disk is preclearing.  It will just likely be slower.  While running the preclear plugin you can also use the array normally.

 

Here is the section from the manual (linked in the bottom right corner of Unraid GUI) regarding adding disks.

 

Adding disks

 

Clear v Pre-Clear

Under Unraid a 'Clear disk is one that has been completely filled with zeroes and contains a special signature to say that it is in this state. This state is needed before a drive can be added to a parity-protected array without affecting parity. If Unraid is in the process of writing zeroes to all of a drive then this is referred to as a 'Clear' operation. This Clear operation can take place as a background operation while using the array, but the drive in question cannot be used to store data until the Clear operation has completed and the drive been formatted to the desired File System type.

 

A disk that is being added as a parity drive or one that is to be used to rebuild a failed drive does not need to be in a 'Clear' state as those processes overwrites every sector on the drive with new contents as part of carrying out the operation. In addition, if you are adding an additional data drive to an array that does not currently have a parity drive there is no requirement for the drive to be clear before adding it.

 

You will often see references in the forum or various wiki pages to 'Preclear'. This refers to getting the disk into a 'Clear' state before adding it to the array. The Preclear process requires the use of a third-party plugin. Prior to Unraid v6, this was highly desirable as the array was offline while Unraid carried out the 'Clear' operation. but Unraid v6 now carries out 'Clear' as a background process with the array operational while it is running so it is now completely optional. Many users still like to use the Preclear process as in addition to putting the disk into a clear state it also performs a level of 'stress test' on the drive which can be used as a confidence check on the health of the drive. The Preclear as a result takes much longer than Unraid's more simplistic 'clear' operation. Many users like to Preclear new disks as an initial confidence check and to reduce the chance of a drive suffering from ‘what is known as infant mortality’ where one of the most likely times for a drive to fail is when it is first used (presumably due to a manufacturing defect).

 

It is also important to note that after completing a 'Preclear' you must not carry out any operation that will write to the drive (e.g. format it) as this will destroy the 'Clear' state.

Link to comment
11 minutes ago, trurl said:

This is backwards. If you clear a disk after it is formatted, it is no longer a formatted disk.

 

Unraid will clear the disk before including it in the array, then you can format it.

Yes, I typed that backwards.  :)

 

Fortunately I included the manual text which has it correct despite my brain freeze.

Edited by Hoopster
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.