LMLPHP后院

badblocks 执行耗时技术

maybe yes 发表于 2022-11-21 12:10

这也太耗时了吧?

pi@raspberrypi:~/bak $ sudo badblocks -sw -v /dev/sda > badsectors.txt
Checking for bad blocks in read-write mode
From block 0 to 3907018583
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing:  15.19% done, 45:33:10 elapsed. (0/0/0 errors)

看看 arch 官方文档

Read-write test (warning: destructive)
This test is primarily for testing new drives and is a read-write test. As the pattern is written to every accessible block, the device effectively gets wiped. The default is an extensive test with four passes using four different patterns: 0xaa (10101010), 0x55 (01010101), 0xff (11111111) and 0x00 (00000000). For some devices this will take a couple of days to complete.

# badblocks -wsv /dev/device
Checking for bad blocks in read-write mode
From block 0 to 488386583
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: 22.93% done, 4:09:55 elapsed. (0/0/0 errors)
[...]
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 0 bad blocks found. (0/0/0 errors)

A couple of days 慢慢等吧?

2024-03-29 19:30:11 1711711811 0.023718