修复CentOS文件系统

 

CentOS经常出现一些像

Cannot mkdir: Structure needs cleaning

的文件系统错误,而且在正常模式下无法umount来进行修复。很多时候只能在rescue模式下进行。

 

  • 先进入centos的rescue模式

键入e,然后在倒数第二行加入

systemd.unit=rescue.target

然后Ctrl+X进去命令行模式

 

  • 修复文件系统

在/boot下运行

xfs_repair -d  /dev/mapper/cl-root

完成后reboot.

 

posted @ 2017-10-20 13:03  ericnie  阅读(3212)  评论(0编辑  收藏  举报