这篇文章提供了有关如何恢复损坏的根文件系统的分步说明。
启动服务器失败,根文件系统损坏,如下所示。
Checking all file systems. [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00 /dev/VolGroup00/LogVol00 contains a file system with errors, check forced. /dev/VolGroup00/LogVol00: Inodes that were part of a corrupted orphan linked list found. /dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck bananaALLY. (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 the shell. Give root password for maintenance
该错误表明根文件系统已损坏。
要恢复损坏的根文件系统,请按照以下步骤操作:
- 从与系统相同主要版本的 DVD 引导系统。
系统从 ISO 镜像成功启动后,将出现启动屏幕。
键入:不带引号的“linux rescue”,然后在提示符下按回车键。
boot: linux rescue
当提示输入语言和键盘时,提供系统的相关信息。
当系统提示启用网络设备时,选择:否
选择:当提示允许救援环境在/mnt/sysimage目录下挂载Oracle Linux安装时跳过。
如果不使用 LVM,请在包含文件系统的设备上执行 fsck:
# e2fsck -f /dev/sda1 e2fsck 1.41.12.14 (17-May-2014) [...]
- 如果使用 LVM,请在运行 fsck 之前激活卷。
# pvscan PV /dev/sda1 VG VolGroup00 lvm2 [96.00 MB / 0 free] Total: 1 [3.34 GB] / in use: 1 [3.34 GB] / in no VG: 0 [0 ]
# vgscan Reading all physical volumes. This may take a while... Found volume group "VolGroup00" using metadata type lvm2
# lvscan INACTIVE '/dev/VolGroup00/LogVol00' [3.34 GB] inherit
# lvdisplay --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID 335qTi-Ossg-32O5-yQC7-xNON-egdI-frj4et LV Write Access read/write LV Status NOT available LV Size 3.34 GB Current LE 107 Allocation inherit Read ahead sectors 0
# vgchange -ay 1 logical volume(s) in volume group "VolGroup00" now active
# e2fsck -f -y /dev/VolGroup00/LogVol00 e2fsck 1.41.12.14 (17-May-2014) [...]
- 退出救援模式,取出 DVD 或者启动盘媒体,然后正常启动系统。
日期:2020-09-17 00:13:46 来源:oir作者:oir