Question: I recently ran badblocks on a large server hard drive to check for possible issues (SMART reported that everything was fine, but I needed to be sure).

The command I used was: badblocks -c 1024 -b 4096 -w -s -o /path/to/myfile.txt /dev/mydriveI used destructive-write mode because the downtime of the drive was important, and we determined that it would be faster to nuke the drive during the bad-blocks check and then re-add it to the RAID it had been a part of later than wait on the non-destructive test.

When it completed, myfile.txt had been created but was empty.

This seems like a very silly question, but: the file being empty indicates that no bad blocks were found, correct? The manpage for badblocks seems to indicate this, but I want to be as sure as I can be.

Answer: Yes, if the file is empty, badblocks didn’t find any broken blocks. Did you also run the extended SMART selftest?

💠

🔵 Best-selling data storage everyone's buying.

Fast, reliable, and on sale now. Thousands pick these weekly — don't miss Amazon's lowest storage prices.

Top 10 Bestsellers
🏆 4.7★+ Reviews
📦 Prime Shipping
👉 See today's best-selling hard drives, USB flash drives & SSDs on Amazon.com HDD · USB Flash Drives · SSD · External Drives
🛒
✅ Updated hourly — Amazon real-time ranking 🔥 Limited stock deals 🔗 Affiliate
⭐ Click to see complete best-selling list ⭐