解决 "maximal mount count reached" 与硬盘检测
检查 mount 次数
当 mount 硬盘时老是出现
"EXT3-fs warning: maximal mount count reached, running e2fsck is recommended"
是提醒你该用 e2fsck 做档案系统的检查,请依下列步骤处理:
1. 查看目前的 mount 次数及限制
$ tune2fs -l /dev/sdb1 | grep ^M
Mount count: 26
Maximum mount count: 22
2. 取消最大 mount 次数检查
$ tune2fs -c0 -i0 /dev/sdb1 tune2fs 1.39 (29-May-2006) Setting maximal mount count to -1 Setting interval between checks to 0 seconds
3. 查看目前的 mount 次数及限制
$ tune2fs -l /dev/sdb1 | grep ^M
Mount count: 26
Maximum mount count: -1
检查档案系统
1. 取消 mount,并做档案系统检查及自动修复处理
$ umount /dev/sdb1 $ e2fsck -p /dev/sdb1
(PS.执行 e2fsck 时请务必先 umount 硬盘,以免发生不可预期的错误)
2. 如果 e2fsck 有出现其它错误,例如:
/dev/sdb1 contains a file system with errors, check forced.
/dev/sdb1: Inode 81969341 has illegal block(s).
/dev/sdb1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
依指示执行 fsck 修复档案系统错误:
$ fsck /dev/sdb1 fsck 1.39 (29-May-2006) e2fsck 1.39 (29-May-2006) /dev/sdb1 contains a file system with errors, check forced. ...
3. 所有步骤完成,可以 mount 硬盘了
检查磁盘坏轨
前面的 fsck 指令是针对“档案系统”做检查与修复,如要检查硬盘有没有坏轨,则使用 badblocks 指令:
$ badblocks -sv /dev/hdb checking blocks 0 to 1465138584 checking for bad blocks (read-only test): 0/ 1465138584 ... done Pass completed, 10 bad blocks found.
No comments yet.