LMLPHP后院

磁盘检测,第一次检测到坏存储块技术

maybe yes 发表于 2024-05-13 11:07

总是提示格式化失败,结果还能读取以前的内容,也就是随便删除格式化数据到还在,感觉是文件系统那款的存储变成只读了。

手机,手机搞不定。Windows 11 也搞不定,直接读取不了。换成 Linux rasp 来检测下,直接检测出来了坏块。依然是 badblocks 读写检测。待会我看看内容擦除了没有。

pi@raspberrypi:~ $ time sudo badblocks -sw -v /dev/sda > badsectors.txt
Checking for bad blocks in read-write mode
From block 0 to 31457279
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: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 31457280 bad blocks found. (0/0/31457280 errors)

real    231m33.768s
user    2m27.480s
sys     8m19.305s

检测出了 3000 多万个坏块,这个质量是有多差啊,用时四个小时了。32G的存储。

vi 直接卡死了,260 兆的错误日志。

pi@raspberrypi:~ $ vim badsectors.txt 
pi@raspberrypi:~ $ du -sh badsectors.txt 
260M	badsectors.txt
pi@raspberrypi:~ $ head badsectors.txt 
64
65
66
67
68
69
70
71
72
73
pi@raspberrypi:~ $ tail badsectors.txt 
31457334
31457335
31457336
31457337
31457338
31457339
31457340
31457341
31457342
31457343
pi@raspberrypi:~ $ wc -l badsectors.txt 
31457280 badsectors.txt

日志输出格式就是标记了坏块的位置,一个坏点一行记录。

最后用手机和电脑测试,发现这个坏存储变成了只读盘,写入了新数据会丢失,删除里面的老数据也还在。

2024-07-27 14:36:01 1722062161 0.005333