Preclear plugin


Recommended Posts

I preclear a disk overnight and everything went fine. 

 

I have a request that you might want to consider implementing. Generate a report after the preclear is finished.  (That way, if people have questions about the disk they have just precleared, they will have the information available to post with their query.)

 

I know that there are instructions on how to do this from the command line using the following command:

 

  grep preclear /var/log/syslog | todos >> /boot/preclear_results.txt

 

But this partially defeats the reason for the plugin.  I also found that you can copy and paste the contents of the popup window into a text editor (copy of that action is attached) but I would think that could be automated also.  (Quick comment--- I got a lot of extra lf's at the end of the report when I did it so you should probably strip those out before saving.)

 

Using either method, the resulting text file could be stored in the /boot/config/plugins/preclear.disk folder on the flash drive.  I would like to suggest that when you name the file you incorporate the serial number of the disk into it.  That way there should not be a problem with overwriting the file of the preclear results of another disk.

PreClearReport-JTTL.txt

Link to comment

I preclear a disk overnight and everything went fine. 

 

I have a request that you might want to consider implementing. Generate a report after the preclear is finished.  (That way, if people have questions about the disk they have just precleared, they will have the information available to post with their query.)

 

I know that there are instructions on how to do this from the command line using the following command:

 

  grep preclear /var/log/syslog | todos >> /boot/preclear_results.txt

 

But this partially defeats the reason for the plugin.  I also found that you can copy and paste the contents of the popup window into a text editor (copy of that action is attached) but I would think that could be automated also.  (Quick comment--- I got a lot of extra lf's at the end of the report when I did it so you should probably strip those out before saving.)

 

Using either method, the resulting text file could be stored in the /boot/config/plugins/preclear.disk folder on the flash drive.  I would like to suggest that when you name the file you incorporate the serial number of the disk into it.  That way there should not be a problem with overwriting the file of the preclear results of another disk.

You can find the reports in /boot/preclear_reports.

I agree that it would be nice to have a way of accessing the reports in the plugin also.

Link to comment

 

You can find the reports in /boot/preclear_reports.

I agree that it would be nice to have a way of accessing the reports in the plugin also.

 

My bad.  I totally missed that directory.  Again, the need for the help feature.

 

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

 

The second thing is a bit of a quibble.  What is everyone's opinion/feelings about line endings?  Presently, the files are in the linux format of 'lf'.  Should they be in the 'lf/cr' format for the Windows people.  I know that the suggested command line for collecting the report using the original  command-line script pipes the output through the    'todos'    command to change it to the Windows format.  I use EditPad lite so it doesn't present that much of an issue for me but I am wondering about which format is preferred when posting to the forum. 

Link to comment

When this plugin installs it attempts to do:

 

# fix permissions of executable files
chmod +x /usr/local/sbin/readvz

 

However this file does not exist and therefore always generates an error message (as can be seen in several earlier posts of installs in this thread)

 

This file is part of the fast preclear that bjp999 created.

 

Link to comment

When this plugin installs it attempts to do:

 

# fix permissions of executable files
chmod +x /usr/local/sbin/readvz

 

However this file does not exist and therefore always generates an error message (as can be seen in several earlier posts of installs in this thread)

This file is part of the fast preclear that bjp999 created.

 

But this file is in the root of my flash drive so it must have been copied there when this plugin was installed.  What is its intended purpose in the current plugin?  (I installed this plugin for the first time a couple of days ago.  The last -modified date on the file is 6/12/2015.  It was created on 6/11//2015. )

 

 

 

Link to comment

The result is a preclear.diskfolder containing

libevent-2.0.21-x86_64-1.txz            file size    0

tmux-1.8-x86_64-1.txz                    file size    0

preclear.disk-2015.05.20b.txz            file size  95

 

None of the files have been unpacked

 

Same results here when installing the plugin.  2 files are downloaded blank. 

wget -O /boot/config/plugins/preclear.disk/libevent-2.0.21-x86_64-1.txz http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/l/libevent-2.0.21-x86_64-1.txz

wget them manually results in the same 0 byte file.  Where should we get these files from?

Link to comment

The result is a preclear.diskfolder containing

libevent-2.0.21-x86_64-1.txz            file size    0

tmux-1.8-x86_64-1.txz                    file size    0

preclear.disk-2015.05.20b.txz            file size  95

 

None of the files have been unpacked

 

Same results here when installing the plugin.  2 files are downloaded blank. 

wget -O /boot/config/plugins/preclear.disk/libevent-2.0.21-x86_64-1.txz http://mirrors.slackware.com/slackware/slackware64-14.1/slackware64/l/libevent-2.0.21-x86_64-1.txz

wget them manually results in the same 0 byte file.  Where should we get these files from?

 

I'll choose a mirror and add MD5 hash to avoid this.

Link to comment

[glow=red,2,300]UPDATE[/glow]

 

###2015.06.13

Fix: remove ^n markup from preclear status

Fix: show a wait message while preclear is starting

Fix: add MD5 verification to downloaded files

Fix: remove the Start Preclear link if an tmux session is already open

Link to comment

[glow=red,2,300]UPDATE[/glow]

 

###2015.06.13

Fix: remove ^n markup from preclear status

Fix: show a wait message while preclear is starting

Fix: add MD5 verification to downloaded files

Fix: remove the Start Preclear link if an tmux session is already open

 

OK, just updated successfully and all 4 files in the preclear.disk folder now have respectable sizes.  I started a preclear.  Now on the Settings->Preclear Disk screen I have one line for disk sdo and at the far right side, only a Starting.... followed by a big red X

 

Is this expected status behavior for a running preclear?

Link to comment

 

OK, just updated successfully and all 4 files in the preclear.disk folder now have respectable sizes.  I started a preclear.  Now on the Settings->Preclear Disk screen I have one line for disk sdo and at the far right side, only a Starting.... followed by a big red X

 

Is this expected status behavior for a running preclear?

 

Yes, at the beginning of the preclear. If it stood still, there's a unknown bug there.

Link to comment

[glow=red,2,300]UPDATE[/glow]

 

###2015.06.13

Fix: remove ^n markup from preclear status

Fix: show a wait message while preclear is starting

Fix: add MD5 verification to downloaded files

Fix: remove the Start Preclear link if an tmux session is already open

 

OK, just updated successfully and all 4 files in the preclear.disk folder now have respectable sizes.  I started a preclear.  Now on the Settings->Preclear Disk screen I have one line for disk sdo and at the far right side, only a Starting.... followed by a big red X

 

Is this expected status behavior for a running preclear?

If you did not get a text screen sounds like it did not start.

You should have 3 tgz files and the script in your preclear. disk folder. Did you turn off all pop up and adware blockers?

Link to comment

 

OK, just updated successfully and all 4 files in the preclear.disk folder now have respectable sizes.  I started a preclear.  Now on the Settings->Preclear Disk screen I have one line for disk sdo and at the far right side, only a Starting.... followed by a big red X

 

Is this expected status behavior for a running preclear?

Wet

Yes, at the beginning of the preclear. If it stood still, there's a unknown bug there.

I saw similar behavior with a bad download.  Check the file sizes in /boot/config/plugins/disk.preclear.  if there are any with a size of zero bytes, that's likely the problem.  Remove and add the plugin again, verify file size, and that should fix it.

Link to comment

[glow=red,2,300]UPDATE[/glow]

 

###2015.06.13

Fix: remove ^n markup from preclear status

Fix: show a wait message while preclear is starting

Fix: add MD5 verification to downloaded files

Fix: remove the Start Preclear link if an tmux session is already open

 

OK, just updated successfully and all 4 files in the preclear.disk folder now have respectable sizes.  I started a preclear.  Now on the Settings->Preclear Disk screen I have one line for disk sdo and at the far right side, only a Starting.... followed by a big red X

 

Is this expected status behavior for a running preclear?

 

 

 

On the preclear page, right side, above the start button it should state if the script is available

Link to comment

On the preclear page, right side, above the start button it should state if the script is available

 

I get a pop up that gets as far as the this but it seems it doesn't get the "Yes" input:

 

Device Boot Start End Blocks Id System
/dev/sdo1 1 4294967295 2147483647+ 0 Empty
########################################################################
invoked as /boot/config/plugins/preclear.disk/preclear_disk.sh -c 1 /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'):

 

In fact if I invoke it from a terminal session in putty, it wants me to enter the "Yes" twice before it starts clearing....

 

Update: It was attached to my 24 port Areca controller, not the motherboard ATA ports.  Once I hooked it to the motherboard, it seems to be working OK

 

Link to comment

 

You can find the reports in /boot/preclear_reports.

I agree that it would be nice to have a way of accessing the reports in the plugin also.

 

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

 

The second thing is a bit of a quibble.  What is everyone's opinion/feelings about line endings?  Presently, the files are in the linux format of 'lf'.  Should they be in the 'lf/cr' format for the Windows people.  I know that the suggested command line for collecting the report using the original  command-line script pipes the output through the    'todos'    command to change it to the Windows format.  I use EditPad lite so it doesn't present that much of an issue for me but I am wondering about which format is preferred when posting to the forum.

 

I precleared the same drive again after the recent update and all went well.  I am still having the issue where I have to double click to get things to start and, yet, a single click seems to work at other times.  I can not seem to find a pattern as what is causing this behavior. 

 

I do want to thank gfjardim for adding the extension to the file names.  It will be a big help to those who want to look at the files to make sure that 'nothing weird' is going on with the drive and help the forum gurus who will inevitably be asked to analyze the files uploaded by forum posters to see if their drives is OK.

 

Since I was the only one who who even expressed a (albeit remote) preference for 'lf/cr' format, I assume that most people are OK with the present 'lf' formatting. 

 

Gfjardim, thanks again for all your effort, time and hard work on this project!

Link to comment

 

I precleared the same drive again after the recent update and all went well.  I am still having the issue where I have to double click to get things to start and, yet, a single click seems to work at other times.  I can not seem to find a pattern as what is causing this behavior. 

 

Nether do I. I revised the code and found no reason why this is happening. I couldn't recreate the timeout issue you saw with the Areca card either...

 

I do want to thank gfjardim for adding the extension to the file names.  It will be a big help to those who want to look at the files to make sure that 'nothing weird' is going on with the drive and help the forum gurus who will inevitably be asked to analyze the files uploaded by forum posters to see if their drives is OK.

 

Since I was the only one who who even expressed a (albeit remote) preference for 'lf/cr' format, I assume that most people are OK with the present 'lf' formatting. 

 

Gfjardim, thanks again for all your effort, time and hard work on this project!

 

I'll include it on my proposal to Joe L. Please note that this plugin based on his script, and I don't have control over it's development.

 

Link to comment

 

I precleared the same drive again after the recent update and all went well.  I am still having the issue where I have to double click to get things to start and, yet, a single click seems to work at other times.  I can not seem to find a pattern as what is causing this behavior. 

 

Nether do I. I revised the code and found no reason why this is happening. I couldn't recreate the timeout issue you saw with the Areca card either...

 

I do want to thank gfjardim for adding the extension to the file names.  It will be a big help to those who want to look at the files to make sure that 'nothing weird' is going on with the drive and help the forum gurus who will inevitably be asked to analyze the files uploaded by forum posters to see if their drives is OK.

 

Since I was the only one who who even expressed a (albeit remote) preference for 'lf/cr' format, I assume that most people are OK with the present 'lf' formatting. 

 

Gfjardim, thanks again for all your effort, time and hard work on this project!

 

I'll include it on my proposal to Joe L. Please note that this plugin based on his script, and I don't have control over it's development.

 

Did you ever hear back from Joe?

Link to comment

 

I do want to thank gfjardim for adding the extension to the file names.  It will be a big help to those who want to look at the files to make sure that 'nothing weird' is going on with the drive and help the forum gurus who will inevitably be asked to analyze the files uploaded by forum posters to see if their drives is OK.

 

Since I was the only one who who even expressed a (albeit remote) preference for 'lf/cr' format, I assume that most people are OK with the present 'lf' formatting. 

 

Gfjardim, thanks again for all your effort, time and hard work on this project!

 

I'll include it on my proposal to Joe L. Please note that this plugin based on his script, and I don't have control over it's development.

 

The actual place that I found the command line  (    grep preclear /var/log/syslog | todos >> /boot/preclear_results.txt  ) for getting the preclear report was in the Configuration Tutorial at this section: 

 

    http://lime-technology.com/wiki/index.php/Configuration_Tutorial#Preclearing_Without_Screen

 

The todos  utility is a part of unRAID and it will convert all lf's to lf/cr's.  I just went back to my old unRAID v 5.0.6. backup and found that JoeL's script does generate three reports and they have only lf's.  Wow, I learned something new today.    ::)      (I must admit that I haven't read Joe's complete directions for use since I first installed the script a few years ago.  I would occasionally check his thread to see if he had a new version and update if there was.) 

 

Link to comment

 

OK, just updated successfully and all 4 files in the preclear.disk folder now have respectable sizes.  I started a preclear.  Now on the Settings->Preclear Disk screen I have one line for disk sdo and at the far right side, only a Starting.... followed by a big red X

 

Is this expected status behavior for a running preclear?

 

Yes, at the beginning of the preclear. If it stood still, there's a unknown bug there.

 

After much installing and deinstalling, it seems to be working, except for one thing.  I now have 2 lines showing up for the disk that is being precleared.  I installed the unassigned devices plugin, and it too has 2 lines showing up listing the preclearing drive.  I haven't rebooted and installed 6final yet.  Still on rc5.  Want me to try anything?

Link to comment
  • Squid featured, unfeatured and pinned this topic
  • 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.