Use badblocks to check larger hard drives (8TB+)

Alvaro Martinez Muñoz ✅
4 min readApr 8, 2024

Checking newly purchased hard drives can be a smart move, especially before adding them to a pool. While this does not guarantee there won’t be any issues, it might help catch some before they could potentially cause for a headache day.

I recently purchased two additional drives in preparation for doubling my current storage capacity and by having the hardware necessary to migrate over to another machine without causing much downtime or other fun stuff, and they unfortunately arrived somewhat poorly packaged, so I had an extra reason to run them through their paces first. Fortunately they seem fine, largely thanks to Western Digital’s own packaging I suppose.

Anyway, I digress.

If you’ve tried running badblocks before on a larger drive and ran into an error message saying something along the lines of "Value too large for defined data type", this quick guide is for you.

Technically speaking badblocks was apparently never made for larger drives, though there does not seem to be a clear alternative, which is a bit unfortunate. Fortunately it seems pretty easy to fix the above error though, and that’s to simply specify the block size manually.

Be sure to have badblocks installed on your system before proceeding. For Ubuntu and Arch/Manjaro you’ll want to install…

--

--

Alvaro Martinez Muñoz ✅

Hi!. I´m Alvaro and i´ll share my Personal projects hobbies like Home Assistant and Linux HomeLabs. I hope like my Posts and support me with little beer 🍻