このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
01_linux:12_ツール:16_xfs_repair [2018/06/07 09:01] – matsui | 01_linux:12_ツール:16_xfs_repair [2019/02/15 08:22] (現在) – matsui | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== 16 xfs_repair ====== | ||
+ | |||
+ | CentOS7からファイルシステムがxfsになった。 | ||
+ | |||
+ | 今度はファイルシステム壊れた時に、xfs_repairを行う必要がありそう。 | ||
+ | |||
+ | ===== チェックのみ ===== | ||
+ | |||
+ | # xfs_repair | ||
+ | |||
+ | |||
+ | ===== 通常実行 ===== | ||
+ | # xfs_repair | ||
+ | |||
+ | |||
+ | ===== 強制実行 ===== | ||
+ | |||
+ | ログを強制的に消去(ゼロで初期化)する。ログが破損していて修復できない場合に使用 | ||
+ | 破損したファイルは/ | ||
+ | |||
+ | # xfs_repair -L /dev/sda | ||
+ | |||
+ | |||
+ | ===== エラー ===== | ||
+ | |||
+ | < | ||
+ | # mount /dev/sda /mnt | ||
+ | mount: Structure needs cleaning | ||
+ | </ | ||
+ | |||
+ | |||
+ | ログが破損していて再生できない場合-Lオプションで実行するしか無い。 | ||
+ | -L オプションは、ログを再生できない場合にのみ使用し、このオプションはログ内のすべてのメタデータの更新を破棄し初期化します。 | ||
+ | その結果不整合が生まれinodeが不明なファイルは、/ | ||
+ | |||
+ | < | ||
+ | # xfs_check /dev/sdb | ||
+ | ERROR: The filesystem has valuable metadata changes in a log which needs to | ||
+ | be replayed. | ||
+ | re-running xfs_check. | ||
+ | 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. | ||
+ | </ | ||
+ | |||
+ | {{tag> | ||