Preclear plugin


Recommended Posts

2 minutes ago, luisv said:

Since preclear, plugin or script, was the optional standard and recommendation, whats the new one?

There is no standard recommendation, ask 10 different users and you might get 10 different answers, I for example do a single read pass with MHDD on another computer, it's the only tool I know that clearly shows slow sectors, in my experience a good predictor of future issues, and those can't be seen on preclear, most other tools and SMART attributes.

Link to comment

I did a quick look into this plugin.  The main reason why it isn't working is because of this:

 

https://github.com/gfjardim/unRAID-plugins/blob/900452f0a7c4e2541839a83bbb347eccda0de2f0/plugins/preclear.disk.plg#L394-L406
case $gcc_version in
  '7.2.0')
    download_install ncurses-6.0-x86_64-3.txz c04358fd7d7cb0b5ca67f215871f3692
    download_install libevent-2.1.8-x86_64-1.txz 9ba9d61dcd90d45719d27b9e7a111913
    download_install tmux-2.5-x86_64-1.txz a48783401331620b7c7e5d7af58f53db
    download_install utempter-1.1.6-x86_64-2.txz aed1f39d4a5acddb225b542145e0eeaf
  ;;
  '5.3.0'|'5.4.0'|'7.1.0')
    download_install libevent-2.0.22-x86_64-1.txz 7a755ece3e378f244a3c327369e7f2ac
    download_install tmux-2.2-x86_64-2.txz a268019858c88d5f2f702d9fc182a37c
    download_install ncurses-5.9-x86_64-4.txz c2d2b01f021dc2f4752c4fff02f65fd5
    download_install utempter-1.1.6-x86_64-2.txz aed1f39d4a5acddb225b542145e0eeaf
  ;;

 

From my research, this code needs to be updated to include 7.3.0 and it appears that the file that needs to be added to the list of packages located here:

 

https://github.com/gfjardim/unRAID-plugins/tree/master/source/packages is tmux-2.6-x86_64-1.txz

 

Forgot to mention tmux-2.6-x86_64-1.txz can be downloaded from here --> http://slackware.cs.utah.edu/pub/slackware/slackware64-current/slackware64/ap/

 

I currently too busy with current work commitments to try this out and I am currently running 6.4.0 to test this out, but if somebody likes to hack things, this is what I would try.

 

You would pretty much need to download the tmux-2.6-x86_64-1.txz and unzip it into the correct directory to try this.

Edited by Limy
  • Like 1
Link to comment
49 minutes ago, bonienl said:

My mode of operation is to use the standard clear function of unRAID, which writes all zeroes to the disk, then bring the disk online (format) and run a non-correcting parity check, which does a complete read of the new disk. If at this point I don't receive any SMART notifications, I consider the disk good to go.

 

My problem with this method is that if the disk fails the read test (the non-correcting parity check) it is already incorporated into the array and removing it again is not a trivial task. I want a method that at least writes every byte and reads every byte before introducing  the disk into the array.

 

 

The destructive write mode of badblocks is something I've used before and found effective.

 

Link to comment

I read the last pages of this thread and while I get it that you don't "need" the pre-clear plugin, it simplifies a lot my life, especially with the status every 25% and the pre and post-read.

 

I will stay on 6.4.0 till it is ported, just because it is my top 2 plugins (with UD) I use the most as I am still in the process of adding HDDs to my new tower!

Link to comment
12 minutes ago, Polopollo said:

I read the last pages of this thread and while I get it that you don't "need" the pre-clear plugin, it simplifies a lot my life, especially with the status every 25% and the pre and post-read.

 

I will stay on 6.4.0 till it is ported, just because it is my top 2 plugins (with UD) I use the most as I am still in the process of adding HDDs to my new tower!

Just want to be sure you realize that it may never get updated and that the preclear script still works (with a couple of minor modifications) just lacks a GUI and no notifications.

Link to comment

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_working_on_641/

 

Caveat emptor and all that.  I'm testing it on a drive in my server presently, it seems to be working properly.

 

ohlin5 in the same post has provided an installable version that works with 6.4.1 and should maintain backwards compatiblity here:

 

https://raw.githubusercontent.com/dohlin/unRAID-plugins/master/plugins/preclear.disk.plg

Edited by sureguy
Downloadable plugin
  • Like 6
  • Upvote 1
Link to comment
55 minutes ago, wgstarks said:

That’s good to know. Which variable is used?

The script appears to use the mail command, which is not installed by default on unRAID (and isn't available from NerdPack).  Without that installed email notifications will not work and the command will probably fail.

 

The options in the script would be:

 

       -m [email protected] = optional recipient address.  If blank and -M
            option is used, it will default to default e-mail address of "root"

       -M 1 = Will send an e-mail message at the end of the final results
              (default if -m is used, but no other -M option given)

       -M 2 = Will send an e-mail same as 1 plus at the end of a cycle (if multiple
            cycles are specified)

       -M 3 = Will send an e-mail same as 2 plus at the start and end of the pre-read,
            zeroing, post-read

       -M 4 = Will send an e-mail same as 3 plus also at intervals of 25%
            during the long tests

       The -m, -M options requires that a valid working mail command is installed.

 

Edited by sureguy
Link to comment
54 minutes ago, saarg said:

 

The script does send notifications on email. 

 

32 minutes ago, sureguy said:

The script appears to use the mail command, which is not installed by default on unRAID (and isn't available from NerdPack).  Without that installed email notifications will probably fail.

 

The options in the script would be:

 


       -m [email protected] = optional recipient address.  If blank and -M
            option is used, it will default to default e-mail address of "root"

       -M 1 = Will send an e-mail message at the end of the final results
              (default if -m is used, but no other -M option given)

       -M 2 = Will send an e-mail same as 1 plus at the end of a cycle (if multiple
            cycles are specified)

       -M 3 = Will send an e-mail same as 2 plus at the start and end of the pre-read,
            zeroing, post-read

       -M 4 = Will send an e-mail same as 3 plus also at intervals of 25%
            during the long tests

       The -m, -M options requires that a valid working mail command is installed.

 

You're correct. Just fails with an error-

error: "mail" program does not exist.

 

Looks like the mail program must have been part of the old unMenu package.

Link to comment
2 hours ago, sureguy said:

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_working_on_641/

 

Caveat emptor and all that.  I'm testing it on a drive in my server presently, it seems to be working properly.

 

ohlin5 in the same post has provided an installable version that works with 6.4.1 and should maintain backwards compatiblity here:

 

https://raw.githubusercontent.com/dohlin/unRAID-plugins/master/plugins/preclear.disk.plg

 

Since the only change they made was to replace 

case $gcc_version in
  '7.2.0')

with

case $gcc_version in
  '7.3.0')

won't that result in the wrong version of tmux being installed?

 

On 08/02/2018 at 4:58 PM, Limy said:

From my research, this code needs to be updated to include 7.3.0 and it appears that the file that needs to be added to the list of packages located here:

 

https://github.com/gfjardim/unRAID-plugins/tree/master/source/packages 

 

is tmux-2.6-x86_64-1.txz

 

Link to comment
2 minutes ago, John_M said:

 

Since the only change they made was to replace 


case $gcc_version in
  '7.2.0')

with


case $gcc_version in
  '7.3.0')

won't that result in the wrong version of tmux being installed?

 

 

Hi John_M,

 

Well, that depends.  If the fellow on reddit has it working with the older tmux, then it shouldn't be a problem.

 

I would have probably tried it with the newer tmux, but the reddit user probably didn't look that far into it.

Link to comment
1 minute ago, John_M said:

 

Since the only change they made was to replace 


case $gcc_version in
  '7.2.0')

with


case $gcc_version in
  '7.3.0')

won't that result in the wrong version of tmux being installed?

 

 

 

Doesn't seem to.  Tmux is probably being used in order to show the progress window (that's the only reason I can imagine that it's needed).  And I'm running a preclear right now - and it's being used and outputting progress:

 

root@Phatstore:~# uname -a
Linux Phatstore 4.14.16-unRAID #1 SMP PREEMPT Wed Jan 31 08:51:39 PST 2018 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux


root@Phatstore:~# ps axu | grep tmux
root     17733  0.0  0.0  27864  6304 ?        Ss   11:28   0:06 /usr/bin/tmux new-session -d -x 140 -y 200 -s preclear_disk_5VP8L3B3
root     27355  0.0  0.0   9764  2108 pts/3    S+   13:33   0:00 grep tmux

Included is a screenshot showing tmux installed by preclear_disk in nerd tools, and the current progress report.

Screen Shot 2018-02-10 at 1.34.01 PM.png

Screen Shot 2018-02-10 at 1.36.08 PM.png

  • Like 1
Link to comment

 

3 minutes ago, sureguy said:

 

Doesn't seem to.  Tmux is probably being used in order to show the progress window (that's the only reason I can imagine that it's needed).  And I'm running a preclear right now - and it's being used and outputting progress:

 


root@Phatstore:~# uname -a
Linux Phatstore 4.14.16-unRAID #1 SMP PREEMPT Wed Jan 31 08:51:39 PST 2018 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux


root@Phatstore:~# ps axu | grep tmux
root     17733  0.0  0.0  27864  6304 ?        Ss   11:28   0:06 /usr/bin/tmux new-session -d -x 140 -y 200 -s preclear_disk_5VP8L3B3
root     27355  0.0  0.0   9764  2108 pts/3    S+   13:33   0:00 grep tmux

Included is a screenshot showing tmux installed by preclear_disk in nerd tools, and the current progress report.

Screen Shot 2018-02-10 at 1.34.01 PM.png

Screen Shot 2018-02-10 at 1.36.08 PM.png

Excellent, I knew it was probably a simple patch to get this going.

 

Thanks for testing.  Sometime when I get time I will upgrade to 6.4.1 and give it a try.

 

  • Like 1
Link to comment
2 hours ago, John_M said:

 

Since the only change they made was to replace 


case $gcc_version in
  '7.2.0')

with


case $gcc_version in
  '7.3.0')

won't that result in the wrong version of tmux being installed?

 

 

 

If you install the linked plugin it maintains backward compatibility as it replaces the gcc version line like so:

 

case $gcc_version in
  '7.2.0'|'7.3.0')

 

Link to comment
23 minutes ago, wgstarks said:

I don’t see a link.

The in the second post that reads:

 

Hot damn, great find!!

For anyone who wants to try it, I forked the repo and made that simple change of the 7.3.0 addition and this URL works for install: https://raw.githubusercontent.com/dohlin/unRAID-plugins/master/plugins/preclear.disk.plg

I take no responsibility for errors obviously, but it seems to work on my end. Great find, OP!

in this thread Reddit:

 

    https://www.reddit.com/r/unRAID/comments/7wjpus/preclear_working_on_641/

 

 

If you copy and paste the link into the 'Install plugin' Link box, the updated version will be install automatically.   

Link to comment

It appears that life has interfered with @gfjardim 's ability to be to support this plugin at the present time.  He does occasionally log into the forum but it has been sometime since he has posted anything.  So it appears that if you want to use this plugin with the most recent versions of unRAID you are going to have to patch the plugin's .plg file before installing it or use the link for the updated file that was posted up on Reddit by a user (ohlin5 ) who folked it over on github.  Of course, the $64 question is-- will he continue to maintain it.  (Granted this last round of problems was caused when the version number of gcc because of changes to it but we can probably expect more of these types of problems.) 

 

So each of us are going to have to pick what he/she wants to do as there are a minimum of four ways to go that I can think of right off the top of my head.  (No, I am not going to post them as there will be immediately several  posts with another one or two ways in each!)  

 

Oh, one more thing.  Could someone download both versions and run the Linux  command that lists the differences between these two files to make sure that the change documented is the only one!  (I would do it but I have forgotten the command...) 

  • Like 1
Link to comment
12 minutes ago, Frank1940 said:

Oh, one more thing.  Could someone download both versions and run the Linux  command that lists the differences between these two files to make sure that the change documented is the only one!  (I would do it but I have forgotten the command...) 

1

 

Done: 

 

I downloaded both md5 summed them and ran diff against them - here's the output:

bishop@ubuntu-pihole:~$ md5sum preclear.new preclear.old
9b38439b09c9a763d50414a4a328485d  preclear.new
739681c3298b9be7bacbf1ca5f5fc802  preclear.old

bishop@ubuntu-pihole:~$ diff preclear.new preclear.old
395c395
<   '7.2.0'|'7.3.0')
---
>   '7.2.0')

 

Edited by sureguy
formatting
Link to comment
  • Squid unpinned this topic

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.