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.

Unassigned Devices Preclear - a utility to preclear disks before adding them to the array

Featured Replies

On 12/6/2025 at 6:09 AM, Ben9 said:

Hi there! I recently purchased a new 14 TB WD Red Pro hard drive, but I’m having trouble performing a Pre-Read check. It’s strange that It failed immediately. I’ve tried restarting my PC, changing the SATA port, but the issue persists after three attempts. I’m curious to know if you think my drive is failing or if there’s something else going on. (I’ve never formatted my drive before.) Thanks for your help!

(sdd)

tower-diagnostics-20251205-2304.zip

image.png

image.png

tower-diagnostics-20251205-2304.zip

This just happened to me with this exact drive and I turned off drive spindown and it worked after

Edited by Nimitz

  • Replies 846
  • Views 236.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Update the UD preclear plugin.

  • I am no longer working on this plugin. LT has taken over the maintenance and support. You will need to contact them about any issues or concerns you have. Future releases will come from them, and n

  • Not really, I assume the GUI is using some old disk info and not refreshing to get the current one, since it also happens the other way around, i.e., if you boot with a precleared disk and then format

Posted Images

Hello,
It has been a while since preclearing a disk with UD
Does anyone know where the 'eyeball' icon went in the GUI to view the preclear status window went... am I blind, or does it appear later in the clear?

image.png

I received the notification the job started and would like to monitor it ... I recall there was a way to do this in the past to see the status window somehow....perhaps I am jumping the gun as the first cycle is pre-read and the status is unavailable during this stage?

Edited by bombz

8 minutes ago, bombz said:

Does anyone know where the 'eyeball' icon went in the GUI to view the preclear status window went... am I blind, or does it appear later in the clear?

It's now in Tools - Preclear

1 hour ago, JorgeB said:

It's now in Tools - Preclear

Awesome thank you @JorgeB !

On 11/27/2025 at 11:44 AM, Rekonnected said:

Seconding this, preclear was an effetcive waste of several days on 7.2.2. System started a clear anyway. The signature application step needs to be rechecked.

This should be fixed in 7.2.3, please retest.

Hi! I recently got two refurbished/recertified 26TB Seagate drives and started a default preclear run on them. One had an error and the other looks like it's still running in the GUI but seems to have also stopped, since the report hasn't updated in the last hour.

Unraid Version 7.2.1

Disk 1 - error

Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951:  Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1578: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1579: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; magic8 corrupted  preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Error: Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1534: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; magic8 corrupted Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: ATTRIBUTE               INITIAL NOW STATUS Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Reallocated_Sector_Ct   0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Power_On_Hours          0       3   Up 3  preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Reported_Uncorrect      0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1578: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Airflow_Temperature_Cel 31      38  Up 7 Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Current_Pending_Sector  0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Offline_Uncorrectable   0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: UDMA_CRC_Error_Count    0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.:  Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1534: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1578: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:49 preclear_disk_ZXA03R6A_109951: error encountered, exiting ...

Bildschirmfoto_20251220_012245.pngBildschirmfoto_20251220_012856.png

Disk 2 - warning

Dec 19 21:15:47 preclear_disk_ZXA0SPCC_116051: Preclear Disk Version: 1.0.31 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Disk size: 26000658268160 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Disk blocks: 6347816960 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Blocks (512 bytes): 50782535680 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Block size: 4096 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Start sector: 0 Dec 19 21:15:50 preclear_disk_ZXA0SPCC_116051: Pre-read: pre-read verification started 1 of 5 retries... Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051:  Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: malloc: jobs.c:1534: assertion botched Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: SIGEXIT received, exiting ... Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: free: underflow detected; mh_nbytes out of range Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: Aborting.../usr/local/emhttp/plugins/unassigned.devices.preclear/scripts/preclear_disk.sh: line 595:  100 /  32835844 : arithmetic syntax error: operand expected (error token is " 100 /  32835844 ")

Bildschirmfoto_20251220_012339.png

Bildschirmfoto_20251220_012939.png

Any idea what the problem might be?

5 hours ago, AndiAUT said:

Hi! I recently got two refurbished/recertified 26TB Seagate drives and started a default preclear run on them. One had an error and the other looks like it's still running in the GUI but seems to have also stopped, since the report hasn't updated in the last hour.

Unraid Version 7.2.1

Disk 1 - error

Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951:  Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1578: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1579: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; magic8 corrupted  preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Error: Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1534: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; magic8 corrupted Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: ATTRIBUTE               INITIAL NOW STATUS Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Reallocated_Sector_Ct   0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Power_On_Hours          0       3   Up 3  preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Reported_Uncorrect      0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1578: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Airflow_Temperature_Cel 31      38  Up 7 Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Current_Pending_Sector  0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: Offline_Uncorrectable   0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.: UDMA_CRC_Error_Count    0       0   - Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: S.M.A.R.T.:  Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1534: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: Aborting... Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: malloc: jobs.c:1578: assertion botched Dec 20 00:42:48 preclear_disk_ZXA03R6A_109951: free: underflow detected; mh_nbytes out of range Dec 20 00:42:49 preclear_disk_ZXA03R6A_109951: error encountered, exiting ...

Bildschirmfoto_20251220_012245.pngBildschirmfoto_20251220_012856.png

Disk 2 - warning

Dec 19 21:15:47 preclear_disk_ZXA0SPCC_116051: Preclear Disk Version: 1.0.31 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Disk size: 26000658268160 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Disk blocks: 6347816960 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Blocks (512 bytes): 50782535680 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Block size: 4096 Dec 19 21:15:48 preclear_disk_ZXA0SPCC_116051: Start sector: 0 Dec 19 21:15:50 preclear_disk_ZXA0SPCC_116051: Pre-read: pre-read verification started 1 of 5 retries... Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051:  Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: malloc: jobs.c:1534: assertion botched Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: SIGEXIT received, exiting ... Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: free: underflow detected; mh_nbytes out of range Dec 20 00:42:42 preclear_disk_ZXA0SPCC_116051: Aborting.../usr/local/emhttp/plugins/unassigned.devices.preclear/scripts/preclear_disk.sh: line 595:  100 /  32835844 : arithmetic syntax error: operand expected (error token is " 100 /  32835844 ")

Bildschirmfoto_20251220_012339.png

Bildschirmfoto_20251220_012939.png

Any idea what the problem might be?

This looks like a memory (RAM) issue, I'd run a memory test.

  • Author
17 hours ago, AndiAUT said:

Any idea what the problem might be?

The malloc assertion botched message is either there was not enough memory to fulfill the request or there is a bug in preclear. Unfortunately, the current preclear script uses a buffer file in the tmpfs ram file system to read and write disk data. Most of the time this shows up as not enough memory that preclear detects and it stops running when preclear sees there is not enough memory.

The size of the buffer depends on the disk size and with a bigger disk that can be extremely large. The preclear script needs to be rewritten to do reads and writes without using a memory buffer.

I removed the read after write check some time ago that verified that zeroes were actually written to the disk during the write cycle as it was time consuming (the preclear time was about 2X a write cycle alone). The cycle was write zeroes and then read the disk and verify zeroes were written. The read has to insure the actual disk was read, and not the disk buffer. This takes time - at least one revolution of the platter, maybe more for the read after write.

I did not get back to to remove the buffer file use as it is a major rewrite. With newer model disks, the cycle should be:

  • Optionally do a pre-read, but don't verify zeroes were actually written.

  • Write zeroes to all sectors of disk without any errors appearing. Don't use a memory buffer.

  • Check SMART report for disk problems while writing to detect a failing disk before a complete write cycle is finished saving a lot of time.

  • Write a preclear signature if disk does not have issues.

  • Optionally do a post-read, but don't verify zeroes were actually written.

Modern disks will report issues with reads and writes and show in the SMART report things like pending and uncorrectable sectors that indicates problems.

The disk that is hanging is probably a bug in preclear.

Thanks both of you. I think it was the RAM. I ran a memtest which failed so I checked every stick and it seems one of them is faulty. Will use three sticks for the time being, because of the insane prices currently.

In the next days I wont be able to do a full run, so it will be a while until i can try preclearing the disks again, or I will just yolo it and add the disks.

Thanks again!

On 12/17/2025 at 8:43 AM, bombz said:

Awesome thank you @JorgeB !

Follow up.
Have added a new disk to UD for another net-new pre-clear, however unraid is detecting the drive signature as already cleared, I do believe this a due to how UD mounts the disk seeing 'like disk' as already completed.
How would one go about starting a fresh pre-clear when this occurs?

Is it possible the previous disk that was cleared successfully, the preclear tool didn't stop the session, and the drive was powered down via external dock... and the GUI requires all sessions to be stopped BEFORE the disk is powered down?

image.pngimage.png

Edited by bombz

1 minute ago, bombz said:

Have added a new disk to UD for another net-new pre-clear, however unraid is detecting the drive signature as already cleared, I do believe this a due to how UD mounts the disk seeing 'like disk' as already completed.

I don't follow, but if the disk is already cleared, that is normal

I started a pre-clear of a 8TB drive yesterday (pre-read, zeroing, post-read) just to find out this morning that it was already finished (but it's not) :image.png

I see in unassigned devices that the drive is still writing.

I get this error in the logs: /usr/local/emhttp/plugins/unassigned.devices.preclear/scripts/preclear_disk.sh: line 595:  100 /  11965984 : arithmetic syntax error: operand expected (error token is " 100 /  11965984 ")

image.png

image.png

Any idea what might cause this kind of issue ? Is it okay to let it finish (because it looks like to continue to zero the drive, but I get no progress in the report at this point, it's stuck at 13%)

It's a little misleading that the report says that the preclear finished successfully

Edited by MaxiWheat
Added error message to the post as text

  • 3 months later...

Going to embark on a pre-clear of two new drives and looking for clarification on the Unraid Documentation regarding adding these drives to the array after the preclear is complete.

In the Unraid Docs it says "Avoid formatting a pre-cleared disk before including it in the array, as this removes the clearance signature." However, from my readings, this drive will be flagged as unmountable and require format before adding to array (I assume this is also required to add a filesystem to the drive). I know this post on unRAID forums is old; but the suggestion was to just, yes, format it. But I'm assuming and hoping things have changed since then.

I'm a bit confused on what to do after pre-clear to add an xfs-encrypted filesystem to the drive and then adding it to the array. Hoping to get some clarification before I initiate the long pre-clear process.

Thank you in advance.

39 minutes ago, mikescott said:

I'm a bit confused on what to do after pre-clear to add an xfs-encrypted filesystem to the drive and then adding it to the array

Preclear

Add

THEN once part of the array you get the option to format.

15 minutes ago, Kilrah said:

Preclear

Add

THEN once part of the array you get the option to format.

Okay thank you for clarifying this. It seems my newbish interpretation continuously read that as: once you pre-clear, do not format the disk.

But the timing of the disk being in the array is the key point here. Once you assign the disks > start up the array > now you can safely format disks as per prompts.

As I understand it now, the docs are stating once you pre-clear don't manually format the disk before adding to array.

(apologies, getting used to terminology here in unRAID, and I guess Linux in general as I transition away from Windows...starting array vs starting array AND mounting, etc)....so thanks again; I've been enjoying my reading on everything Linux (and LUKS + headers for encrypted drive management)

Edited by mikescott
additional information

  • 1 month later...

I have a disk I precleared some time ago, but it's no longer showing as precleared. Is there a way to a. do a recheck to make it show precleared and/or b. verify that if i add it to the array it's not going to try and clear when I add it to the array.

4 hours ago, warpspeed said:

I have a disk I precleared some time ago, but it's no longer showing as precleared. Is there a way to a. do a recheck to make it show precleared and/or b. verify that if i add it to the array it's not going to try and clear when I add it to the array.

Just click on the "Preclear" button as you normally would, and choose "Verify Signature" instead.

grafik.png

11 hours ago, Rysz said:

Just click on the "Preclear" button as you normally would, and choose "Verify Signature" instead.

Thanks, did that and it did come back as precleared.

I precleared a disk using the plugin, but when added to the array it still needed to format the disk and rebuild the array...

Is this because updates on the unraid's OS don't support precleared disks anymore? Before, the array would accept precleared disks straight away.

9 minutes ago, PaulieW said:

Is this because updates on the unraid's OS don't support precleared disks anymore?

Which Unraid version? There was a bug recently that affected some releases.

6 hours ago, JorgeB said:

Which Unraid version? There was a bug recently that affected some releases.

7.2.6

12 hours ago, PaulieW said:

7.2.6

That should be fine; you would need to see the logs if you still have them.

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...

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.