在CentOS 5上使用fsck修复ext3根文件系统的问题

当我在CentOS 5服务器的已安装根分区上运行只读fsck时,会发现一些错误。 但是,在下次启动时运行强制检查没有find任何!

以下是挂载的只读检查的结果:

# fsck -nCf / fsck 1.39 (29-May-2006) e2fsck 1.39 (29-May-2006) Warning! /dev/sda3 is mounted. Warning: skipping journal recovery because doing a read-only filesystem check. Pass 1: Checking inodes, blocks, and sizes Deleted inode 232259589 has zero dtime. Fix? no Inodes that were part of a corrupted orphan linked list found. Fix? no Inode 232259593 was part of the orphaned inode list. IGNORED. Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Block bitmap differences: -32194676 -(32235995--32235998) -(32236209--32236210) -(32238978--32238981) -(32239590--32239593) -(32239924--32239926) -(32241448--32241457) -(32245306--32245313) -32867401 -(36754088--36754097) +(143647672--143648620) -(143653816--143654764) Fix? no Free blocks count wrong for group #982 (1277, counted=1276). Fix? no Free blocks count wrong for group #983 (810, counted=777). Fix? no Free blocks count wrong for group #984 (19647, counted=19637). Fix? no Free blocks count wrong for group #1003 (28042, counted=28041). Fix? no Free blocks count wrong for group #1121 (11611, counted=11598). Fix? no Free blocks count wrong (227428348, counted=227427933). Fix? no Inode bitmap differences: -232259589 -232259593 Fix? no Free inodes count wrong (243391778, counted=243391739). Fix? no /: ********** WARNING: Filesystem still has errors ********** /: 205534/243597312 files (3.7% non-contiguous), 16161230/243589578 blocks 

我运行强制检查的方式是:

 touch /forcefsck echo -n "-y" > /fsckoptions 

这不会强制fsck在下次启动时运行,“-y”选项应该自动修复所有错误,但在启动期间检查不会find任何错误。 但是,一旦安装了文件系统并且再次运行只读检查,它将find所有相同的错误。

谢谢你的时间,

PRL

挂载的文件系统在磁盘上不一致。 不要检查已安装的文件系统。 直接从马口:“但是,即使这样做是安全的,如果文件系统安装,由e2fsck打印的结果是无效的。 -E2FSCK(8)