Jump to content

Multiple preclear cycles how to invoke?


p1lot

Recommended Posts

Hello,

 

as trivial this question might seem, but I want to make sure what I do is correct.

 

I am away for a few days and just got 2 new harddisks which I would like to preclear before I leave.

Will preclear_disk.sh -c 3 /dev/sdX do the same as invoking preclear_disk, then again invoking it, and then again... Or does it change the preclear algorithmn?

 

Would really appreciate a definite answer, thanks in advance

Link to comment

Hello,

 

as trivial this question might seem, but I want to make sure what I do is correct.

 

I am away for a few days and just got 2 new harddisks which I would like to preclear before I leave.

Will preclear_disk.sh -c 3 /dev/sdX do the same as invoking preclear_disk, then again invoking it, and then again... Or does it change the preclear algorithmn?

 

Would really appreciate a definite answer, thanks in advance

 

Would both do the same thing.

 

Only difference is with the 3 cycle preclear, I think you'd get a single report at the end, whereas with three separate runs, I think the output files would be overwritten and you'd wind up with results of only the final run.  (I don't usually run more than one cycle, though, so not 100% sure).

Link to comment

I run my drives through 3 cycles in one report to allow for multiple points of comparison throughout the preclear.  If anything comes out differently, the report will show it.  As bjp said, running them individually deprives preclear of the ability to compare cycle results to each other in the report.  I would also suggest invoking the mail command as well, to send you status updates while you're away (assuming you will still get email and check it while you are gone).

Link to comment

Hello,

 

as trivial this question might seem, but I want to make sure what I do is correct.

 

I am away for a few days and just got 2 new harddisks which I would like to preclear before I leave.

Will preclear_disk.sh -c 3 /dev/sdX do the same as invoking preclear_disk, then again invoking it, and then again... Or does it change the preclear algorithmn?

 

Would really appreciate a definite answer, thanks in advance

it is slightly different... The signature written at the end of the process will be exactly the same for both.  Using the -c 3 instead of running the script three times will take less time. 

 

The preclear process is to:

 

1. pre-read the entire disk, both linearly and randomly to allow the disk's SMART firmware to detect unreadable sectors.

2. write zeros to the entire disk, allowing the disk's SMART firmware to re-allocate the unreadable sectors previously detected.

3. post-read the entire disk, both linearly and randomly to allow the disk's SMART firmware to detect unreadable sectors, and verify that all the zeros written can be successfully read back as zeros.

  (this checks  for unreadable sectors AND sectors that could not be written with zeros)

4. write a special signature in the master-boot-record of the disk that unRAID will recognize to indicate the disk has been written with all zeros. (the preclear signature)

 

If you run a single cycle of preclear, by simply typing

preclear_disk.sh /dev/sdX

steps 1,2,3 and 4 are performed in that order.

 

If you run multiple cycles of preclear, by typing

preclear_disk.sh -c 3 /dev/sdX

steps performed will be

1, 2, 3, 2, 3, 2, 3, 4

 

This saves a bit of time, since if you were to run three individual commands you would have run

1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4

 

The saved time is because the post-read of a previous cycle can serve as the pre-read of an immediately run subsequent cycle.

 

Oh yes, early versions of the preclear script did not make the same optimization... it was an unRAID owner using it who made the suggestion to improve its efficiency. I did that back in version .9.9,  about 17 versions ago.

 

Joe L.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...