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

SMART: "Errors!", Badblocks: "All good!" Paradox? Deception? Inception?

Oct 22, 2019
A drive in a non-essential pool was notifying me of SMART errors. Possibly because I have weekly tasks of "short" SMART selftests.

I removed this drive, replaced it with a new drive, and all is well. However, I decided to play around with this drive and ran a non-destructive read-write badblocks pass on it, like so:

badblocks -nsv -b 512 -c 65535 -o errors.log /dev/sdc

It passed without a single error. No read errors, no write errors, no corruption errors.

However, upon running an extended (long) SMART selftest, it returns an error with a specific LBA.

smartctl -t long /dev/sdc

How is that possible?

I thought a long SMART selftest simply tries to read every single sector of the drive. If badblocks can read, write, re-write, and confirm on every sector without issue, why would a SMART selftest fail? I even ran badblocks again, out of curiosity, and it passed without errors again.

Is one to be trusted more than the other? After all, I noticed that SMART errors were filling up on the drive, which is what alluded me to replace the drive now rather than wait.

* I ran these commands on a separate Linux box, so the naming convention might differ slightly than on FreeNAS/FreeBSD.