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 plugin

Featured Replies

  • Replies 3.1k
  • Views 909.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Due to various continual issues with this plugin, it has now been marked as being incompatible with Unraid versions 6.9.0+   It is highly advised to uninstall this plugin (and Statistics Sen

  • 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've never knew there was an areca option for preclear.  I don't know what the areca,N/E means below...

 

Neither do I. Try using -D option and see if it works without SMART.

 

Running

 

preclear_disk.sh -d  /dev/sdo

 

Give the same help screen as running with nothing at all.

  • Author

I've never knew there was an areca option for preclear.  I don't know what the areca,N/E means below...

 

Neither do I. Try using -D option and see if it works without SMART.

 

Running

 

preclear_disk.sh -d  /dev/sdo

 

Give the same help screen as running with nothing at all.

 

Did you try the uppercase -D ? The documentation say this will disable SMART report.

Did you try the uppercase -D ? The documentation say this will disable SMART report.

 

Sorry, I didn't.  Trying it again now I get preclear starting, but with the double prompt for "Yes" again.  See below.

 

root@SandBox:/boot# preclear_disk.sh -D  /dev/sdo
Pre-Clear unRAID Disk /dev/sdo
################################################################## 1.15

smartctl may not be able to run on /dev/sdo.
however this should not affect the clearing of a disk.
smartctl exit status = 4
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.0.4-unRAID] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               Seagate
Product:              ST4000DM000-1F21
Revision:             R001
User Capacity:        4,000,787,030,016 bytes [4.00 TB]
Logical block size:   512 bytes
Rotation Rate:        10000 rpm
Logical Unit id:      0x0004d927010a4812
Serial number:        W30036FJ
Device type:          disk
Transport protocol:   Fibre channel (FCP-2)
Local Time is:        Wed Jun 17 14:50:44 2015 CDT
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Current Drive Temperature:     30 C
Drive Trip Temperature:        25 C

Manufactured in week 30 of year 2002
Specified cycle count over device lifetime:  4278190080
Accumulated start-stop cycles:  256
Elements in grown defect list: 0

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0         0         0          0          0.000           0
write:         0        0         0         0          0          0.000           0

Non-medium error count:        0

Device does not support Self Test logging$
Do you wish to continue?
(Answer Yes to continue. Capital 'Y', lower case 'es'): Yes

Disk /dev/sdo: 4000.8 GB, 4000787030016 bytes
64 heads, 32 sectors/track, 3815447 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdo1               1  4294967295  2147483647+   0  Empty
########################################################################
invoked as  ./preclear_disk.sh -D /dev/sdo
########################################################################
(MBR 4k-aligned set. Partition will start on sector 64 for disks <= 2.2TB and sector 1 for disks > 2.2TB)
Are you absolutely sure you want to clear this drive?
(Answer Yes to continue. Capital 'Y', lower case 'es'):

 

I believe this plugin hung my system using unRAID 6.0 b12. I read someone through this forum saying that they installed this during a preclear and it immediately picked up on the screen session instance of preclear_disk.sh and began reporting stats. I performed this same operation, and while the plg installed and did begin to report stats and show up in settings, etc. after another 10 - 15 minutes the unRAID GUI became unresponsive. I could SSH into it, use dockers, it was only the unRAID GUI that was unavailable. After this, I was unable to stop the array through either the GUI not the command line. I'm not sure if this is because of the fact that I installed during an already running preclear, but this was the only other thing changed on my system that could have been causing it to hang, I would think anyway. It's been fine several reboots since, and has not hung at all and the plugin is still installed but not doing any more preclearing at the moment. This system GUI hasn't become unresponsive since I've been on b12 even once until I installed this plugin. I'm in the process right now of rebuilding parity on this new drive, and upgrading to unRAID 6.0 and report back if it still happens to hang. Would it have something to do with the fact that I only have Dynamix ver. 2015.01.21 possibly?

Awesome, will do. I kind of figured it was either the unRAID ver. or the fact that I installed and possibly pressed a button on the plugin, with an instance already running in screen. I'm in the process of upgrading as we speak. Thanks :D

Thank you so much for this great plugin - it really makes preclearing disks a lot easier than using putty/screen.

 

It worked like a charm for me, preclearing two Seagate 8TB disks at once, with UnRAID 6.0.0, and plugin version 2015.06.15.

 

Cheers, Carl.

 

There's a version hosted here: http://bit.ly/1G44UhZ . This version have fast post-read and notifications enabled.

 

You can add this with this command:

wget http://bit.ly/1G44UhZ -O /boot/config/plugins/preclear.disk/preclear_disk.sh

 

readvz is already downloaded by the plugin.

I'm still working on updating to v6.0 so I'm not quite ready to install this, but trying to get my ducks in a row ahead of time. I'm not much good with Linux and not quite sure what to do with this command. Do I just telnet in and run the wget command after I install this plugin? Or maybe before I install the plugin?

 

Just to be sure I'm understanding correctly, the plugin will include notification options with this version of preclear?

I had a look at the generated files.  My suggestions would be to add the extension .txt onto each file.  It just makes it easier to open them from Windows (and probably most other OS's). 

It is a rather minor change to the preclear script that I have done for a while now.

 

I just add the ".txt" like below.

 

Before:

report_out+="$errs \n"
report_out+="============================================================================\n"
echo -e "$report_out" >/tmp/preclear_report_$d
if [ "$save_report" = "y" ]
then
    mkdir -p /boot/preclear_reports
    dt=`date "+%Y-%m-%d"`
    if [ "$save_report_by_dev" = "yes" ]
    then
      cp /tmp/preclear_report_$d /boot/preclear_reports/preclear_rpt_${d}_${dt}
      cp /tmp/smart_start_$d /boot/preclear_reports/preclear_start_${d}_${dt}
      cp /tmp/smart_finish_$d /boot/preclear_reports/preclear_finish_${d}_${dt}
    else # name the reports by their serial number
      cp /tmp/preclear_report_$d "/boot/preclear_reports/preclear_rpt_${serial}_${dt}"
      cp /tmp/smart_start_$d "/boot/preclear_reports/preclear_start_${serial}_${dt}"
      cp /tmp/smart_finish_$d "/boot/preclear_reports/preclear_finish_${serial}_${dt}"
    fi
fi

 

To:

report_out+="$errs \n"
report_out+="============================================================================\n"
echo -e "$report_out" >/tmp/preclear_report_$d
if [ "$save_report" = "y" ]
then
    mkdir -p /boot/preclear_reports
    dt=`date "+%Y-%m-%d"`
    if [ "$save_report_by_dev" = "yes" ]
    then
      cp /tmp/preclear_report_$d /boot/preclear_reports/preclear_rpt_${d}_${dt}.txt
      cp /tmp/smart_start_$d /boot/preclear_reports/preclear_start_${d}_${dt}.txt
      cp /tmp/smart_finish_$d /boot/preclear_reports/preclear_finish_${d}_${dt}.txt
    else # name the reports by their serial number
      cp /tmp/preclear_report_$d "/boot/preclear_reports/preclear_rpt_${serial}_${dt}.txt"
      cp /tmp/smart_start_$d "/boot/preclear_reports/preclear_start_${serial}_${dt}.txt"
      cp /tmp/smart_finish_$d "/boot/preclear_reports/preclear_finish_${serial}_${dt}.txt"
    fi
fi

Just a quick message to say Thanks.

 

Precleared 2 x 4TB WD Reds simultaneously, whilst running a parity check and using my array as normal.  Perfecto!

 

Also meant it was far easier to feed my obsessive checking of progress than opening putty and typing screen -r all the time.

 

So thanks again for this plugin, it's just what this community needed for a long time, fantastic work gfjardim!  ;D

Thanks for the wonderful plugin, really helps us noobs.

I've been trying to install this plugin without success. I copied the link in the OP to the "Install Plugin" text field and I see the icon in "User Utilities" but when I click it I see "Script Not Present". Is there something else I need to install as well?

See first post,  you need to download the pre clear script as well.

 

See first post,  you need to download the pre clear script as well.

 

This is outstanding!!!

Did I install the wrong version of the plugin though? I thought the spelling for cicle had been corrected. I installed this one- http://bit.ly/1G44UhZ

Maybe there's an updated version somewhere else with notification support?

Check for updates on the plugin page to see if there's a newer version.  I think it'll list if an update is available.

Showing "Up To Date". Super minor issue anyhow.

It'll be great though not having to go back and read the directions on the rare occasions when I have to preclear a disk. Sometimes I miss important steps.:)

I precleared 10 drives this weekend with the help of this plugin and script. Made my life super easy and on V6 you can have the system email you after every stage and the status. Allowed me to go about my weekend and wait for a chime on my phone indicating what part which disk was at. Super Easy and much appreciated.

 

Plugin is working great for me as well.  Cleared a 3TB and 2 cycles on a 1TB using the fast post read option as well.  The email and pushbullet notifications are an awesome feature!

Maybe I have a problem with my install. I set Preclear to email after each step, but no emails. Only the GUI notifications. Emails from the GUI are working fine but maybe there's something else I need to install to get emails from this plugin?

Maybe I have a problem with my install. I set Preclear to email after each step, but no emails. Only the GUI notifications. Emails from the GUI are working fine but maybe there's something else I need to install to get emails from this plugin?

 

I believe the plugin uses the notification system included with v6.  As long as email notifications are setup correctly for your system, you shouldn't have any issues. 

I just ran and completed running PreClear with this plugin and it is great.

My only question is where do I find the Smart History that is associated with each disk that I ran the Preclear on ?

I do find a Smart Hstory (Printed in Red) in the System Log.

If I go to the Smart History Button I get the following message.

 

"Sorry: cannot run smarthistory. "

"The /boot/smarthistory/smarthistory.php file does not exist."

I just ran and completed running PreClear with this plugin and it is great.

My only question is where do I find the Smart History that is associated with each disk that I ran the Preclear on ?

I do find a Smart Hstory (Printed in Red) in the System Log.

If I go to the Smart History Button I get the following message.

 

"Sorry: cannot run smarthistory. "

"The /boot/smarthistory/smarthistory.php file does not exist."

flash/preclear_reports/

That's where all the preclear reports are on mine anyway.

  • 2 weeks later...

Nice job!  Plugin install worked, once I renamed the script file.

Thanks!  Saved lots of command stuff.  Just install, push a button and watch the progress! :)  Love it!

Trying to use this on a new 4TB drive and nothing happens.

 

I used it about a month ago and it ran fine. I have the scripts in the correct location as well.

-----

 

Update:

 

Delete and reinstalled plugin and it works.

 

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.