Preclear plugin


3042 posts in this topic Last Reply

Recommended Posts

  • Replies 3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi guys, this is a simple plugin that allows users to clear their disks before add them to the array.   The main characteristics of this plugin are: Modularity: can be used standalon

I think Thanks should be directed at all those members that have been dealing with the mess the last few months. @dlandon and @Squid have been working behind the scenes to try and clean up, and o

Dontlookoverthere over on the unRAID subreddit figured out how to get the plugin running again with a simple edit to the plg:   https://www.reddit.com/r/unRAID/comments/7wjpus/preclear_worki

Posted Images

I am running into a problem with preclear on a WD Datacenter Gold 12TB drive. It made it through steps 1 through 4 and started on step 5 where it seems stuck at 18%. The drive also shows spun down. The version of Preclear is 2017.11.14. Here is the log report so far. (The 199-UDMA_CRC_Error_Count 106286 is from a previous attempt where I had a faulty cable. The cable has since been replaced and no more CRC errors have been logged):

 

############################################################################################################################
#                                                                                                                          #
#                                         unRAID Server Preclear of disk 8DG3KEVD                                          #
#                                       Cycle 1 of 1, partition start on sector 64.                                        #
#                                                                                                                          #
#                                                                                                                          #
#   Step 1 of 5 - Pre-read verification:                                                  [17:14:58 @ 193 MB/s] SUCCESS    #
#   Step 2 of 5 - Zeroing the disk:                                                       [17:08:12 @ 194 MB/s] SUCCESS    #
#   Step 3 of 5 - Writing unRAID's Preclear signature:                                                          SUCCESS    #
#   Step 4 of 5 - Verifying unRAID's Preclear signature:                                                        SUCCESS    #
#   Step 5 of 5 - Post-Read in progress:                                                                     (18% Done)    #
#                                                                                                                          #
#                                                                                                                          #
#                                                                                                                          #
#                                                                                                                          #
#                                                                                                                          #
#   ** Time elapsed: 2:36:56 | Current speed: 239 MB/s | Average speed: 239 MB/s                                           #
#                                                                                                                          #
############################################################################################################################
#                              Cycle elapsed time: 37:00:08 | Total elapsed time: 37:00:08                                 #
############################################################################################################################


############################################################################################################################
#                                                                                                                          #
#                                               S.M.A.R.T. Status default                                                  #
#                                                                                                                          #
#                                                                                                                          #
#   ATTRIBUTE                    INITIAL  STATUS                                                                           #
#   5-Reallocated_Sector_Ct      0        -                                                                                #
#   9-Power_On_Hours             93       -                                                                                #
#   194-Temperature_Celsius      35       -                                                                                #
#   196-Reallocated_Event_Count  0        -                                                                                #
#   197-Current_Pending_Sector   0        -                                                                                #
#   198-Offline_Uncorrectable    0        -                                                                                #
#   199-UDMA_CRC_Error_Count     106286   -                                                                                #
#                                                                                                                          #
#                                                                                                                          #
#                                                                                                                          #
#                                                                                                                          #
#                                                                                                                          #
############################################################################################################################
#   SMART overall-health self-assessment test result: PASSED                                                               #
############################################################################################################################

Segmentation fault
root@Tower:/usr/local/emhttp#

 

What do you make of this?

 

Thanks

 

Dale

Edited by dchamb
Link to post

Usually, Attribute 199 errors are attributed to the SATA cable.  (Not a Hard Drive issue)   Replace the cable first and see if that clears up the problem.  Also, don't tie SATA cables together to make things 'neat' inside the case.  SATA cables are very prone to cross-talk which is a principal cause of CRC errors.

Link to post

Frank1940, did you see in my post where I already acknowledged the cable issue and replaced it? This problem of hanging on 18% on the post clear read has occurred after the cable was replaced. It seems like it might be an issue with preclear. Any known problems dealing with a drive of 12TB?

Edited by dchamb
Link to post

Also since it appears from the log report it completed the clear operation successfully, is there a way to verify the drive without going through preclear again? I'd like to know if the drive is usable. It just looks like preclear stopped at 18% of the post clear read.

Link to post
15 hours ago, dchamb said:

What do you make of this?

 

It segfaulted. That shouldn't happen. I suggest a reboot, at least, but grab diagnostics first.

 

15 hours ago, dchamb said:

Segmentation fault
root@Tower:/usr/local/emhttp#

 

Link to post
2 hours ago, dchamb said:

Thanks John_M. Are you referring to SMART diagnostics?

 

No, I'm referring to the console output that you pasted into your post:

############################################################################################################################
#   SMART overall-health self-assessment test result: PASSED                                                               #
############################################################################################################################

Segmentation fault
root@Tower:/usr/local/emhttp#

 

Link to post

Is there a minimum CPU system requirement to get this script to run successfully all the way through?

 

I've never used it before, and I have a pretty old Dual Core Duo E6600 2.4Ghz.  Anyway, I've got two new 4TB disks hooked up to a PCI Ex Ver1 X1 SATA controller.  I tried both at the same time, realized that was a big mistake as it was saturating the PCI bus.  Now I'm trying 1 at a time, and I had pre clear stop responding on Post-Read with CPUs pegged at 100%.  The WebGUI was still responding.  I uninstalled the plugin, rebooted, reinstalled it, and rebooted again and am attempting preclear once again with 1 drive and the array stopped.  Hopefully it makes it all the way through this time, I'll definitely post back.  This is with the latest version 2017.11.14 and Unraid  6.3.5.  I'm not really using any of the new features like docker containers yet.  Any thoughts?  If this doesn't work, I understand I should try it manually without the plugin.  Also, I could get the disks off this crappy PCIEv1 X1 controller (which I plan to do after I remove some other disks (MOBO has 8SATA ports), but I figured I'd be OK with the preclear.  


Thanks !

 

Chris

Link to post
1 hour ago, cpetro45 said:

Is there a minimum CPU system requirement to get this script to run successfully all the way through?

 

The E6600 should be up to the task.  How much memory do you have installed?  It takes between 2GB and 4GB of RAM with ver-6.3.5  to have a system that is not RAM constrained if you are only running the basic NAS function, the 'usual plugins', and perhaps, a Docker or two.  The preclear function does require a fair amount of RAM so that might be an issue.  

Link to post
1 hour ago, Frank1940 said:

 

The E6600 should be up to the task.  How much memory do you have installed?  It takes between 2GB and 4GB of RAM with ver-6.3.5  to have a system that is not RAM constrained if you are only running the basic NAS function, the 'usual plugins', and perhaps, a Docker or two.  The preclear function does require a fair amount of RAM so that might be an issue.  

 

Thanks, yeah it's got 2GB of ram, a little light for sure. It didn't seem like ram usage was pegged tho, about 50% versus higher cpu usage. Its prereading now, it locked up earlier (no ip, no gui) but now it seems like it's moving again...after I reset it.  We shall see.... Thanks 

Link to post
4 hours ago, cpetro45 said:

Thanks, yeah it's got 2GB of ram, a little light for sure. It didn't seem like ram usage was pegged tho, about 50% versus higher cpu usage. Its prereading now, it locked up earlier (no ip, no gui) but now it seems like it's moving again...after I reset it.  We shall see.... Thanks 

 

If it locks up again, you could install the 'Tips and Tweaks' plugin.  Then goto the Tweaks page and set the Disk Cache 'vm.dirty_background_ratio' (%):  parameter  to    1   and the  Disk Cache 'vm.dirty_ratio' (%):   parameter to     2       This will free up a big block of memory without any observable effect on performance.  You can read a bit more about these parameters by clicking on the Help function.

Link to post

 

I checked DMESG and got the following:

 

[15479128.834955] usb 9-1: new SuperSpeed USB device number 4 using xhci_hcd
[15479128.851362] usb-storage 9-1:1.0: USB Mass Storage device detected
[15479128.851602] scsi host10: usb-storage 9-1:1.0
[15479129.883589] scsi 10:0:0:0: Direct-Access     ST10000V N0004-1ZD101     1001 PQ: 0 ANSI: 5
[15479129.884309] sd 10:0:0:0: Attached scsi generic sg13 type 0
[15479129.884571] sd 10:0:0:0: [sdn] Very big device. Trying to use READ CAPACITY(16).
[15479129.884711] sd 10:0:0:0: [sdn] 19532873728 512-byte logical blocks: (10.0 TB/9.10 TiB)
[15479129.886510] sd 10:0:0:0: [sdn] Test WP failed, assume Write Enabled
[15479129.887376] sd 10:0:0:0: [sdn] Asking for cache data failed
[15479129.887380] sd 10:0:0:0: [sdn] Assuming drive cache: write through
[15479129.888003] sd 10:0:0:0: [sdn] Very big device. Trying to use READ CAPACITY(16).
[15479129.919531] sd 10:0:0:0: [sdn] Very big device. Trying to use READ CAPACITY(16).
[15479129.921260] sd 10:0:0:0: [sdn] Attached SCSI disk

Anyone have any ideas or advice?

 

EDIT: I originally included a preclear log in this, but it's appeared to be very old - 2014!

 

EDIT: NM!  Got the preclear to run from the command line.  Hopefully will be complete on Monday morning.

Edited by bmfrosty
Link to post
On 12/2/2017 at 5:41 PM, Frank1940 said:

 

If it locks up again, you could install the 'Tips and Tweaks' plugin.  Then goto the Tweaks page and set the Disk Cache 'vm.dirty_background_ratio' (%):  parameter  to    1   and the  Disk Cache 'vm.dirty_ratio' (%):   parameter to     2       This will free up a big block of memory without any observable effect on performance.  You can read a bit more about these parameters by clicking on the Help function.

 

Hey Frank, thanks.  I implemented this setting and it seems like maybe it did something.  However, looks like the preclear job is mostly locking up on the Pre-read phase and pegging 1 cpu at 100% with the timer stopping.  I've nursed it through 2 cycles, it's working on the 3rd but I think for my 2nd HD, I may spend the time to figure out how to do it via ssh.  I'm not going to spend too much time as I believe my system resources are not constrained, and the script is just bombing out for whatever reason.  I do appreciate the help and input!

 

Chris

Link to post

My server running 6.3.5 currently has an uptime of 112 days and I haven't changed anything recently and then out of the blue when I tried to access it tonight I'm getting the following popup in webui:

 

Quote

Install Statistics Plugin

This plugin is used to send statistics anonymously using Google Forms and TOR. 
Don't worry, you will be asked before sending every report.

 

It gives me the option to Install or Dismiss. If I choose Install, I get the following output:

Quote

plugin: installing: https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/plugins/statistics.sender.plg
plugin: downloading https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/plugins/statistics.sender.plg
plugin: downloading: https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/plugins/statistics.sender.plg ... done

Warning: simplexml_load_file(): I/O warning : failed to load external entity "/boot/config/plugins/statistics.sender.plg" in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214
plugin: xml parse error

 

If I click Dismiss I just get the top bar with the Dashboard, Main, Shares, etc. tabs but nothing shows below them and if I click on any of the tabs I just get the Install Statistics Plugin popup again.

 

I can still access all of my shares via Windows Explorer but I can't access anything over webui.

 

Can somebody please help?

Link to post
9 hours ago, Yousty said:

My server running 6.3.5 currently has an uptime of 112 days and I haven't changed anything recently and then out of the blue when I tried to access it tonight I'm getting the following popup in webui:

 

 

It gives me the option to Install or Dismiss. If I choose Install, I get the following output:

 

If I click Dismiss I just get the top bar with the Dashboard, Main, Shares, etc. tabs but nothing shows below them and if I click on any of the tabs I just get the Install Statistics Plugin popup again.

 

I can still access all of my shares via Windows Explorer but I can't access anything over webui.

 

Can somebody please help?

Uninstall the plugin.

Link to post

 

On 12/6/2017 at 9:49 PM, Yousty said:

If I click Dismiss I just get the top bar with the Dashboard, Main, Shares, etc. tabs but nothing shows below them and if I click on any of the tabs I just get the Install Statistics Plugin popup again.

 

On your flash drive, does this file exist? config/plugins/statistics.sender/dismissed?  If not, create it.  Anything can be in the file

 

If there is nothing showing on the flash at all, then unfortunately you've been kinda nailed by a design defect in the plugin where *if* the flash drive happens to drop offline (usually caused by using the flash drive in a usb3.0 port instead of 2.0), then the plugin nags and hounds you to install the statistics sender and in effect crashes the entire webUI (Unfortunately, the plugin for some reason does NOT check to see if the flash drive actually exists and is valid before it nags you to install stats).  In this case your best is indeed to uninstall the preclear plugin (easiest way would be to delete preclear.plg and statistics.sender.plg from config/plugins on the flash drive via SSH and then reboot.)

Link to post

Good morning,

 

I've been having some weird slowdowns on my GUI and after a bunch of testing and rebuilding my flash drive, it appears that it's this plugin (preclear) causing this issue.

 

Specifically, the main issue is that when I have the plugin installed, the installation of apps hangs with no updating until the installation is complete.  Chrome reports the tab as unresponsive and nothing besides the banner and top menu load.

If I remove the plugin, it works normally with no issue.

 

Not sure why this is happening but I would be happy to help fix this.

Link to post

I also have been having a great deal of difficulty with this plugin.  After it ran a clear-only, no pre/post read for 12 hours, it was only 25% into an 8TB seagate archive.  On top of the slowness, it basically rendered the array unusable.  None of the pages would load or would load very slowly, sshing in to the console tok forever, and the machine couldn't keep up with my typing, etc.  Reads and writes to the array were glacial.  If I stop the preclear, everything goes back to normal.

I believe I have the latest version, I downloaded it yesterday.  The drive in question is connected to the motherboard, but there are other drives connected through a SASLP.

 

Diagnostics attached below, thanks much for any help you can suggest!

tower-diagnostics-20171216-1127.zip

Link to post

I did a preclear of a 12TB disk. At the next boot I got the following error in syslog:

 

Dec 17 13:56:26 Tower kernel: sd 6:0:13:0: [sdq] 2929721344 4096-byte logical blocks: (12.0 TB/10.9 TiB)
Dec 17 13:56:26 Tower kernel: sd 6:0:13:0: [sdq] Write Protect is off
Dec 17 13:56:26 Tower kernel: sd 6:0:13:0: [sdq] Mode Sense: 7f 00 10 08
Dec 17 13:56:26 Tower kernel: sd 6:0:13:0: [sdq] Write cache: enabled, read cache: enabled, supports DPO and FUA
Dec 17 13:56:26 Tower kernel: sdq: sdq1
Dec 17 13:56:26 Tower kernel: sdq: p1 size 34359738360 extends beyond EOD, enabling native capacity
Dec 17 13:56:26 Tower kernel: sdq: sdq1
Dec 17 13:56:26 Tower kernel: sdq: p1 size 34359738360 extends beyond EOD, truncated
Dec 17 13:56:26 Tower kernel: sd 6:0:13:0: [sdq] Attached SCSI disk
 

Is this a bug in the plugin that it creates a partition that is too big or does the plugin not create a valid partition at all and the boot process interprets the preclear header written onto the disk as a partition? parted sees the cleared disk with an invalid MSDOS partition, while array disks have GPT partitions. Another new disk of the same type that has not yet been cleared, does not show the "extends beyond EOD" message and has no partition info at all.

Edited by tstor
Link to post
1 hour ago, tstor said:

Is this a bug in the plugin that it creates a partition that is too big or does the plugin not create a valid partition at all and the boot process interprets the preclear header written onto the disk as a partition?

Preclear partitions the disk, it's part of the signature for the disk to be considered clear, maybe there's an issue with such a large disk, you can clear the disk in unRAID

Link to post

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.