Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Convert bht to be compatible with Freenas (bulk disk burn-in)

Kryptonit3

Newbie
Joined
Nov 20, 2019
Messages
10
Anyone good at shell programming? I can get by with a lot of time and trial and error. Feel free to submit pull requests.

https://github.com/Kryptonit3/bht (this is my fork of the original located at https://github.com/ezonakiusagi/bht )

Why am I doing this? I know there is already a good burn-in script https://github.com/Spearfoot/disk-burnin-and-testing . I would like to incorporate the email notifications, along with the ease at which the script launches the badblocks and testing in the background and how it neatly organizes results and the ability to check the status of the process. Here is a beautiful demonstration by Art of Server https://www.youtube.com/watch?v=9bh5ZK8z4ZA . I see in the comments of the video that @Chris Moore had shown interest.

Right now I am working on trying to find a way to replace the lsscsi requirement.

In the script lsscsi is used to determine if the drive is a disk around lines 357-362 ( https://github.com/Kryptonit3/bht/blob/master/bht#L357-L362 )
I reviewed the linux docs on lsscsi and it looks like the script is looking for the word disk as the second item in the string.

The preliminary searching I have done, I have found running the following commands:

camcontrol identify da9 | grep "media RPM"
where da9 is your drive number

for USB drives it outputs
camcontrol: ATA ATA_IDENTIFY via pass_16 failed
camcontrol: ATA ATAPI_IDENTIFY via pass_16 failed
so we would just want to make sure the string media RPM is present in the results.

for spinning drives it outputs
media RPM 5400 (or 7200)

for SSDs it outputs
media RPM non-rotating

geom disk list da9 | grep rotationrate
this one may actually be easier to dissect as the results are more consistent.

for USB drives it outputs
rotationrate: unknown

for spinning drives it outputs
rotationrate: 5400 (or 7200)

for SSDs it outputs
rotationrate: 0

so determining the drive type wouldn't be hard. Is anyone interested in making this burn-in process a little easier and adding email notifications? I've only made a few changes so far in an attempt to convert it ( https://github.com/ezonakiusagi/bht/compare/master...Kryptonit3:master ).
 
Top