小编Jon*_*ley的帖子

如何在破坏性模式下对坏块进行单次传递?

我正在使用坏块同时 (a) 检查磁盘是否有错误,以及 (b) 对磁盘上的任何数据进行破坏性擦除;使用以下命令:

badblocks -wsp 0 /dev/sdb1

我通过了这个选项-p 0,希望这只会导致一次通过,但我得到了多次通过:

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: 19.01% done, 7:43:47 elapsed. (0/0/0 errors)
Run Code Online (Sandbox Code Playgroud)

通过阅读联机帮助页,我可以看到该-w选项本身包括四遍:

-w 使用写模式测试。使用此选项,badblocks 通过在设备的每个块上写入一些模式(0xaa、0x55、0xff、0x00)、读取每个块并比较内容来扫描坏块。此选项不能与 -n 选项结合使用,因为它们是互斥的。

这对我的需求来说太过分了。有没有办法实现单一的破坏性传球?

linux hard-drive bad-sectors

4
推荐指数
1
解决办法
8583
查看次数

标签 统计

bad-sectors ×1

hard-drive ×1

linux ×1