Smile 笑容

盒子硬盘被恶劣环境损坏后的修复工作记录(fsck.ext3)

 

Checking root file system... fsck 1.40-WIP (14-Nov-2006)
/dev/hda1 contains a file system with errors, check forced.

inodes that were part of a corrupted orphan linked list found.

/dev/hda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck died with exit status 4 failed(code 4).
An automatic file system check(fsck) of the root filesystem failed.
a manual fsck must be performed, thn the system restarted.
the fsck should be performed in maintenance mode with the root filesystem mounted in read-only mode.
the root filesystem is currently mounted in read-only mode.
a maintenance shell with now be started.
alter performing system maintenance, press CONTROL-D
to terminate the maintenance shell and restart the system.
Give root password for maintenance
(or Type Control-D to continue):

上述内容是启动时候遇到的提示。
而重启动的原因则是 php提示 session文件无法写入。 进入session目录可以 list 但是无法写入。
查看权限都没有问题。
因为 root账号被锁定,所以 sudo  reboot 重启都失效了!提示 log文件无法写入,命令被 aborted
惊讶,知道要出事,忘记备份数据就侥幸认为重启会绣续或恢复。
重启就遭遇上述提示,郁闷,在群里提问: fuee434i 建议进入 rescue 来修复。于是高呼感谢的话语接显示器键盘从pmon 进入 rescue 环境
fsck 了半天都不好用,后来才明白,自己的 硬盘id 是  hda1 不是人家的 wda1 或 wda3 或其他什么,于是把 hda1 hda2 都修复了一下
看到屏幕滚动着很多 FIXED 在考虑 能够人品爆发吗?
最后结束了,记得用 reboot 或其他命令来重启,这样才会把修复结果保存到硬盘上。
造成上述问题的根源分析在于恶劣的工作环境:
盒子被立起来,摔倒一次到两次,突然停电一次到两次,造成了上述情况。
综上所述,想办法别停电,停电了也别摔盒子(虽然我不是主观故意的,但是把盒子立起来放也是我的错)。

 

福珑2E 硬盘数据 损坏的 修复 fsck.ext3 –y /dev/hda1