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

  • Author
19 hours ago, Top Gun said:

IS IT ANOTHER BAD DRIVE OR NOT ?   Thank you.

You have disk errors:

May  1 08:59:29 ENIGMA kernel: sd 15:0:4:0: attempting task abort!scmd(0x0000000086a55ffe), outstanding for 30047 ms & timeout 30000 ms
May  1 08:59:29 ENIGMA kernel: sd 15:0:4:0: [sdg] tag#1958 CDB: opcode=0x12 12 00 00 00 24 00
May  1 08:59:29 ENIGMA kernel: scsi target15:0:4: handle(0x000d), sas_address(0x4433221106000000), phy(6)
May  1 08:59:29 ENIGMA kernel: scsi target15:0:4: enclosure logical id(0x500605b0061b36c0), slot(1) 
May  1 08:59:29 ENIGMA kernel: sd 15:0:4:0: task abort: SUCCESS scmd(0x0000000086a55ffe)
May  1 08:59:29 ENIGMA kernel: sd 15:0:4:0: Power-on or device reset occurred
### [PREVIOUS LINE REPEATED 1 TIMES] ###
May  1 08:59:38 ENIGMA kernel: sd 15:0:4:0: attempting task abort!scmd(0x0000000086a55ffe), outstanding for 7072 ms & timeout 7000 ms
May  1 08:59:38 ENIGMA kernel: sd 15:0:4:0: [sdg] tag#1880 CDB: opcode=0x12 12 01 00 00 fe 00
May  1 08:59:38 ENIGMA kernel: scsi target15:0:4: handle(0x000d), sas_address(0x4433221106000000), phy(6)
May  1 08:59:38 ENIGMA kernel: scsi target15:0:4: enclosure logical id(0x500605b0061b36c0), slot(1) 
May  1 08:59:39 ENIGMA kernel: sd 15:0:4:0: task abort: SUCCESS scmd(0x0000000086a55ffe)
May  1 08:59:39 ENIGMA kernel: sd 15:0:4:0: Power-on or device reset occurred

and the SMART report:

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   079   064   044    -    87489136
  3 Spin_Up_Time            PO----   097   097   000    -    0
  4 Start_Stop_Count        -O--CK   100   100   020    -    3
  5 Reallocated_Sector_Ct   PO--CK   100   100   010    -    0
  7 Seek_Error_Rate         POSR--   070   061   045    -    10455677

I'd say yes.

  • Replies 848
  • Views 239.2k
  • 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

Just updated UD to 05.01 and here we go again - pre-clear never gets beyond "starting" on any of 5 drives tested.

 

Quote

May  2 11:59:56 TVHD kernel: sd 3:0:6:0: [sdp] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
May  2 11:59:56 TVHD kernel: sd 3:0:6:0: [sdp] Write Protect is off
May  2 11:59:56 TVHD kernel: sd 3:0:6:0: [sdp] Mode Sense: 7f 00 10 08
May  2 11:59:56 TVHD kernel: sd 3:0:6:0: [sdp] Write cache: enabled, read cache: enabled, supports DPO and FUA
May  2 11:59:56 TVHD kernel: sdp: sdp1
May  2 11:59:56 TVHD kernel: sd 3:0:6:0: [sdp] Attached SCSI disk
May  2 12:01:46 TVHD emhttpd: ST2000DL003-9VT166_5YD1CCLE (sdp) 512 3907029168
May  2 12:01:46 TVHD emhttpd: read SMART /dev/sdp
May  2 12:03:49 TVHD unassigned.devices: Removing all partitions from disk '/dev/sdp'.

** Press ANY KEY to close this window **

 

Uninstalling and re-installing fixed it again. Something's seems wrong with the update process maybe?

Edited by Espressomatic

  • Author
40 minutes ago, Espressomatic said:

Just updated UD to 05.01 and here we go again - pre-clear never gets beyond "starting" on any of 5 drives tested.

 

 

Uninstalling and re-installing fixed it again. Something's seems wrong with the update process maybe?

When you uninstall UD, you also uninstall preclear and have to re-install both,  Not sure which one causes the issue.

 

Not sure which one you think you uninstalled and re-installed.  I need more information in order to be able to help you.

 

The log snippet is not helpful either.  It shows UD was asked to clear the disk and nothing else.

On 4/25/2024 at 2:11 PM, dlandon said:

I suppose it is possible you have a bad disk.

It's not. When I put it in my main machine as parity 2 and it went through a successful Parity Sync process.

Edited by Gico

  • 2 weeks later...
On 5/2/2024 at 1:09 PM, dlandon said:

When you uninstall UD, you also uninstall preclear and have to re-install both,  Not sure which one causes the issue.

Not sure which one you think you uninstalled and re-installed.  I need more information in order to be able to help you.

Unassigned Devices uninstalled. Both installed again (as you mentioned, because UDP is automatically removed).

 

Quote

The log snippet is not helpful either.  It shows UD was asked to clear the disk and nothing else.

 

I understand that, but I don't know where else to find/see any relevant information. If you have any suggestions (for next time) I'll make sure to try and get better diagnostic info. It'll be time to add another drive sooner rather than later, so I shouldn't so soon forget about this subject.

image.thumb.png.210af123dcabc8a29dea8cdf926188a3.pngI attached an image, but have 3 disks connected via an external JBOD enclosure, and they all seem to have the same identification number, serial for all is (20170331000C3). This means I cannot start multiple concurrent preclears, as it seems to think all are active when I start on a single disk. 

 

Any ideas on ways to get around this? 

  • Author
2 hours ago, foreseeable-concertina5279 said:

Any ideas on ways to get around this?

Looks like a bug in that preclear thinks the serial number is the same for all three even though they are not.  You'll have to just preclear them one at a time by removing the other two disks.

  • Author
4 hours ago, foreseeable-concertina5279 said:

Any ideas on ways to get around this? 

Can you post ud_diagnostics?  Go to a command line and do 'ud_diagnostics' then post the /boot/logs/ud_diagnostics.zip.

8 hours ago, dlandon said:

Can you post ud_diagnostics?  Go to a command line and do 'ud_diagnostics' then post the /boot/logs/ud_diagnostics.zip.

Thanks for taking a look! DM'd it to you. 

  • Author
11 hours ago, foreseeable-concertina5279 said:

Thanks for taking a look! DM'd it to you. 

I see the problem.  I'll need to see what can be done about it.

On 5/15/2024 at 3:08 AM, dlandon said:

I see the problem.  I'll need to see what can be done about it.

Don't mean to be a bother, but any update here? They're 10TB disks so would like to do in parallel to save time. Otherwise I'm looking at a few days per disk.

 

Could I just start a bunch of tmux sessions and trigger the commands manually using the disk path?

If you continued doing them one by one since you posted that they should be done by now :D

 

Doing 3 at a time will most likely be bottlenecked by USB at least part of the time.

Edited by Kilrah

1 hour ago, Kilrah said:

If you continued doing them one by one since you posted that they should be done by now :D

 

Doing 3 at a time will most likely be bottlenecked by USB at least part of the time.

 

Haha I wish lol. Have had one going since I initially posted, its running the final cycle now. Its a USB 3.1 enclosure and they're HDDs, so USB shouldn't be a bottleneck. ~600 MBps is 4.8 Gbps

  • Author
5 hours ago, foreseeable-concertina5279 said:

Don't mean to be a bother, but any update here? They're 10TB disks so would like to do in parallel to save time. Otherwise I'm looking at a few days per disk.

 

Could I just start a bunch of tmux sessions and trigger the commands manually using the disk path?

In looking at the issue, a fix would be quite troublesome beause when the plugin is updated, the tracking of any existing preclear operations would potentially be lost and the preclear page would not be able to update the preclear operation  This also affects UD tracking the preclear operation.  I'm actually considering not doing anything here for the following reasons:

  • As I mentioned, the tracking of any running preclears would be affected.
  • This only seems to happen on USB bays and USB is really not robust enough for preclearing, especially multiple drives.

You can get around this problem you are having by installing the binhex preclear docker.  It will allow you to preclear by device.

11 hours ago, dlandon said:

In looking at the issue, a fix would be quite troublesome beause when the plugin is updated, the tracking of any existing preclear operations would potentially be lost and the preclear page would not be able to update the preclear operation  This also affects UD tracking the preclear operation.  I'm actually considering not doing anything here for the following reasons:

  • As I mentioned, the tracking of any running preclears would be affected.
  • This only seems to happen on USB bays and USB is really not robust enough for preclearing, especially multiple drives.

You can get around this problem you are having by installing the binhex preclear docker.  It will allow you to preclear by device.

Fair enough, using the docker now! Honestly probably a better solution anyways, thanks for the suggestion. Didn't realize they ran the same script. 

  • 1 month later...

Does the post read cycle verify it cleared successfully? I had an issue with a different hba card so I stopped the current operation on several drives to shutdown and troubleshoot. I have now solved that issue and continued from where I left off. I’m not sure if I trust it unless the post read checks that for me. 

Edited by spdelope

  • 1 month later...

Will PreClear detect read errors?  I've got a couple discs in my array that are suddenly showing read errors.  I replaced them and things are working fine, but when I reformatted them and checked them using Hard Disk Sentinel they show no errors.  HDS indicates the drives are fine.  When I try to throw them back in the array read errors pop up again.  Different SATA cables.  Different SATA ports.  Just to be sure.

Edited by jimeez

6 hours ago, jimeez said:

Will PreClear detect read errors?

Yes, you can also run an extended SMART test

I have an issue that a preclear on one disk not yet added to array is preventing the format of a newly added disk. 

 

Formatting of a newly added disk normally takes a few minutes, but when running a preclear the format does not complete at all. The solution is to pause or stop any preclear jobs running, then format completes almost immediately. 

 

I have two disks I want to add to my array. I started pre-clearing both. One (sdb) finished a few hours before the other (sdc). I stopped my array. The sdc preclear is automatically paused. 

 

Adding sdb to the Array then start it up. The preclear on sdc automatically resumes. Unraid prompts me to format sdb, which I do. The format will not complete while a preclear on another disk is running. Pausing the clear will allow the format to complete within a minute.

 

Not a major issue for me as there is a workaround, just annoying. 

storage-diagnostics-20240814-1932.zip

That's normal, format does a sync to ensure any pending writes are flushed but that's system-wide and since the preclear is constantly writing the sync won't finish until the writes stop.

14 hours ago, Kilrah said:

That's normal, format does a sync to ensure any pending writes are flushed but that's system-wide and since the preclear is constantly writing the sync won't finish until the writes stop.

Sync does not block for hours while other processes are writing to disk. It flushes all pending writes and doesn't wait around for any writes that may come in the future. 

root@Storage:~# ps u | grep preclear; time sync
root     13161  0.7  0.0  10560  6548 pts/0    S+   11:45   0:00 /bin/bash /usr/local/emhttp/plugins/unassigned.devices.preclear/scripts/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj
root     13190  0.0  0.0   8812  2216 pts/0    S+   11:45   0:00 /bin/bash /usr/local/emhttp/plugins/unassigned.devices.preclear/scripts/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj
root     15661  0.0  0.0  10632  5416 pts/0    S+   11:45   0:00 /bin/bash /usr/local/emhttp/plugins/unassigned.devices.preclear/scripts/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj
root     23684  0.0  0.0   4052  2200 pts/1    S+   11:46   0:00 grep preclear

real    0m0.004s
user    0m0.002s
sys     0m0.002s

 

Here's me running a sync while a preclear is running. The sync completes in milliseconds. 

 

EDIT: OF course I'd need to run it during the write stage. 

Yep, sync blocks. Interesting, TIL. 

Edited by JazzHands
Knowledge update.

  • 5 weeks later...

Hi,

 

i just received a brand new WD RED Plus HDD to replace one failed HDD in my array.

 

Because it comes from Amazon I tried to run pleclear to check disk quality. First attempt took 24h to first step then 2nd step was not progressing and after another 24h I decided to stop and reboot:

 

Quote

Sep 12 00:14:03 preclear_disk_WD-WX22D83A42YU_12189: Preclear Disk Version: 1.0.30

Sep 12 00:14:03 preclear_disk_WD-WX22D83A42YU_12189: Disk size: 4000787030016

Sep 12 00:14:03 preclear_disk_WD-WX22D83A42YU_12189: Disk blocks: 976754646

Sep 12 00:14:03 preclear_disk_WD-WX22D83A42YU_12189: Blocks (512 bytes): 7814037168

Sep 12 00:14:03 preclear_disk_WD-WX22D83A42YU_12189: Block size: 4096

Sep 12 00:14:03 preclear_disk_WD-WX22D83A42YU_12189: Start sector: 0

Sep 12 00:14:06 preclear_disk_WD-WX22D83A42YU_12189: Pre-read: pre-read verification started 1 of 5 retries... Sep 12 01:33:04 preclear_disk_WD-WX22D83A42YU_12189: Pre-Read: progress - 25% read @ 202 MB/s Sep 12 15:37:09 preclear_disk_WD-WX22D83A42YU_12189: Pre-Read: progress - 50% read @ 101 MB/s Sep 12 18:18:44 preclear_disk_WD-WX22D83A42YU_12189: Pre-Read: progress - 75% read @ 103 MB/s Sep 12 20:56:17 preclear_disk_WD-WX22D83A42YU_12189: Pre-Read: elapsed time - 20:42:08

Sep 12 20:56:17 preclear_disk_WD-WX22D83A42YU_12189: Pre-read: pre-read verification completed! Sep 12 20:56:18 preclear_disk_WD-WX22D83A42YU_12189: Zeroing: zeroing the disk started 1 of 5 retries... Sep 12 20:56:18 preclear_disk_WD-WX22D83A42YU_12189: Zeroing: emptying the MBR.

Sep 13 17:08:45 preclear_disk_WD-WX22D83A42YU_12189: SIGINT received, exiting ...

 

2nd attemp is running now but no changes:

 

Quote

Sep 13 23:32:14 preclear_disk_WD-WX22D83A42YU_28504: Preclear Disk Version: 1.0.30

Sep 13 23:32:15 preclear_disk_WD-WX22D83A42YU_28504: Disk size: 4000787030016

Sep 13 23:32:15 preclear_disk_WD-WX22D83A42YU_28504: Disk blocks: 976754646

Sep 13 23:32:15 preclear_disk_WD-WX22D83A42YU_28504: Blocks (512 bytes): 7814037168

Sep 13 23:32:15 preclear_disk_WD-WX22D83A42YU_28504: Block size: 4096

Sep 13 23:32:15 preclear_disk_WD-WX22D83A42YU_28504: Start sector: 0

Sep 13 23:32:17 preclear_disk_WD-WX22D83A42YU_28504: Zeroing: zeroing the disk started 1 of 5 retries... Sep 13 23:32:17 preclear_disk_WD-WX22D83A42YU_28504: Zeroing: emptying the MBR.

 

At this moment status is the following

 

Zeroing: 0% @ 0 MB/s (10:10:00)

 

Can someone point me in the right direction? I want to be able to check disk before adding to the array.

 

Thanks in advance

Hello! 

 

I'm not sure what I'm doing wrong but I've added two drives lately. The first, I put in the server and went through the preclear process with it unmounted. Once it finished, I stopped the array and added the disk. When I did this, it cleared the disk all over again. It was my understanding that doing the pre clear avoids this. 

 

I just added a second drive about a week ago. I've been preclearing it for that entire time and it finished this morning. The mount option is grayed out, and when I stop the array to add the drive, it says "this drive will need to be overwritten". I'm not entirely sure but I think the preclear option is formatting it to ZFS because the drive is named "Dev 1". However, I'm still learning and very ignorant about all this so forgive me if I'm wrong. 

 

How do I add the drive with preclear correctly? Thank you in advance for your help! 

@awa1992  Doing the Preclear SHOULD stop Unraid wanting to Clear it when adding it as a new drive to the main array.    Make sure, however, that you do not attempt to format it after doing the Preclear before adding it as that would destroy the Preclear status - any formatting needs to be done after adding it to the array.

@itimpi I made sure not to format it afterwards. It still has the preclear signature on it. 

Edited by awa1992

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.