Linux

Fedora,fsck 在啟動時失敗

  • October 18, 2013

在啟動過程中,我的伺服器遇到問題。這是我的實際配置:

320GB each. Raid1 -> /dev/md127. Working.
/dev/sda
/dev/sdc

1000GB each. Raid1 -> Use to be /dev/md126, now it is /dev/md1. AFAIK, it works properly
/dev/sdb
/dev/sdd

2000GB -> Started to show some bad-functioning symptons. Now is disconnected
/dev/sde

這是我得到的實際錯誤:

fsck.ext4: No such file or directory while trying to open /dev/md126
/dev/md126:
The superblock could not be read or does nor describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


fsck.ext4: No such file or directory while trying to open /dev/sde1
/dev/sde1:
The superblock could not be read or does nor describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

然後,我可以按 CTRL+D 並重新啟動系統,或者輸入 root 密碼並使用此提示符進入 shell ->“(修復文件系統)1:”

使用 /dev/md126 AKA /dev/md1 沒有問題,因為從這個 shell,我可以掛載 /dev/md1 並訪問數據。

使用 /dev/sde1,我不知道為什麼由於磁碟斷開連接而發生錯誤。

兩個設備(md126 和 sde1)都包含在 /etc/fstab 中,但從 shell 看來,所有文件系統似乎都是只讀的,所以我無法修改 fstab 文件。

關於我能做什麼的任何想法?我現在有點迷路了。先感謝您。

編輯: 從“修復文件系統”外殼,我可以複製執行“fsck -A -y”的錯誤消息,因此它遍歷所有 etc/fstab 文件檢查每個條目,但正如我所說,文件系統是“讀取-只有”,所以我不能更改文件。

關於舊的 /etc/md126 AKA /etc/md1 陣列,我可以從外殼完美安裝,如果我在組成陣列的 2 個磁碟上創建一個 fdisk,我會得到:

Disk /dev/sdb: 1000.2 GB, xxxxxxx bytes
255 heads, 63 sectors....
Units= sectors of 1 * 512 = 512 bytes
Sector size (min/optimal) = 4096/4096
**Disk identifier: 0x00000000**

Disk /dev/sdb doesnt contain a valid partition table

[And exactly the same for /dev/sdd]

你需要修復你的/etc/fstab. 雖然它包含告訴作業系統它應該找到並安裝/dev/md126/dev/sde1在啟動時的條目,但作業系統不會高興。

從應急媒體引導並修改條目,或者引導、修復根文件系統、執行mount -o remount,rw /並修改條目。

一旦該fstab條目/dev/md1代替/dev/md126,並且什麼都不說/dev/sde1,您的啟動順序應該不會那麼痛苦。

假設您的 Fedora 系統在引導時使用 GRUB,編輯核心參數以在引導時跳過fsck

  • 在啟動時編輯 GRUB 菜單中的 Fedora 條目,按下e
  • kernel然後通過按下e它來編輯其相應的行
  • 在行尾追加單詞fastboot並按b
  • 通過跳過fsck錯誤的文件系統啟動到 Fedora

現在您可以解決真正的問題,這似乎與磁碟上錯誤的分區表或損壞的文件系統有關。此外,如果有疑問,smartctl請在您的磁碟上執行以對其進行物理診斷。

引用自:https://serverfault.com/questions/546914