- 论坛徽章:
- 0
|
修复linux损坏的文件系统
今天早上公司的内部服务器有一台文件系统换掉了,登陆进去后发现/data分区所有文件变成只读的,一段时间后系统自动重启了。
悲剧发生了,启动的时候出现如下错误:- 01.Press enter for maintenance
- 02.(or type Control-D to continue):
- 03./dev/sda5 contains a file system with errors, check forced.
- 04./dev/sda5: Inodes that were part of a corrupted orphan linked list found.
- 05.
- 06./dev/sda5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
- 07.(i.e., without -a or -p options)
- 08.
- 09.Press enter for maintenance
- 10.(or type Control-D to continue):
- 复制代码在(or type Control-D to continue)
复制代码 后输入root用户的密码
1.首先在修复filesystem时要umount掉运行该命令:
01.#umount /data
复制代码
2.运行- 01.#fsck.ext3 -p /dev/sda3
复制代码 复制代码
修复不成功
3.运行- 01.#fsck.ext3 -y /dev/sda5
复制代码 复制代码
或复制代码
过程中一直yes就可以了
修复成功! |
|