Last active
July 20, 2026 10:59
-
-
Save mdPlusPlus/30ebddea8d6167b27ef2d07c75e5ebc9 to your computer and use it in GitHub Desktop.
How to check new hard drives with badblocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| badblocks -b 4096 -p 0 -s -t 0 -v -w DEVICE [LAST_BLOCK] [FIRST_BLOCK] | |
| -b block_size (4096 only works up to 16TiB drives, consider using 8192 for up to 32TiB, or 16384 for up to 64TiB. Default is 1024) | |
| -c Number of blocks which are tested at a time (Default is 64, consider increasing to speed up the process, 64*4096B=256KiB) | |
| -p num_passes | |
| -s Show the progress of the scan | |
| -t test_pattern | |
| -v Verbose mode | |
| -w Use write-mode test |
Author
Author
A more modern equivalent would look like this:
badblocks -b 16384 -c 512 -p 0 -s -t 0 -v -w DEVICE [LAST_BLOCK] [FIRST_BLOCK]
It writes/reads 512 blocks of 16KiB (so 8MiB) at a time on drives with a capacity of up to 64TiB).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shows output similar to this:
Checking blocks 0 to 1953512447When cancelled with ctrl+c:
Interrupted at block 284489984To continue:
badblocks -b 4096 -p 0 -s -t 0 -v -w DEVICE 1953512447 284489983