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.

Pre-clearing... Must do or Should do?

Featured Replies

Over the past month I have been tearing though the boards trying to find answers to questions that I had at the time or things I knew I might eventually look for. That being said, I have read so many articles about issues with pre-clearing: pre-clearing taking longer than expected, pre-clearing being a life-saver, pre-clearing locking up in-process, pre-clearing- don't leave home without it, etc.

 

So, once and for all, I would like to know: Is pre-clearing essentially just a burn-in test for a new drive and if so, is it just something that is recommended or a requirement? Please explain your answers, as it appears from the many posts I've read that opinions vary. (I'm asking because I really want to know what you thing and why; not to start flame wars or to "be an a$$").

Highly recommended. it exercises every sector.

In either case, the drive will be precleared before it is added to the array.

If you do not pre-clear it with Joe L's tool, emhttp will do it, but with less feedback about the smart statistics.

 

 

Highly recommended as a burn in test.  It is much preferred to know that you have a bad drive before adding it to the array.

 

If you do not preclear the disk, unRAID will clear it for you.  unRAID will take many hours to complete this operation - and I believe that the array is offline during this time.  If the disk is precleared, it is added to the array immediately without any downtime.

 

Your choice, but the experienced users here preclear their new disks.

If you do not clear the drive using the pre-clear script then unRAID will perform a clearing step for you.

 

The speed to "write" to a disk averages between 60 and 100 MB/s.    At 100 MB/s it will take 10 seconds per Gigabyte.  For a 2TB drive, that is roughly 10 * 2000 = 20,000 seconds or 333.33 minutes, or 5.55 hours.   The step of writing zeros to a drive takes roughly the same time if done by the preclear_disk.sh script, or by the unRAID management utility process "emhttp"

 

There is a difference though.

 

If you do not pre-clear a disk and you let the unRAID management utility do it for you, the array will be off-line during the clearing process.(unable to serve files) Aditionally if you do not pre-clear a disk, you'll not learn if it has problems until after you assign it to your array.

 

If you do perform the clearing step with the preclear_disk.sh script (pre-clearing as it is known) then you will subject the drive to a full set of reads (pre-reads), writes (same as management console), and post-reads on all sectors.    When reading the disks the process also constantly requests random sectors as well as the first and last sector of the disk.  This keeps the disk heads constantly seeking from track to track in an attempt to uncover any early mechanical failures. (best to have it fail BEFORE you trust it with your data)

 

This pre-read/write zeros/post-read cycle will permit the SMART firmware on the disk to identify sectors it cannot read and subsequently re-allocate them from its pool of spare sectors.   During the post-read the data is verified to ensure it is all zeros.  (we've seen drives that randomly return other values after being cleared with absolutely no errors otherwise.   These cause hair loss since files stored on them cannot be read back reliably. (You'll pull your hair out trying to figure out why parity checks sometimes return errors)

 

The preclear_disk.sh script will take about 6 times the time of a straight "write" to the disk.  The pre and post-read processes take longer than the write since we are reading many more sectors from random places on the disk.  The post-read takes longer since the data read is verified as being zero.    Use of the preclear_disk.sh script to pre-clear a 2TB drive typically takes between 30 and 35 hours per cycle (you can request up to 20 cycles).

 

The preclear_disk.sh process will occur while your array is on-line and available for use by you and your family.  It can only be used on a disk that is not assigned to the array.   The down-time when subsequently assigning the disk to the array is only a few minutes.  (The time needed to stop the array assign the drive, and then re-start the array)

 

So... you do not need to pre-clear a disk... if you are feeling lucky, know your disk is electrically and mechanically perfect, and if you can deal with the extended outages (and the family) while a disk is being cleared by the web-management process.

 

Joe L

  • Author

I appreciate the insight gentlemen. I am especially intrigued by the revelation that having the disks pre-cleared allows for a near-instant addition to the array. Downtime is not anyone's friend when they need access to their data. Previous posts I have read have beat the "taking the disk for a test run" purpose to death. I was more concerned about any other benefits or detractions of the pre-clear process. Thanks for your time: WeeboTech, bjp999, and Joe L.

 

Any others that feel inclined to offer any further input, please feel free to add to the conversation! :)

For me if it wasn't for the fact that after the preclear its ready for install its the fact that I know the drive has been flogged and survived. My data is important to me just like the next person and I can not loose it. Sure this doesn't promise that your data will survive, but it does prove that it can take the abuse of all the reading and writing to the extreme.  ;D

I am especially intrigued by the revelation that having the disks pre-cleared allows for a near-instant addition to the array.

 

Yes, actually this is the biggest reason I started pre-clearing drives (especially because I am all 2TB drives and they take forever to scan), even more than the risk mitigation with regards to discovering soft or hard errors.  I want my array to remain online as much as possible (mine is normally on 24/7).

 

But I certainly don't mind the added benefit of getting a baseline SMART status on the drive from the time when preclear completes... otherwise when I start seeing things like current_pending_sector or reallocated_sector_ct come up I wonder "was this a condition of the drive at time of purchase, or is this a new development?"

 

Definitely a recommended practice and not a requirement.  However, if you wish to use a drive as a warm spare, I consider preclearing that drive to be an absolute requirement.  Simply put, you can't really trust a drive until it has been precleared.

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.