badblocks crashes instantly on large drives: how the -b 4096 flag fixes it
The badblocks disk-testing tool fails immediately on drives larger than roughly 4.4 TB because it stores block counts in a 32-bit integer, which overflows when using its default 1 KiB block size. Adding the flag -b 4096 increases the block size to 4 KiB, reducing the block count to fit within the 32-bit limit and extending coverage up to approximately 17.6 TB. The issue is particularly deceptive when badblocks is run in the background via nohup, as the instant failure is logged silently and the drive is never actually tested. Sysadmins at Finnish storage provider Pulsed Media discovered the problem during a batch burn-in of refurbished drives, where a silent failure could mean a faulty disk reaching customers undetected. The recommended fix is to use -b 4096 as a default for all large drives and to verify the process is still running a few seconds after launch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in