Spearfoot / disk-burnin-and-testing

Shell script for burn-in and testing of new or re-purposed drives
Other
853 stars 106 forks source link

Cannot Handle Very Large Drives #12

Closed jsmith65 closed 3 years ago

jsmith65 commented 3 years ago

When trying to run this script on some 18TB drives backblocks threw the following error:

badblocks: Value too large for defined data type invalid end block (4394582016): must be 32-bit value

It seems like this is most likely due to the block size not being big enough for drives of this size. Can we get a dynamic block size based on drive size or another command line parameter to set this manually if we choose?

spotlesscoder commented 3 years ago

Sounds to me like this is a general problem with badblock. As far as I know badblocks is quite old. It has some issues here and there. Also see the issues pointed out in this thread: https://forums.unraid.net/topic/22710-a-good-but-bad-disk-badblocks-alone-can-never-be-trusted/

Spearfoot commented 3 years ago

Here's something to try for your 18TB disks: increase the badblocks -b option value from 4096 to 8192.

jsmith65 commented 3 years ago

This is what I did and it did indeed work, but I had to edit the script. It'd be nice to have this as an optional command line parameter for the script.

Spearfoot commented 3 years ago

Increased default memory buffers to 8192 to accommodate larger drives.