我知道如何检查/修理我的硬盘,但我不知道如何查看硬盘上坏扇区的数量。
看来我的硬盘很快就会死-
发布于 2012-02-14 09:35:45
在Linux中有两种检测坏扇区的方法:可以使用磁盘实用程序(gui),也可以使用坏块命令检查硬盘中的坏扇区:
sudo badblocks -v /dev/{device}这应该可以回答这个问题,但是对于其他对如何标记它们感兴趣的人来说,这可以通过两个简单的命令来完成。
你把坏块加到文件里..。
sudo badblocks /dev/sdb > {/dir/to/filename}然后告诉fsck将这些标记为无法用.
sudo fsck -l {/dir/to/filename} /dev/{device}发布于 2012-10-22 12:46:49
例如,使用fsck.ext3 (e2fsck)并使用-cc选项
-c This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad
blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a
file or directory. If this option is specified twice, then the bad block scan will be done using a non-destructive
read-write test.`fsck -cc /dev/sda1 1
https://askubuntu.com/questions/104063
复制相似问题