Jump to content
gfjardim

Preclear plugin

2431 posts in this topic Last Reply

Recommended Posts

You can add this with this command:

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

Much better than my hack. Options integrated into the plugin dialog. Thanks.

 

One thing I noticed is the Mail dropdown spells cycle like this: cicle.

Share this post


Link to post

You can add this with this command:

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

Much better than my hack. Options integrated into the plugin dialog. Thanks.

 

One thing I noticed is the Mail dropdown spells cycle like this: cicle.

 

This is what you get when you let brazilians code plugins for you....  ::)

 

We don't use Y in portuguese words.

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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'):

 

Share this post


Link to post

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?

Share this post


Link to post

There were several multiprocess bugs fixed in the RC6 and final series, including possible deadlocks / hangs. You should definitely update to unraid 6.0.0 FINAL before reporting more issues.

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

 

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?

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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?

 

Yes. The actual preclear script itself.

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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.

 

Share this post


Link to post

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!

Share this post


Link to post

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?

Share this post


Link to post

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. 

Share this post


Link to post

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

Share this post


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.