Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Preclear vs. format [solved]

Featured Replies

Can someone tell me what pre-clearing does?  Based on the description I've read, it formats the drive & flags it to tell unRAID it's ready to go.  What is pre-clearing doing past the standard format?  Additional tests?  Tests specific to unRAID?

It does NOT format a drive. Whatever you read that says it does is wrong.

 

Unless you give it specific options to skip certain phases, it

 

1. reads the entire disk.

2. writes zeros to the entire disk

3. reads the entire disk once more, verifying the zeros that were written can be read.

4. writes a specific signature to the disk that unRAID will recognize, so it will skip its own writing of zeros to the drive when you add the drive to an existing array.

 

It does not partition the drive...  not with a valid partition anyways, nor does it format the drive.  

 

The initial read allows the SMART firmware on the disk to identify un-readable sectors.

Writing zeros should allow the SMART firmware to re-allocate those un-readable sectors to those from its pool of spare sectors.

The second read of the disk verifies that the zeros written can be read back as zeros.

 

And that's it.    Nowhere did I mention "format" other than to say it is NOT formatted.  It is not even partitioned. (although the pre-clear signature is somewhat similar)

 

Joe L.    

I can tell you one thing for sure. It beats the heck out of your drive and is a good self check to know if your drive is going to trustworthy in the array and allows you to use your array while it prepares your drive for use. If you didn't preclear you would have to wait for unRAID to preclear and there is no access to the array while it does it.

 

Highly recommend script and Joel L did an awesome job on it.

  • Author

Thanks for the response. S80_UK - don't be so quick to jump on us newbees- I did search, found the page you referenced and read it, and still did not completely understand- hence the question.  It's my understanding that in formatting a HD (like on a windows machine), the machine writes zeros on the entire disk.  Its when I saw later in the article: "The "Format" button will appear after you start the array after assigning a pre-cleared drive..." that spawned my question.  My reasoning- I was thinking about burning in my drives on my Windows machine using my existing test software to avoid touching my array as much as possible- fewer things can go wrong with fewer interactions to the box.  I'm willing to spend more time/effort testing the drives my way unless preclear does something more than described.  That being said, I've decided to do my standard burn-in AND run preclear.  Thanks to everyone for the input.

I would personally let unRAID do its thing using the preclear script. You just drop in your disks, hit the command line and run it. Mean while you can still use your array or stare at the command line while preclear is running. ;)

 

Unless your completely sure what you are doing is going to do the very same thing you might end up repeating it anyways. LOL

Thanks for the response. S80_UK - don't be so quick to jump on us newbees- I did search, found the page you referenced and read it, and still did not completely understand- hence the question.  It's my understanding that in formatting a HD (like on a windows machine), the machine writes zeros on the entire disk.

that is not true.  It writes the disk structures needed to track files.  In some cases, it might zero out everything else, but it certainly does not leave the disk zeroed or write zeros to the entire disk...  Most people would not wait the time for it to "format" a modern large disk if it was writing to the entire disk in the same way that the preclear script does.

 

Most modern disks can be written to at between 60MB/s and 100MB/s.  (the speed slows on inner cylinders where areal density is less)

At 100MB/s it takes 10 seconds to write 1GB.  (at that speed, you can write 6 GB per minute)

A 2TB (2000GB) disk would then take 333 minutes to completely write.  (about 5.5 hours)

At the slower speed of 60MB/s it will take 16.6 seconds to write 1GB.   A 2TB (2000GB) disk would take 9.25 hours to completely write.

 

Use whatever tools you like.  The preclear script when reading exercises the disk by also interspersing random reads of sectors from all over the disk, therefore, it does a lot of "seeking" and in that way uncovers mechanical issues that might show not show up otherwise.   The linear track-by-track reads and writes by other utilities will not detect those.

 

Regardless of the tools you use, you can always use the test built into the preclear script to determine if the disk will be considered precleared by unRAID.

preclear_disk.sh -t /dev/sdX

 

That command takes a few seconds to run, and will let you know if a given disk is considered precleared.   If not "precleared", and if the signature unRAID is looking for is not present, when you add the drive to an existing parity protected array, unRAID will keep the array off-line while it writes zeros to the entire drive.  (and you'll not have access to your array for the 6 to 10 hours while it is doing that. )

 

Either way, once the disk is added to the parity protected array, you'll then need to press the "Format" button.  That takes only a few minutes. (as it only writes the basic file-system structures, and does not write to the entire drive)

 

Joe L.

Thanks for the response. S80_UK - don't be so quick to jump on us newbees- I did search, found the page you referenced and read it, and still did not completely understand- hence the question.  It's my understanding that in formatting a HD (like on a windows machine), the machine writes zeros on the entire disk.  Its when I saw later in the article: "The "Format" button will appear after you start the array after assigning a pre-cleared drive..." that spawned my question.  My reasoning- I was thinking about burning in my drives on my Windows machine using my existing test software to avoid touching my array as much as possible- fewer things can go wrong with fewer interactions to the box.  I'm willing to spend more time/effort testing the drives my way unless preclear does something more than described.  That being said, I've decided to do my standard burn-in AND run preclear.  Thanks to everyone for the input.

 

My apologies.  To me, the thread was very clear.  We all sometimes forget that others may have less experience with which to "fill the gaps" and so what makes complete sense to me might be confusing to you, or might still leave questions unanswered.  I should have known better.

 

What does not help here is the way that terminology has changed over the years.  Formatting is a good example.  30+ years ago it used to mean writing everything.  20 years ago, it meant writing sector headers and data but with other stuff only ever being written in the factory.  More recently it generally means either just writing a few blocks to lay down the basis of a filing system but checks pretty much nothing (a typical windows quick format), or that all of the data is read (to find bad blocks) and then a filing system is laid out.  As Joe L has explained (and was the bit that was missing I guess) - Preclear does a load more than just that, by reading, writing and re-reading the entire data area of the disk and exercising it mechanically at the same time, but the filing system part of the formatting is still taken care of by unRAID.  

 

I hope we have not put you off and I hope that you choose to use and enjoy the benefits of unRAID.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.