Jump to content

Preclear plugin


Recommended Posts

Thanks a lot for making this!  Is there anyway to force the stats push to wherever you keep them?  I want to contribute!... Also is there a place to see the stats or at least enough to know how long my disk(4TB) will take?

 

No force, jut a popup asking you to kindly contribute. You can see the results here: https://docs.google.com/spreadsheets/d/1upEmvZZgV0JiHjUX-JNUFYPHMarC0-sLLNoLS3Gbr_g

 

 

Link to comment

I received this message from a server overnight,

 

 

"error: Ignoring tor because of bad file mode - must be 0644 or 0444."

 

 

When I click Send it seams to hang. I waited a few minutes and then reloaded the page. I then hit Dismiss.

 

Please update both plugins and restart your server to clear any leftovers.

 

Enhancement Request:

 

 

Option to alternate between writing 0's and 1's. If I choose an odd number of passes then start with 0's and if even start with 1's. The last pass should always zero.

 

 

Thanks for all the hard work.

 

What you wish to accomplish with that?

Link to comment

Enhancement Request:

 

Option to alternate between writing 0's and 1's. If I choose an odd number of passes then start with 0's and if even start with 1's. The last pass should always zero.

 

Thanks for all the hard work.

What you wish to accomplish with that?

Check for a sticky bit? A bit stuck at 0 would pass the current preclear, but fail a write / verify 1's pass.
Link to comment

What you wish to accomplish with that?

Check for a sticky bit? A bit stuck at 0 would pass the current preclear, but fail a write / verify 1's pass.

If you really want to get thorough, you could do a 1's pass, Hex AA pass, Hex 55 pass, then finish with a 0's pass. That would force any marginal sectors to definitely either pass or puke. Plus, it would almost satisfy DOD erasure standards.
Link to comment

What you wish to accomplish with that?

Check for a sticky bit? A bit stuck at 0 would pass the current preclear, but fail a write / verify 1's pass.

If you really want to get thorough, you could do a 1's pass, Hex AA pass, Hex 55 pass, then finish with a 0's pass. That would force any marginal sectors to definitely either pass or puke. Plus, it would almost satisfy DOD erasure standards.

 

Would that not give the effect of three passes of preclear in one go ?  That would actually be nice..  Kind of the effect of three passes in one..

Link to comment

gfjardim-

 

I've been having other issues with my server, so I've been keeping a close eye on the syslog. In doing so, I ran across a line in my syslog that preclear was running on a disk that doesn't exist in my system as reported here.

 

As suggested by RobJ, I'm reporting it here as a possible bug in the preclear plugin.

 

Essentially, I have drives sda - sdo, yet the syslog reported that preclear was running on sdp.

 

I'm attaching diagnostics.zip as pulled from my system a bit earlier this morning. Let me know if there's any other information you might want/need to help diagnose the situation.

 

And, another hearty THANKS! for continuing to support this great tool!

 

This is obviously a bug, but it's harmless. It's symptom of some leftover files on your system.  I'll investigate as soon as possible, ok?

 

Thanks for reporting.

 

No problem!  Thanks again for keeping up the good work!

 

Link to comment

Please send me the log: go to /Tools/Preclear and click on the 5ghX1Pb.png icon to download it, then upload it here.

 

I just installed yesterday, the log has just 4 lines. 

 

Feb 02 23:53:05 preclear_disk_sdd_11145: Command: /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --notify 3 --frequency 2 --cycles 3 --no-prompt /dev/sdd

Feb 02 23:53:05 preclear_disk_sdd_11145: Preclear Disk Version: 0.8.4-beta

Feb 02 23:53:05 preclear_disk_sdd_11145: S.M.A.R.T. info type: default

Feb 02 23:53:05 preclear_disk_sdd_11145: S.M.A.R.T. attrs type: default

Link to comment

Please send me the log: go to /Tools/Preclear and click on the 5ghX1Pb.png icon to download it, then upload it here.

 

I just installed yesterday, the log has just 4 lines. 

 

Feb 02 23:53:05 preclear_disk_sdd_11145: Command: /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --notify 3 --frequency 2 --cycles 3 --no-prompt /dev/sdd

Feb 02 23:53:05 preclear_disk_sdd_11145: Preclear Disk Version: 0.8.4-beta

Feb 02 23:53:05 preclear_disk_sdd_11145: S.M.A.R.T. info type: default

Feb 02 23:53:05 preclear_disk_sdd_11145: S.M.A.R.T. attrs type: default

 

It looks like preclear does not want to clear my drive that has been part of the array already.  I want to rebuild disk2 from parity back to itself, but I want to run a few preclear cycles it before doing that; the drive is suspect.  The array is stopped and disk2=no device.  If I try to clear this disk, it gets stuck.  I have a brand new unformatted unassigned disk that has never been part of the array.  I am able to successfully kick off a preclear of this disk.  Did I miss a step or is this not normal?  I'm running unRAID v6.2.4

Link to comment

It looks like preclear does not want to clear my drive that has been part of the array already.  I want to rebuild disk2 from parity back to itself, but I want to run a few preclear cycles it before doing that; the drive is suspect.  The array is stopped and disk2=no device.  If I try to clear this disk, it gets stuck.  I have a brand new unformatted unassigned disk that has never been part of the array.  I am able to successfully kick off a preclear of this disk.  Did I miss a step or is this not normal?  I'm running unRAID v6.2.4

Try starting the array with the disk unassigned. The disk assignments don't actually get updated until the array is started.
Link to comment

This is repeating over and over again on two servers that where updated to 6.3.0 last night. All plugins are current.

 

Feb  4 01:38:18 rack root: error: plugins/preclear.disk/Preclear.php: missing csrf_token

Feb  4 01:38:19 rack root: error: plugins/unassigned.devices/UnassignedDevices.php: missing csrf_token

Feb  4 01:38:25 rack root: error: plugins/unassigned.devices/UnassignedDevices.php: missing csrf_token

Feb  4 01:38:29 rack root: error: plugins/preclear.disk/Preclear.php: missing csrf_token

Feb  4 01:38:31 rack root: error: plugins/unassigned.devices/UnassignedDevices.php: missing csrf_token

Feb  4 01:38:37 rack root: error: plugins/unassigned.devices/UnassignedDevices.php: missing csrf_token

Feb  4 01:38:40 rack root: error: plugins/preclear.disk/Preclear.php: missing csrf_token

Feb  4 01:38:43 rack root: error: plugins/unassigned.devices/UnassignedDevices.php: missing csrf_token

Feb  4 01:38:49 rack root: error: plugins/unassigned.devices/UnassignedDevices.php: missing csrf_token

Feb  4 01:38:51 rack root: error: plugins/preclear.disk/Preclear.php: missing csrf_token

 

 

One of the servers that was running 3 pre-clears has an unresponsive webGUI and these processes:

 

 

root@rack:~# ps x | grep emhttp 7532 ?        Sl    4:27 /usr/local/sbin/emhttp

9425 ?        S      0:00 /bin/sh -c /usr/local/emhttp/plugins/dynamix/scripts/monitor &> /dev/null

9426 ?        S      0:00 /usr/bin/php -q /usr/local/emhttp/plugins/dynamix/scripts/monitor

12950 pts/0    S+    1:42 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 3 --no-prompt /dev/sde

12951 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 3 --no-prompt /dev/sde

12952 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 3 --no-prompt /dev/sde

12953 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 3 --no-prompt /dev/sde

12954 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 3 --no-prompt /dev/sde

16299 pts/1    S+    2:01 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdk

16300 pts/1    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdk

16301 pts/1    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdk

16302 pts/1    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdk

16303 pts/1    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdk

17805 pts/2    S+    1:46 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdp

17806 pts/2    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdp

17807 pts/2    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdp

17808 pts/2    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdp

17809 pts/2    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdp

25115 ?        S      0:00 /bin/sh -c /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugincheck &> /dev/null

25125 ?        S      0:00 /usr/bin/php -q /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugincheck

26762 pts/3    S+    0:00 grep emhttp

26895 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 3 --no-prompt /dev/sde

27829 ?        S      0:00 sh -c smartctl -n standby -A '/dev/sdp' > '/var/local/emhttp/smart/sdp'

root@rack:~#

 

 

The other server is running 1 preclear and its webGUI is responsive. This server has these processes:

 

 

  root@Othello:~# ps x | grep emhttp

7501 ?        Sl    2:18 /usr/local/sbin/emhttp

8528 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj

12415 pts/0    S+    2:51 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj

12416 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj

12417 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj

12418 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj

12419 pts/0    S+    0:00 /bin/bash /usr/local/emhttp/plugins/preclear.disk/script/preclear_disk.sh --cycles 1 --no-prompt /dev/sdj

31923 pts/1    S+    0:00 grep emhttp

root@Othello:~#

 

Why so many bash processes?

 

Thanks.

 

 

Link to comment

Each function the script run in parallel fork the script into another pid, simple as that.

 

Let's see. In clearing operation, we have the parent PID, the write function PID, display refresh function PID, and so goes on...

 

 

OK, so that's normal. Any advise on the "missing csrf_token"?

Link to comment

Each function the script run in parallel fork the script into another pid, simple as that.

 

Let's see. In clearing operation, we have the parent PID, the write function PID, display refresh function PID, and so goes on...

 

 

OK, so that's normal. Any advise on the "missing csrf_token"?

 

Apparently, it is caused by ANY browser window that was opened (and is still open) before your last reboot.  And, apparently, it can be on any computer or device and not necessarily the computer that is displaying the error. 

Link to comment

Each function the script run in parallel fork the script into another pid, simple as that.

 

Let's see. In clearing operation, we have the parent PID, the write function PID, display refresh function PID, and so goes on...

 

 

OK, so that's normal. Any advise on the "missing csrf_token"?

 

Apparently, it is caused by ANY browser window that was opened (and is still open) before your last reboot.  And, apparently, it can be on any computer or device and not necessarily the computer that is displaying the error.

 

There is a difference between missing csrf_token and wrong csrf_token.  The missing csrf_token means the post does not have the csrf_token defined.  This is a coding issue in the plugin.  A wrong csrf_token means the csrf_token passed in is the wrong value.  The wrong csrf_token is generally from a stale token from a webgui being open during a reboot.  It would pass the old value because the csrf_token is re-genereated on each boot.

 

- Missing csrf_token  is a programming problem.

- Wrong csrf_token is from a stale value being used and can be fixed by refreshing the page in the open browser.

Link to comment

Each function the script run in parallel fork the script into another pid, simple as that.

 

Let's see. In clearing operation, we have the parent PID, the write function PID, display refresh function PID, and so goes on...

 

 

OK, so that's normal. Any advise on the "missing csrf_token"?

 

Apparently, it is caused by ANY browser window that was opened (and is still open) before your last reboot.  And, apparently, it can be on any computer or device and not necessarily the computer that is displaying the error.

 

There is a difference between missing csrf_token and wrong csrf_token.  The missing csrf_token means the post does not have the csrf_token defined.  This is a coding issue in the plugin.  A wrong csrf_token means the csrf_token passed in is the wrong value.  The wrong csrf_token is generally from a stale token from a webgui being open during a reboot.  It would pass the old value because the csrf_token is re-genereated on each boot.

 

- Missing csrf_token  is a programming problem.

- Wrong csrf_token is from a stale value being used and can be fixed by refreshing the page in the open browser.

 

Thank you for the clarification!  Hopefully, the number of Missing csrf_token issues will decline rapidly as the programmers 'fix' the last of them and folks get all of their plugins updated.  But I would hazard that we will always that the Wrong csrf_token issue with us...

Link to comment

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.

×
×
  • Create New...