修复 ext4 文件系统时出错

修复 ext4 文件系统时出错

我刚刚尝试从实时 CD 启动并使用检查了我的文件系统fsckfsck.ext4没有报告/修复任何错误(即说文件系统是干净的),但是当我在系统内部时,它告诉我其他一些事情:

[alexus@XXXXXXXX Desktop]$ sudo fsck.ext4 -n /dev/mapper/vg_wcmisdlin02a-lv_root 
[sudo] password for alexus: 
e2fsck 1.41.12 (17-May-2010)
Warning!  /dev/mapper/vg_wcmisdlin02a-lv_root is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/mapper/vg_wcmisdlin02a-lv_root contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 3014659 has zero dtime.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 3014660 was part of the orphaned inode list.  IGNORED.
Inode 3014661 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:  -(6391833--6391836)
Fix? no

Free blocks count wrong for group #195 (32313, counted=32309).
Fix? no

Free blocks count wrong (51472641, counted=51472559).
Fix? no

Inode bitmap differences:  -(3014659--3014661)
Fix? no

Free inodes count wrong for group #432 (8138, counted=8139).
Fix? no

Free inodes count wrong (14479710, counted=14479581).
Fix? no


/dev/mapper/vg_wcmisdlin02a-lv_root: ********** WARNING: Filesystem still has errors **********

/dev/mapper/vg_wcmisdlin02a-lv_root: 233122/14712832 files (0.2% non-contiguous), 7346943/58819584 blocks
[alexus@XXXXXX Desktop]$ 

请指教。

答案1

我假设您正在针对以读/写方式安装的设备运行此操作。

不要这样做。您将收到错误。将其重新挂载为只读。如果它是一个关键的系统文件系统,如 /(这似乎是),则启动到单用户模式并将其挂载为只读。您可能正在对该设备进行写入,但尚未完全刷新到块设备。

root@backup ~:
# mount /dev/JBOD/test /mnt
root@backup ~:
# dd if=/dev/zero of=/mnt/bigfile bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 1.41783 s, 1.5 GB/s
root@backup ~:
# fsck.ext4 -fn /dev/JBOD/test
e2fsck 1.41.12 (17-May-2010)
Warning!  /dev/JBOD/test is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free inodes count wrong (327669, counted=327668).
Fix? no


/dev/JBOD/test: ********** WARNING: Filesystem still has errors **********

/dev/JBOD/test: 11/327680 files (0.0% non-contiguous), 55902/1310720 blocks
root@backup~:
# mount -o remount,ro /mnt
root@backup ~:
# fsck.ext4 -fn /dev/JBOD/test
e2fsck 1.41.12 (17-May-2010)
Warning!  /dev/JBOD/test is mounted.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/JBOD/test: 12/327680 files (0.0% non-contiguous), 580191/1310720 blocks

您的文件系统可能很干净。

相关内容