How do you use badblocks?

I need to do a destructive (rw) test on a new drive, and a read-only on a drive that fell out of my RAID array. I want to see if it finds problems and how far along it is.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Let /dev/sda be the new drive on which to test destructive-rw and /dev/sdb the old drive where you want non-destructive-r

# badblocks -wsv /dev/sda
# badblocks -sv /dev/sdb

-s gives the process indicator

-v gives verbose output

-w enables destructive read-write

-n would be non-destructive read-write

Read-only testing is the default and doesn’t need special parameters.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments