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


Recommended Posts

The device names given to disks are not guaranteed to be the same from one boot to the next.  They are assigned as the devices are scanned during boot up and can change if different hardware initialized at different rates (disks spin up at different rates), or if you add new disk controllers or disks.

 

You need to identify the disk by its model and serial number first, then use the associated "sdX" device.  Don't worry about what it used to be called, use the name it is known by now.

 

Joe L.

Link to comment

Just noticed the 1.1 release changes -- thanks for -W and -V

A few posts back you say we no longer need to use -A if no jumper is installed -- could you please add that to release notes.

I said

if there is no jumper on the EARS disk you do want the "-A" option.

correcting someone else's statement.

Link to comment

What happens if you cancel preclear when it's zeroing the drive on the second or third cycle?

If it is reading, no problem.  If it is writing zeros, the disk will not have a proper pre-clear signature if it does not complete the "write" phase, and will not be considered pre-cleared.

 

Joe L.

Link to comment

If the system crashed during a drive preclear, does that drive no longer show up when listing drives?

 

i assume the system crashed so you had to restart.

 

the drive  wont be listed in the webgui anyways since it is not part of the array.

you should be able to see it in Joe's unMenu or if you connect with telnet.

 

if you still cannot see it there, i would guess, that the drive is either faulty or your sata cable should be resitted. to be sure, check if you can see it through the BIOS.

Link to comment

@Joe, looks like an excellent script - great work!!

 

I'm slightly worried that in the future I might at one time forget to use the "-A" switch for AF drives. Would it be possible for you to read out the official unRAID "Default partition format" setting and use that as the default for your script? Reading out that setting would also be helpful once unRAID adds support for GPT partitions.

Link to comment

Am I correct in assuming the -A goes before the -M in the commands with email notifications?

./preclear_disk.sh -A -M 4 /dev/sdX ("root" email address)

 

./preclear_disk.sh -A -m [email protected] -M4 /dev/sdX

 

 

And also would someone be kind enough to tell me what key this is or what does it mean?

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

Link to comment

Am I correct in assuming the -A goes before the -M in the commands with email notifications?

./preclear_disk.sh -A -M 4 /dev/sdX ("root" email address)

It does not matter as long as it is not between the "M" and the "4" and not after the /devsdX.

 

-A -M 4 /dev/sdX

or

-M 4 -A /dev/sdX

or

-m [email protected] -M 4 -A /dev/sdX

or

-A -m [email protected] -M4 /dev/sdX

 

But NOT

-A /dev/sdX -M

and NOT

-M /dev/sdX -A

And also would someone be kind enough to tell me what key this is or what does it mean?

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

It is a unix "pipe" that connects the output of the previous command to the input of the next.  On a US keyboard it is upper-case character "|" on the backslash key "\" and typically the key above the enter key.

 

 

Link to comment

@Joe, looks like an excellent script - great work!!

 

I'm slightly worried that in the future I might at one time forget to use the "-A" switch for AF drives. Would it be possible for you to read out the official unRAID "Default partition format" setting and use that as the default for your script? Reading out that setting would also be helpful once unRAID adds support for GPT partitions.

I did not forget you, but did not yet respond.

 

Your idea is an excellent idea, but you were not the first to suggest it.   The first time was before 4.7 was released, as it was being discussed, but before I knew exactly what the config value would look like.  

 

I thank you for reminding me, and will add it as a "feature" when 5.0beta3 is released, since it will have the MBR-4k-aligned as its default.

 

Joe L.

Link to comment

If the system crashed during a drive preclear, does that drive no longer show up when listing drives?

 

i assume the system crashed so you had to restart.

 

the drive  wont be listed in the webgui anyways since it is not part of the array.

you should be able to see it in Joe's unMenu or if you connect with telnet.

 

if you still cannot see it there, i would guess, that the drive is either faulty or your sata cable should be resitted. to be sure, check if you can see it through the BIOS.

 

Thanks, I actually think the disk is bad.

 

Another question though, if I lose my telnet session during preclear for whatever reason, is there a way for me to log in to check on the status of a preclear that was already initiated?

Link to comment

If the system crashed during a drive preclear, does that drive no longer show up when listing drives?

 

i assume the system crashed so you had to restart.

 

the drive  wont be listed in the webgui anyways since it is not part of the array.

you should be able to see it in Joe's unMenu or if you connect with telnet.

 

if you still cannot see it there, i would guess, that the drive is either faulty or your sata cable should be resitted. to be sure, check if you can see it through the BIOS.

 

Thanks, I actually think the disk is bad.

 

Another question though, if I lose my telnet session during preclear for whatever reason, is there a way for me to log in to check on the status of a preclear that was already initiated?

No need.  If you did not use "screen", the preclear terminated when your session did.
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.