Re: preclear_disk.sh - a new utility to burn-in and pre-clear disks for quick add


Recommended Posts

Can I keep the array online while I pre clear, my guess is no

 

Thanks

my guess is yes, you can keep the array online.  It is one of the main reasons why the utility was written.

(and since I wrote the pr-clear script, odds are good my guess is correct)

 

The only limitation is you cannot clear a drive if it is assigned to the unRAID array. 

(this is to keep you from erasing your data by accident)

 

Joe L.

Link to comment

Can I keep the array online while I pre clear, my guess is no

 

Thanks

my guess is yes, you can keep the array online.  It is one of the main reasons why the utility was written.

(and since I wrote the pr-clear script, odds are good my guess is correct)

 

The only limitation is you cannot clear a drive if it is assigned to the unRAID array. 

(this is to keep you from erasing your data by accident)

 

Joe L.

 

LOL, Joe your guess was right  :D Thanks

Link to comment

Question for you all. I'm building an array for my buddy and he sent over 8x 2TB WD drives. I was starting to preclear these drives and I was wondering if there is any concern with SCREENing 8x instances of the script? Thoughts?

no.  There have been reports of a person doing 15 at once. 

It will go slower the more you do at the same time, as they all must compete for the same disk controller and/or PCI? bus.  The process is not really CPU intensive, but it is I/O intensive.

Link to comment

I just ran a single cycle of preclear on my new 2TB drive, and everything looks good except one thing. Is a raw read error rate of 51 anything to be worried about? I can't figure out what program to open the preclear log file with either, it's a jumbled mess with notepad.

 

 

Changed attributes in files: /tmp/smart_start_sdd  /tmp/smart_finish_sdd

            ATTRIBUTE  NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE

      Raw_Read_Error_Rate =  100    252          51        ok          0

 

Link to comment

You're reading that SMART attribute wrong. The raw value of RAW_READ_ERROR_RATE is 0.  Your nominal value is "100". The failure threshold is "51". Last I checked, 100 > 51, so the drive is not failing.

 

ATTRIBUTE               NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
Raw_Read_Error_Rate =   100     252           51          ok          0

Link to comment

I just ran a single cycle of preclear on my new 2TB drive, and everything looks good except one thing. Is a raw read error rate of 51 anything to be worried about? I can't figure out what program to open the preclear log file with either, it's a jumbled mess with notepad.

 

 

Changed attributes in files: /tmp/smart_start_sdd  /tmp/smart_finish_sdd

             ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE

      Raw_Read_Error_Rate =   100     252           51        ok          0

 

I don't think this has been said enough.

MOST RAW VALUES ARE MEANINGLESS TO ANYONE OTHER THAN THE MANUFACTURER.

Your disk had a NORMALIZED value of 252 for that attribute when you started the preclear.   It has a value of 100 now that it has a few hours on it.

The 252 is an initial value assigned at the factory.  It moved from that value to a new starting value once the drive had a few hours on it.  The 100 is a starting point value now that statistics are being kept.  The failure threshold for that attribute is 51.  You are nowhere near it.  The "raw" value seems to be 0. and the status is "ok" since the current normalized value is above the failure threshold of 51.

 

Enjoy your new drive.

 

Joe L.

Link to comment

Joe,

 

Will preclear be added to the unmenu package manager? Is there anyway to make it operate from within unmenu? I guess even setting the config in the browser and then calling "telnet://..." would be useful. I will take a stab at a user script, but I'm not sure how far I'll get because don't know how to make the telnet call local. It would be nice to get the device id and have the options set from the unmenu gui.

 

Thanks,

David

Link to comment

Joe,

 

Will preclear be added to the unmenu package manager? Is there anyway to make it operate from within unmenu? I guess even setting the config in the browser and then calling "telnet://..." would be useful. I will take a stab at a user script, but I'm not sure how far I'll get because don't know how to make the telnet call local. It would be nice to get the device id and have the options set from the unmenu gui.

 

Thanks,

David

 

There may be some trickery that can be done to make it work, but it is not as easy as it might appear.  unMenu waits for some output before it returns to the browser.  That wait would be EXTREMELY long if you were to start a preclear from the browser.

Link to comment

Hi everyone

 

I'm preparing my very first unRAID system and trying to use the preclear_disk.sh script on my drives.

 

On one of my drives, I'm unsure whether or not to use the "-A" option for the script. The drive in question is a WD Green Caviar 1.5 TB that I bought as an external USB drive ("My Book Essential") in June 2010 and have now removed from its enclosure to use with unRAID. Details are as follows:

  • "WDC_WD15EADS-11_WD-WMAVU1208747" is the information shown in the "Disk Management" screen of the webUI (http://tower:8080);
  • "WDBAAF0015HBK-00" is the product number shown on the USB enclosure;
  • "WD15EADS-11P8B1" is the model number shown on the label of the drive itself.

 

The following FAQ from WD suggests that the drive is an Advanced Format drive:

http://wdc.custhelp.com/app/answers/detail/a_id/3876

 

But elsewhere on the web there are many other sources which say that WD EADS drives are not Advanced Format.

 

So I'm very confused... and hoping someone on the forum might be able to advise me on the best course of action.

(E.g. Is there any definitive way to tell whether a drive is Advanced Format?  If I use "-A" when I run the script and it turns out this drive is not Advanced Format, what will the likely consequences be?)

 

Thanks in advance for any help, much appreciated.

 

Cheers.

Link to comment

So I'm very confused... and hoping someone on the forum might be able to advise on the best course of action. (For example... if I use "-A" when I run the script and it turns out this drive is not Advanced Format, what will the likely consequences be?)

There is no impact on ANY drive except one that is a drive with 4k sectors internally AND where you have installed a hardware jumper to have it add "1" to all requested sectors.  (making a request for sector 63 actually end up accessing sector 64, which is aligned on a 4k boundary)

 

Your drive is not an EARS drive with a hardware-jumper, therefore, you the "-A" option is perfectly fine for you.

 

Don't get all confused by "advanced format" stuff.  It is partly marketing and partly engineering.  It has been said many times already

You can use a starting sector of 64 for ALL drives except an EARS drive with a jumper.

(If you did, it would electrically add "1" and access sector 65, making it not aligned with a 4k boundary since logical sectors are still presented to the disk controller as starting every 512 bytes.)

 

Joe L.

Link to comment

Your drive is not an EARS drive with a hardware-jumper, therefore, you the "-A" option is perfectly fine for you.

 

Don't get all confused by "advanced format" stuff.   It is partly marketing and partly engineering.   It has been said many times already

You can use a starting sector of 64 for ALL drives except an EARS drive with a jumper.

 

Great, thanks Joe! And sorry I didn't pick this up in my forum reading/searches so far. (There certainly is a lot of information to digest for an unRAID noob like me!)

Link to comment

I was attempting to preclear two disks when I got the following errors on one of them. I'm running this in screen, and I can't figure how to access the complete scrollback buffer, but this is what I can see in my terminal scrolback buffer.

 

================================================================== 1.11
=                unRAID server Pre-Clear disk /dev/sda
=               cycle 1 of 1, partition start on sector 64
= Disk Pre-Clear-Read completed                                 DONE
= Step 1 of 10 - Copying zeros to first 2048k bytes             DONE
= Step 2 of 10 - Copying zeros to remainder of disk to clear it 
=  **** This will take a while... you can follow progress below:
=
=
=
=
=
=
=
=
Elapsed Time:  0:01:09
0+0 records in
0+0 records out
0 bytes (0 B) copied, 8.3341e-05 s, 0.0 kB/s
./preclear_disk.sh: line 636: let: percent_wrote=(0 / ): syntax error: operand expected (error token is ")")
Wrote  0  bytes out of    bytes (% Done)
./preclear_disk.sh: line 1773: / (1306076122 - 1306076096) / 1000000 : syntax error: operand expected (error token is "/ (1306076122 - 1306076096) / 1000000 ")
========================================================================1.11
==  ST3750330NS    9QK0J3Z5
== Disk /dev/sda has been successfully precleared
== with a starting sector of 64
============================================================================
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
** Changed attributes in files: /tmp/smart_start_sda  /tmp/smart_finish_sda
                ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
      Raw_Read_Error_Rate =    84      ok                                 
             Spin_Up_Time =    93      ok                                 

 

and...

 

== Disk /dev/sda has been successfully precleared
== with a starting sector of 64
============================================================================
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
./preclear_disk.sh: line 811: [: : integer expression expected
** Changed attributes in files: /tmp/smart_start_sda  /tmp/smart_finish_sda
                ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
      Raw_Read_Error_Rate =    84      ok
             Spin_Up_Time =    93      ok
         Start_Stop_Count =   100      ok
    Reallocated_Sector_Ct =   100      ok
          Seek_Error_Rate =    71      ok
           Power_On_Hours =    74      ok
         Spin_Retry_Count =   100      ok
        Power_Cycle_Count =   100      ok
         End-to-End_Error =   100      ok
       Reported_Uncorrect =    99      ok
          Command_Timeout =   100      ok
          High_Fly_Writes =    97      ok
  Airflow_Temperature_Cel =    69      ok
      Temperature_Celsius =    31      ok
   Hardware_ECC_Recovered =    42      ok
   Current_Pending_Sector =   100      ok
    Offline_Uncorrectable =   100      ok
     UDMA_CRC_Error_Count =   200      ok
No SMART attributes are FAILING_NOW

0 sectors were pending re-allocation before the start of the preclear.

    a change of 0 in the number of sectors pending re-allocation.
2047 sectors had been re-allocated before the start of the preclear.
    a change of -2047 in the number of sectors re-allocated.
SMART overall-health status =
root@unraid:/boot# 

 

The whole thing took a couple of minutes to run.

 

I've attached the three report files. Is this disk fried? Should the preclear_disk.sh script catch these exceptions and explain the error more clearly to the user?

 

Cheers.

preclear_start__9QK0J3Z5_2011-05-23.txt

preclear_finish__9QK0J3Z5_2011-05-23.txt

preclear_rpt__9QK0J3Z5_2011-05-23.txt

Link to comment

You might not know, but it is absolutely impossible for me to know every way your disk can fail in your hardware.  Your disk is not pre-cleared.

 

It appears as if your disk stopped responding at one point.    Thanks for the error report.  I'll see if I can do anything.

 

Most times, when a disk stops responding it takes a power cycles to get them to respond again.

 

Joe L.

Link to comment

Joe, I love using your preclear script. I have gotten used to it and use it for all my unraid drives to have the confidence i am putting in a good drive into my array.

 

I recently built a hackintosh, and want to "Test"/"burn in" a new seagate drive i am using in it. I dont have the ability to put the seagate into my unraid server right now - even just laying it in there - to run your preclear. Question is, can your tool be run from say a linux live cd or do you know of an OSX tool which essentially does the same thing as preclear and can give me the same feedback (possibly drive genius' Integrity Check or Intech Software's SpeedTools [the Integrity tool])?

 

Much thanks.

Link to comment

Joe, I love using your preclear script. I have gotten used to it and use it for all my unraid drives to have the confidence i am putting in a good drive into my array.

 

I recently built a hackintosh, and want to "Test"/"burn in" a new seagate drive i am using in it. I dont have the ability to put the seagate into my unraid server right now - even just laying it in there - to run your preclear. Question is, can your tool be run from say a linux live cd or do you know of an OSX tool which essentially does the same thing as preclear and can give me the same feedback (possibly drive genius' Integrity Check or Intech Software's SpeedTools [the Integrity tool])?

 

Much thanks.

Create a spare unRAID usb drive using the free version of unRAID and run the test on the drive that way.

Link to comment

I have just setup my server and am about to start pre clearing 4 drives. I plan on using unMenu and Screen since I don't have a physical monitor available, which should continue to process after any telnet session dropouts (at least that's what I understand from the config tutorial anyway).

 

However my concern is since my server only has 1.3Ghz (dual core) and 1GB ram (hopefully upgrade soon) will this hinder the speed or number of drives I can pre-clear at once? All four drives are 2TB each so I was hoping to pre-clear them as efficiently as possible.

 

Thanks.

Link to comment

I have just setup my server and am about to start pre clearing 4 drives. I plan on using unMenu and Screen since I don't have a physical monitor available, which should continue to process after any telnet session dropouts (at least that's what I understand from the config tutorial anyway).

 

However my concern is since my server only has 1.3Ghz (dual core) and 1GB ram (hopefully upgrade soon) will this hinder the speed or number of drives I can pre-clear at once? All four drives are 2TB each so I was hoping to pre-clear them as efficiently as possible.

 

Thanks.

you should be fine.
Link to comment

I have tried preclearing the same drive twice now (2TB Hitachi Deskstar, 0F12117), both times it has crashed/became stuck in writing the zeros (second stage).  The first time it got to 44%, this time 55%.  I used screen to launch the script.

 

If I do a ps I can see the script is still there...

 

root      7161  7012  0 07:26 pts/1    00:00:05 /bin/bash ./preclear_disk.sh /dev/sdg

 

but I don't think it's doing anything because this is what top shows...

 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

3398 root      20  0  4112 2856  620 R    5  0.1  12:02.99 dd

3365 root      20  0    0    0    0 S    2  0.0  4:24.72 flush-8:96

  437 root      20  0    0    0    0 S    2  0.0  6:38.60 kswapd0

6048 nobody    20  0  288m  85m 3520 S    0  2.2  1:14.43 python

    1 root      20  0  828  308  264 S    0  0.0  0:02.56 init

    2 root      20  0    0    0    0 S    0  0.0  0:00.00 kthreadd

    3 root      20  0    0    0    0 S    0  0.0  0:00.13 ksoftirqd/0

 

Both time it has also taken down the unraid and unmenu interfaces with it and I'm not sure how to launch them again without a hard reset.  My shares are also down but applications such as sabnzbd are still working.

 

Is this a drive issue?

Link to comment

I have tried preclearing the same drive twice now (2TB Hitachi Deskstar, 0F12117), both times it has crashed/became stuck in writing the zeros (second stage).  The first time it got to 44%, this time 55%.  I used screen to launch the script.

 

If I do a ps I can see the script is still there...

 

root      7161  7012  0 07:26 pts/1    00:00:05 /bin/bash ./preclear_disk.sh /dev/sdg

 

but I don't think it's doing anything because this is what top shows...

 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

3398 root      20   0  4112 2856  620 R    5  0.1  12:02.99 dd

3365 root      20   0     0    0    0 S    2  0.0   4:24.72 flush-8:96

  437 root      20   0     0    0    0 S    2  0.0   6:38.60 kswapd0

6048 nobody    20   0  288m  85m 3520 S    0  2.2   1:14.43 python

    1 root      20   0   828  308  264 S    0  0.0   0:02.56 init

    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd

    3 root      20   0     0    0    0 S    0  0.0   0:00.13 ksoftirqd/0

 

Both time it has also taken down the unraid and unmenu interfaces with it and I'm not sure how to launch them again without a hard reset.  My shares are also down but applications such as sabnzbd are still working.

 

Is this a drive issue?

We don't know... sounds like your system log and/or your add-on process used up all available memory, so the OS started killing thinks that were idle the longest.  (the emhttp process, etc)

 

Post your system log.  If you can.

 

You can re-start emhttp by logging in and typing

nohup emhttp &

 

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.