Jump to content

Can you abort preclear safely?


ratmice

Recommended Posts

After some unfortunate events relating to my server the past few days I began to wonder:

 

1. if a preclear is aborted when partially done, what state is the disk in and can that lead to problems down the road? For example, pulling the server plug, or in my case the server hangs and has to be forcibly rebooted.

 

2. if you have a few cycles of preclear scheduled and need to stop it before they all finish, can you do this safely? Or do you have to do it right at the end of one cycle? For instance, let's say you wanted 2 preclear cycles and you mistyped 20 by accident. Can you stop it in the middle (after at least one complete cycle) and still have a precleared drive, or do you have to run a complete cycle after aborting?

 

 

Link to comment

After some unfortunate events relating to my server the past few days I began to wonder:

 

1. if a preclear is aborted when partially done, what state is the disk in and can that lead to problems down the road? For example, pulling the server plug, or in my case the server hangs and has to be forcibly rebooted.

 

2. if you have a few cycles of preclear scheduled and need to stop it before they all finish, can you do this safely? Or do you have to do it right at the end of one cycle? For instance, let's say you wanted 2 preclear cycles and you mistyped 20 by accident. Can you stop it in the middle (after at least one complete cycle) and still have a precleared drive, or do you have to run a complete cycle after aborting?

 

 

You can stop the preclear at any time.   depending upon when you stop it will determine if it is considered "precleared" by unRAID with the preclear signature.

 

You can test if the pre-clear signature exists by typing

preclear_disk.sh -t dev/sdX

(where sdX = the three letter device name of your disk)

 

If in the middle of any "write" cycle, the preclear signature will not exist.  

If in the initial read cycle, it will not exist.

It (the preclear signature) will exist in any post-read cycle, or second or subsequent pre-read cycles.

 

If initially configuring an array, the signature does not matter. (it does not matter until you have first calculated parity on the array)

The pre-clear process does however weed out the initially defective drives, and lately there appear to be higher percentages than in years past.  I used to think 1 in 5 were bad.  Lately, I think that is optimistic.

 

Joe L.

Link to comment
  • 6 months later...

I hate to resurrect this old thread, but I was starting my first unRaid build and found this page while troubleshooting an issue and could not get the verify signature command as posted above to work.  For the sake of those who might run into this again, I thought I'd verify that the command is:

 

./preclear_disk.sh -t /dev/sdX

 

This finally worked for me after reading the help file in the root folder.

 

Link to comment

I hate to resurrect this old thread, but I was starting my first unRaid build and found this page while troubleshooting an issue and could not get the verify signature command as posted above to work.  For the sake of those who might run into this again, I thought I'd verify that the command is:

 

./preclear_disk.sh -t /dev/sdX

 

This finally worked for me after reading the help file in the root folder.

That command assumes the preclear_disk.sh program exists in the CURRENT directory.

The shorthand "./whatever" is equivalent to current_directory/whatever.

 

If you put the preclear_disk.sh elsewhere, it will not be found.

 

If you logged in as root, you will be at its home directory of /root

 

If you put preclear_disk.sh on the flash drive, it is likely at /boot/preclear_disk.sh

 

Attempting to use the "./preclear" notation in the /root directory will result in it not being found.

 

You must either change directory to where it does exist, OR give the full path to it.

/boot/preclear-disk.sh

or

cd /boot

./preclear_disk.sh

 

Link to comment
  • 1 year later...

Like Rudy81, I realise this is an old thread. Nonetheless, I think my query will add to the info that is already here and keep it one place.

 

Once aborted, is there any way to access a pre clear report? I used

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

But this produces an empty file.

 

I am able to access the intermediary files in /var/log and have copied them over to /boot/preclear_logs using:

cd /var/log
cp ./smart* /boot/preclear_logs/

 

However, these contain start and mid logs only and I'm not sure how I might interpret them?

 

Many thanks - this is my first Unraid box and I'm super impressed by the community driven feel of this project!

Link to comment

I think I've figured it out - I was looking at a different report from the list of intermediary files in /var/log. A snapshot of the output of one of the drives being pre cleared is below:

 

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   130   130   054    Pre-fail  Offline      -       150
  3 Spin_Up_Time            0x0007   110   110   024    Pre-fail  Always       -       638 (Average 632)
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       234
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   132   132   020    Pre-fail  Offline      -       33
  9 Power_On_Hours          0x0012   098   098   000    Old_age   Always       -       19074
10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       55
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       307
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       307
194 Temperature_Celsius     0x0002   133   133   000    Old_age   Always       -       45 (Min/Max 21/58)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       1

SMART Error Log Version: 1
No Errors Logged

 

I am interpreting these as "all healthy" since read error, write error, reallocated sectors are all 0. The only one is the UDMA_CRC which is 1. A quick search online suggests that this is not an indicator of drive fault, but possibly something to do with a cable at some point in the drive's usage history (I had this one plugged into a rather useless Icy Box NAS at one point).

 

 

Link to comment
  • 3 weeks later...

Correct me if I'm wrong but isn't pre clear a add on and not a requirement?  If it was a requirement it would be in the base install?

Definitely not a requirement, but it sure is handy. Without it, the array will be offline and totally unavailable for hours when you add a hard drive. If you preclear the drive first, the array is only down for a few minutes while the drive is formatted. Also, it provides a really good stress test to weed out bad drives before you trust your data to them. The drive testing is probably of more value than the time saving when you add the drive.
Link to comment

Archived

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

×
×
  • Create New...