Jump to content

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


Recommended Posts

I power cycled before wiping the MBR but not after.

 

I'll try that now. This is so frustrating!

I know.. but would it be less frustrating if it died when you were 20 hours into loading it with your data?

 

Personally, I'd seriously think about using a different brand/model.

 

It is just not worth the loss of hair.

 

Joe L.

 

Link to comment

I just attached version 1.6 of the preclear_disk.sh script.  The changes were needed to support the new config/disk.cfg format used in unRAID 5.0beta4

 

Previous versions of preclear_disk.sh will not properly report candidate drives using the "-l" option if used on unRAID 5.0beta4.

(and presumably all releases that will follow)  This is because unRAID 5.0beta4 changed the format of the config/disk.cfg file.

 

The new 1.6 version of preclear_disk.sh will work with either older versions of unRAID or with the new 5.0beta4 version.  Everybody who uses preclear_disk.sh should download the fixed version.

 

Joe L.

Link to comment

I apologize if this isn't the right post to ask this.  I just ran preclear with screen a couple nights ago using a great step by step tutorial/guide that I had found.  Now I'm trying to find that link for a friend.  I've been trying for an hour but just can't seem to find it.  Can anyone point me in the right direction.  

 

Thanks very much.

 

dave

 

 

UPDATE:  Found it under configuration. It has a nice guide using screen. http://lime-technology.com/wiki/index.php?title=Configuration_Tutorial

 

 

Link to comment

I used this once over a year ago and it worked great.  Today, I needed to make use of it again against a 1.5TB Samsung Drive on unRAID v4.7 Final.  I do have 4K sectors enabled in unRAID as I recently moved to a 2TB Seagate LP parity drive that supported advanced formatting.

 

Possibly, I don't understand enough of the process, but I did not specify the -A option when starting preclear on the 1.5TB Samsung.  However, at the top of the console, it reads

cycle 1 of 1, partition start on sector 64

 

Shouldn't this drive be starting on sector 63?

 

Thanks,

 

Jon

Link to comment

I used this once over a year ago and it worked great.  Today, I needed to make use of it again against a 1.5TB Samsung Drive on unRAID v4.7 Final.  I do have 4K sectors enabled in unRAID as I recently moved to a 2TB Seagate LP parity drive that supported advanced formatting.

 

Possibly, I don't understand enough of the process, but I did not specify the -A option when starting preclear on the 1.5TB Samsung.  However, at the top of the console, it reads

cycle 1 of 1, partition start on sector 64

 

Shouldn't this drive be starting on sector 63?

 

Thanks,

 

Jon

You've elected 4k-aligned on the unRAID settings screen, so in the absence of either a "-a" or "-A" option specified on the command line, preclear_disk.sh used your default setting.

 

Your drive will work perfectly fine aligned to a 4k-boundary.  

 

Joe L.

Link to comment

great,

cheers!

 

maybe i missed it, where would be a good place to look to understand the commands for pre-clearing?

 

and another question, Now that in settings  Default partition format is set to 4k aligned, how would non AF drives be added precleared? (got some samsung F3's I'd like to add later)

 

 

update:

quotes taken from 4.7 Release Notes

For most AF drives, you will want to set "Default partition format" to "MBR: 4K-aligned" for maximum performance

(but see note about the Western Digital EARS drives below).  Also, there is no performance or storage loss in

starting Partition 1 in sector 64 for ALL drives, not just AF drives.

 

IMPORTANT: any drive formatted with "MBR: 4K-aligned" using this version of unRAID OS will NOT BE RECOGNIZED as

formatted in any previous version of unRAID OS.

if I understand this correctly, when 4k alignment is set, its OK to leave it on for all (including non-AF) drives  and preclear will not need any special commands.

 

 

Finally, the MBR of any drive that already has a valid "unRAID" MBR will not be re-written, regardless of the

setting of "Default partition format".  This includes unRAID MBR with "factory-erased" signature.  Therefore, if

you use Joe L.'s excellant "preclear_disk" script, you must expclitly use the -A option to position partition 1 in

sector 64 if this is what you desire.

or do you need to put -A anyway? or is this referring to an older version of the preclear script?

 

If you are running unRAID 4.7 onward, in the absence of either a "-a" or "-A" option specified on the command line, preclear_disk.sh will use the alignment preference you specified in the unRAID settings screen as its default.

(-a will force MBR-unaligned. -A will force MBR-4k-aligned )

if I understand this correctly it cancels the previous statement for preclearing "new" disks?

 

thanks for your patience

Link to comment

You understand correctly.

 

At the time of the initial 4.7 release you needed to use the -A option.  Soon thereafter I modified the preclear script to use the aligned/un-aligned preference set on the unRAID "Settings" page if you did not specify either "-a" or "-A" on the command line.

 

 

Link to comment

Hello,

 

I've run preclear on two drives that I've added to my array from a Windows 7 PC, where they've been running for quite a while (couple of years at least).  They were configured for RAID-0 on the Intel mobo "raid adapter" in that machine.

 

Any advice on the output?  I'm still looking around, but thought I'd ask here as these forums are an excellent resource :)

 

I'm running preclears again, and will post the next output.

 

Running preclear 1.6.

 

========================================================================1.6
== invoked as: ./preclear_disk.sh /dev/sdb
==  ST3500641NS == Disk /dev/sdb has been successfully precleared
== with a starting sector of 63
== Ran 1 cycle
==
== Using :Read block size = 8225280 Bytes
== Last Cycle's Pre Read Time  : 3:15:25 (42 MB/s)
== Last Cycle's Zeroing time   : 3:01:25 (45 MB/s)
== Last Cycle's Post Read Time : 8:15:55 (16 MB/s)
== Last Cycle's Total Time     : 14:33:53
==
== Total Elapsed Time 14:33:53
==
== Disk Start Temperature: 27C
==
== Current Disk Temperature: 35C,
==
============================================================================
** Changed attributes in files: /tmp/smart_start_sdb  /tmp/smart_finish_sdb
                ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
  Airflow_Temperature_Cel =    64      73           45        In_the_past 36
      Temperature_Celsius =    36      27            0        ok          36
   Hardware_ECC_Recovered =    61      87            0        ok          110955072
   Current_Pending_Sector =     1       1            0        near_thresh 4294967294
    Offline_Uncorrectable =     1       1            0        near_thresh 4294967294
No SMART attributes are FAILING_NOW

4294967294 sectors were pending re-allocation before the start of the preclear.
4294967294 sectors were pending re-allocation after pre-read in cycle 1 of 1.
4294967294 sectors were pending re-allocation after zero of disk in cycle 1 of 1.
4294967294 sectors are pending re-allocation at the end of the preclear,
    the number of sectors pending re-allocation did not change.
0 sectors had been re-allocated before the start of the preclear.
0 sectors are re-allocated at the end of the preclear,
    the number of sectors re-allocated did not change.
============================================================================

 

 

========================================================================1.6
== invoked as: ./preclear_disk.sh /dev/sdc
==  ST3500641NS == Disk /dev/sdc has been successfully precleared
== with a starting sector of 63
== Ran 1 cycle
==
== Using :Read block size = 8225280 Bytes
== Last Cycle's Pre Read Time  : 3:19:59 (41 MB/s)
== Last Cycle's Zeroing time   : 2:58:11 (46 MB/s)
== Last Cycle's Post Read Time : 7:53:12 (17 MB/s)
== Last Cycle's Total Time     : 14:12:29
==
== Total Elapsed Time 14:12:29
==
== Disk Start Temperature: 33C
==
== Current Disk Temperature: 34C,
==
============================================================================
** Changed attributes in files: /tmp/smart_start_sdc  /tmp/smart_finish_sdc
                ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
       Reported_Uncorrect =     1       1            0        near_thresh 602
  Airflow_Temperature_Cel =    66      67           45        In_the_past 34
      Temperature_Celsius =    34      33            0        ok          34
   Hardware_ECC_Recovered =    59      72            0        ok          195743418
   Current_Pending_Sector =     1       1            0        near_thresh 4294967295
    Offline_Uncorrectable =     1       1            0        near_thresh 4294967295
No SMART attributes are FAILING_NOW

4294967295 sectors were pending re-allocation before the start of the preclear.
4294967295 sectors were pending re-allocation after pre-read in cycle 1 of 1.
4294967295 sectors were pending re-allocation after zero of disk in cycle 1 of 1.
4294967295 sectors are pending re-allocation at the end of the preclear,
    the number of sectors pending re-allocation did not change.
2 sectors had been re-allocated before the start of the preclear.
2 sectors are re-allocated at the end of the preclear,
    the number of sectors re-allocated did not change.
============================================================================

Link to comment

Hello,

 

I've run preclear on two drives that I've added to my array from a Windows 7 PC, where they've been running for quite a while (couple of years at least).  They were configured for RAID-0 on the Intel mobo "raid adapter" in that machine.

 

Any advice on the output?  I'm still looking around, but thought I'd ask here as these forums are an excellent resource :)

 

I'm running preclears again, and will post the next output.

 

Running preclear 1.6.

 

========================================================================1.6
== invoked as: ./preclear_disk.sh /dev/sdb
==  ST3500641NS == Disk /dev/sdb has been successfully precleared
== with a starting sector of 63
== Ran 1 cycle
==
== Using :Read block size = 8225280 Bytes
== Last Cycle's Pre Read Time  : 3:15:25 (42 MB/s)
== Last Cycle's Zeroing time   : 3:01:25 (45 MB/s)
== Last Cycle's Post Read Time : 8:15:55 (16 MB/s)
== Last Cycle's Total Time     : 14:33:53
==
== Total Elapsed Time 14:33:53
==
== Disk Start Temperature: 27C
==
== Current Disk Temperature: 35C,
==
============================================================================
** Changed attributes in files: /tmp/smart_start_sdb  /tmp/smart_finish_sdb
                ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
  Airflow_Temperature_Cel =    64      73           45        In_the_past 36
      Temperature_Celsius =    36      27            0        ok          36
   Hardware_ECC_Recovered =    61      87            0        ok          110955072
   Current_Pending_Sector =     1       1            0        near_thresh 4294967294
    Offline_Uncorrectable =     1       1            0        near_thresh 4294967294
No SMART attributes are FAILING_NOW

4294967294 sectors were pending re-allocation before the start of the preclear.
4294967294 sectors were pending re-allocation after pre-read in cycle 1 of 1.
4294967294 sectors were pending re-allocation after zero of disk in cycle 1 of 1.
4294967294 sectors are pending re-allocation at the end of the preclear,
    the number of sectors pending re-allocation did not change.
0 sectors had been re-allocated before the start of the preclear.
0 sectors are re-allocated at the end of the preclear,
    the number of sectors re-allocated did not change.
============================================================================

 

 

========================================================================1.6
== invoked as: ./preclear_disk.sh /dev/sdc
==  ST3500641NS == Disk /dev/sdc has been successfully precleared
== with a starting sector of 63
== Ran 1 cycle
==
== Using :Read block size = 8225280 Bytes
== Last Cycle's Pre Read Time  : 3:19:59 (41 MB/s)
== Last Cycle's Zeroing time   : 2:58:11 (46 MB/s)
== Last Cycle's Post Read Time : 7:53:12 (17 MB/s)
== Last Cycle's Total Time     : 14:12:29
==
== Total Elapsed Time 14:12:29
==
== Disk Start Temperature: 33C
==
== Current Disk Temperature: 34C,
==
============================================================================
** Changed attributes in files: /tmp/smart_start_sdc  /tmp/smart_finish_sdc
                ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
       Reported_Uncorrect =     1       1            0        near_thresh 602
  Airflow_Temperature_Cel =    66      67           45        In_the_past 34
      Temperature_Celsius =    34      33            0        ok          34
   Hardware_ECC_Recovered =    59      72            0        ok          195743418
   Current_Pending_Sector =     1       1            0        near_thresh 4294967295
    Offline_Uncorrectable =     1       1            0        near_thresh 4294967295
No SMART attributes are FAILING_NOW

4294967295 sectors were pending re-allocation before the start of the preclear.
4294967295 sectors were pending re-allocation after pre-read in cycle 1 of 1.
4294967295 sectors were pending re-allocation after zero of disk in cycle 1 of 1.
4294967295 sectors are pending re-allocation at the end of the preclear,
    the number of sectors pending re-allocation did not change.
2 sectors had been re-allocated before the start of the preclear.
2 sectors are re-allocated at the end of the preclear,
    the number of sectors re-allocated did not change.
============================================================================

Can you please post the SMART reports for those two drives.  You'll find copies of the reports in the /boot/preclear_reports directory on your flash drive.  I need to see them before giving an answer.

 

Joe L.

Link to comment

I rebooted for an ACPI related problem which is now fixed.  I'm currently running preclear again, and will post the results with the files when they are completed later tonight.

 

Thank you Joe.

I'll look then.

I'm very curious to see the lines in the raw SMART reports dealing with the "Current Pending Sectors"

 

You'll help me make the report even better.

 

Joe L.

Link to comment

You'll help me make the report even better.

 

Glad I could help ;)

 

Ok, it finally finished... Here's the output of the clears, nearly the same as before.

/dev/sdb

========================================================================1.6
== invoked as: ./preclear_disk.sh /dev/sdb
==  ST3500641NS == Disk /dev/sdb has been successfully precleared
== with a starting sector of 63
== Ran 1 cycle
==
== Using :Read block size = 8225280 Bytes
== Last Cycle's Pre Read Time  : 3:11:47 (43 MB/s)
== Last Cycle's Zeroing time   : 3:02:53 (45 MB/s)
== Last Cycle's Post Read Time : 7:47:55 (17 MB/s)
== Last Cycle's Total Time     : 14:03:44
==
== Total Elapsed Time 14:03:45
==
== Disk Start Temperature: 35C
==
== Current Disk Temperature: 37C,
==
============================================================================
** Changed attributes in files: /tmp/smart_start_sdb  /tmp/smart_finish_sdb
               ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
 Airflow_Temperature_Cel =    63      65           45        In_the_past 37
     Temperature_Celsius =    37      35            0        ok          37
  Hardware_ECC_Recovered =    61      64            0        ok          110939896
  Current_Pending_Sector =     1       1            0        near_thresh 4294967294
   Offline_Uncorrectable =     1       1            0        near_thresh 4294967294
No SMART attributes are FAILING_NOW

4294967294 sectors were pending re-allocation before the start of the preclear.
4294967294 sectors were pending re-allocation after pre-read in cycle 1 of 1.
4294967294 sectors were pending re-allocation after zero of disk in cycle 1 of 1.
4294967294 sectors are pending re-allocation at the end of the preclear,
   the number of sectors pending re-allocation did not change.
0 sectors had been re-allocated before the start of the preclear.
0 sectors are re-allocated at the end of the preclear,
   the number of sectors re-allocated did not change.
============================================================================

 

/dev/sdc

========================================================================1.6
== invoked as: ./preclear_disk.sh /dev/sdc
==  ST3500641NS == Disk /dev/sdc has been successfully precleared
== with a starting sector of 63
== Ran 1 cycle
==
== Using :Read block size = 8225280 Bytes
== Last Cycle's Pre Read Time  : 3:12:33 (43 MB/s)
== Last Cycle's Zeroing time   : 3:06:19 (44 MB/s)
== Last Cycle's Post Read Time : 7:48:40 (17 MB/s)
== Last Cycle's Total Time     : 14:08:40
==
== Total Elapsed Time 14:08:40
==
== Disk Start Temperature: 33C
==
== Current Disk Temperature: 36C,
==
============================================================================
** Changed attributes in files: /tmp/smart_start_sdc  /tmp/smart_finish_sdc
               ATTRIBUTE   NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS      RAW_VALUE
      Reported_Uncorrect =     1       1            0        near_thresh 602
         High_Fly_Writes =    70      72            0        ok          30
 Airflow_Temperature_Cel =    64      67           45        In_the_past 36
     Temperature_Celsius =    36      33            0        ok          36
  Hardware_ECC_Recovered =    58      60            0        ok          32622883
  Current_Pending_Sector =     1       1            0        near_thresh 4294967295
   Offline_Uncorrectable =     1       1            0        near_thresh 4294967295
No SMART attributes are FAILING_NOW

4294967295 sectors were pending re-allocation before the start of the preclear.
4294967295 sectors were pending re-allocation after pre-read in cycle 1 of 1.
4294967295 sectors were pending re-allocation after zero of disk in cycle 1 of 1.
4294967295 sectors are pending re-allocation at the end of the preclear,
   the number of sectors pending re-allocation did not change.
2 sectors had been re-allocated before the start of the preclear.
2 sectors are re-allocated at the end of the preclear,
   the number of sectors re-allocated did not change.
============================================================================

 

And I just saw the /boot/preclear_reports directory holds multiple runs, so i'm posting them all... If I would have looked earlier, I would have posted the first set :).

Link to comment

Those SMART reports show a implementation of SMART where the number of sectors pending re-allocation is NOT contained in the RAW column of the attribute.

 

Obviously, these are not valid statistics, or, at least I hope not... but since both drives report identically, I'll say it is just their early SMART implementation.

Current_Pending_Sector =     1       1            0        near_thresh 4294967294

   Offline_Uncorrectable =     1       1            0        near_thresh 4294967294

 

There is one issue though, at some point in the past the drives were not cooled properly and the "Airflow_Temperature_Cel" normalized value reached and went below the failure threshold.  (Translation, they overheated)

 

If a normalized value of 65 = a temp of 35, and a normalized value of 63 = a temp of 37C, the "worst normalized value" of 45 probably equated to a temperature of 55C.

 

Your drives are probably fine. Have fun.   I think I'll add a section in the pre-clear reports to describe attributes that failed "in_the_past"

 

Joe L.

Link to comment

Thanks Joe for looking at this for me.

 

Yea, the temp thing is my fault.  My unraid setup is in an Antec P182 case.  I hadn't been using the lower drive cage yet.  I put them into the lower drive cage, and didn't realize that the fan that cools them had died at some point.  I was watching the clear on screen though, and started looking at the system to see what the deal was.  I should have shut it down first and then looked.  When I looked back up, it was cooking.  So, shut it down, and replaced the 120mm fan, and it peaked at 38C during the last preclear.

 

Thanks again.

Link to comment

Does the newer preclear script automatically set 4k-aligned on non-advanced format drives?  Because it appears that it does.  Is it a problem since it did this to one of my 500gb drives and it looks like it is going to do it again to another.  Thanks.

 

First, that is not a problem.  A older drive that prefers to be addressed at 512 byte boundaries can be addressed at any 512 boundary, including those that are multiples of 512 bytes.  Since old sectors were 512 bytes, and the AF ones are 4096 bytes, and 4096 is a multiple of 512, there is no issue.  Older drives will work with partitions starting on any sector.

 

The new AF drives work on ANY sector too, but performance will (in tests with small files) be better on sectors starting on 4096 boundaries.  (63x512 is not a multiple of 4096, 56x512 is, and so is 64x512)  The soon to be released 5.0beta5 will use either sector 64 or sector 56, depending on the total size of the drive. (both result in a position a multiple of 4096 bytes)

 

Second, the newest preclear script, if not given any command line arguments will use the setting you elected in the unRAID "Settings" screen as its default.

 

Third, You can always, even if the default on the "Settings" page is MBR-4k-aligned, use the "-a"  (lower case "a") option to force preclear_disk.sh to request the partition start at sector 63.    In the same way, the "-A" (capital "A") can be used to force the start on sector 64, in case your unRAID settings page is set to MBR-unaligned.

 

Fourth, even if you preclear a disk and accidentally used the wrong option, you can convert the precleared disk in a few seconds from one partition format to the other by using the

preclear_disk.sh -C 63 /dev/sdX

or

preclear_disk.sh -C 64 /dev/sdX

options . 

 

It sounds as if your "default" setting in the unRAID settings page is MBR-4k-aligned.  Preclear just did as you instructed.

So... what's the problem?  ;)

 

Joe L.

Link to comment

Thanks Joe,

 

Yes my default is MBR-4k-aligned so that makes since along with the other explanations you have provided.

 

The problem is, I wanted to make sure my non-AF drive that was MBR-4k-aligned would not notice any problems; performance decreases, etc.  Based upon your explanation, I am assuming not and everything will be ok.  BTW, I came accross your convert method after this drive was already in service.  Thanks again.

Link to comment

Hi,

 

I hope that you can help.

 

I have two WD 2TB EARS drive without jumper and I am running 4.7 UnRaid. I have tried to run the preclear utility a few times now and wither it locks up after several hours or it will effect the performance of the server to such an extent I have quit it (ie I have been watching a few films whilst the Preclear is running without a problem then suddenly the video comes to a halt or very nearly, killing the preclear script allows the server to work fine again.)

 

Should I be able to run the script on a working server?

 

Thanks

 

Ridley

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