CentOSを回復する方法は? /sysroot マウントに失敗しました

CentOSを回復する方法は? /sysroot マウントに失敗しました

私のコンピュータにcentOS 7をインストールし、過去4〜5ヶ月間使用してきましたが、うまく機能しています。しかし、数日前に停電(異常終了)したため、コンピュータに問題が発生しました。システムを起動すると、最初にこのメッセージが表示されます。

XFS (dm-0): Internal error XFS_WAIT_CORRUPTED at line 1600 of file fs/xfs/libxfs/xfs_alloc.c. Caller xfs_free_extent+0xf9/0x130 [xfs]
XFS (dm-0): Failed to recover EFIs

終了エラーメッセージとともに

...
Mounting /sysroot...
[  ***] A start job is running for /sysroot (3min 59s / 4min 31s)[240.527013] INFO: task mount:406 blocked for more than 120 seconds.
[  240.527056] "echo 0 > /proc/sys/kernel/hung_task_timeout+secs" disables this message."
[FAILED] Failed to mount /sysroot.
See 'systemctl status sysroot.mount' for more details.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Reload Configration from the Real Root.
[  OK  ] Stopped dracut pre-pivot and cleanup hook.
[  OK  ] Stopped target Initrd Default Target.
[  OK  ] Reached target Initrd File System.
[  OK  ] Stopped dracut mount hook.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped System Initialization.
         Starting Emergency Shell...

Genrating "/run/initramfs/rdsosreport.txt"

Entering emergancy mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to usb stick or /boot
after mounting them and attach it to a bug report.

:/#

この問題に対する解決策があるかもしれません。

  1. このエラー(破損したファイル)を修正してください。
  2. オペレーティングシステム全体を再インストール(修復)します。 Windowsで一般的にやっているのと同じです。

問題を解決するために上記の作業を行う方法を案内してください。

注:古いデータを失うことなくOSを再インストールする他の方法があるかどうかを教えてください。

編集:1 live-cdでxfs_repairを実行すると、出力は次のようになります。

sudo xfs_repair -v /dev/dm-0

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Phase 1 - find and verify superblock...
superblock read failed, offset 0, size 524288, ag 0, rval -1

fatal error -- Input/output error

ベストアンサー1

私の場合、次のコマンドが役に立ちました。

sudo xfs_repair -v -L /dev/dm-0

停電後、ノードは起動せず、「Unable to mount /sysroot」エラーが発生し、パニックモードに切り替わります。

マウントとマウント解除に失敗して-Lノードを再起動するのに役立つオプションを実行し続けました。

おすすめ記事