ユーザ用ツール

サイト用ツール


01_linux:12_ツール:16_xfs_repair

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
01_linux:12_ツール:16_xfs_repair [2018/06/07 09:01] matsui01_linux:12_ツール:16_xfs_repair [2019/02/15 08:22] (現在) matsui
行 1: 行 1:
 +====== 16 xfs_repair ======
 +
 +CentOS7からファイルシステムがxfsになった。
 +
 +今度はファイルシステム壊れた時に、xfs_repairを行う必要がありそう。
 +
 +===== チェックのみ =====
 +
 +  # xfs_repair  -n /dev/sda
 +
 +
 +===== 通常実行 =====
 +  # xfs_repair  /dev/sda
 +
 +
 +===== 強制実行 =====
 +
 +ログを強制的に消去(ゼロで初期化)する。ログが破損していて修復できない場合に使用
 +破損したファイルは/lost+found/に入る。
 +
 +  # xfs_repair -L /dev/sda
 +
 +
 +===== エラー =====
 +
 +<code>
 +# mount /dev/sda /mnt
 +mount: Structure needs cleaning
 +</code>
 +
 +
 +ログが破損していて再生できない場合-Lオプションで実行するしか無い。
 +-L オプションは、ログを再生できない場合にのみ使用し、このオプションはログ内のすべてのメタデータの更新を破棄し初期化します。
 +その結果不整合が生まれinodeが不明なファイルは、/lost+found/に置かれます。
 +
 +<code>
 +# xfs_check /dev/sdb
 +ERROR: The filesystem has valuable metadata changes in a log which needs to
 +be replayed.  Mount the filesystem to replay the log, and unmount it before
 +re-running xfs_check.  If you are unable to mount the filesystem, then use
 +the xfs_repair -L option to destroy the log and attempt a repair.
 +Note that destroying the log may cause corruption -- please attempt a mount
 +of the filesystem before doing this.
 +</code>
 +
 +{{tag>xfs}}