centos服务器断电文件系统损坏后恢复

centos服务器断电文件系统损坏后恢复,错误信息如下:

文字版: /dev/mapper/VolGroup-lv_root contains a file system with errors ,check forced. /dev/mapper/VolGroup-lv_root: Inodes that were part of a corrupted orphan linked list found. /dev/mapper/VolGroup-lv_root: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY. (i.e., without -a or -p options) [FAILED]

An error occurred during the file system check. Dropping you to a shell: the system will reboot when you leave this shell/ Give root password for maintenance (or type Control-D to continue):

上图的错误信息表名:/dev/mapper/VolGroup-lv_root 分区包含文件系统错误。 Inodes that were part of a corrupted orphan linked list found. 这个应该是具体错误信息。 下一行提示需要手动运行fsck命令。

最后是可以直接输入系统登录密码,如果密码忘记或者其他,可以通过单用户模式进行重置(这里可能由于系统文件损坏,进入不了单用户模式),也可以通过centos启动盘进行重置密码(chroot、passwd两个命令,具体可以参考其他教程)。

有了密码并登录到系统之后,执行fsck命令,即可修复. 建议对多个分区均执行修复命令,可多次执行看具体提示信息。 在修复时,发现多种问题, 比如:mount不能挂载其他盘,提示 mount: warning: /etc/mtab is not writable (e.g. read-only filesystem)、也不能新建文件提示系统文件只读。 都是通过多次执行fsck和重启解决的,并未修改其他内容。

fsck -t ext4 /dev/mapper/VolGroup-lv_root
评论

  • cool 2012天前

    支持大哥!!!!

    回复 举报

    Feng

    登录过307天


    河北地质大学(本科)
    分享&发布