[XFSのUUID変更] xfs_admin -U generate <ストレージデバイス>にて行う。

【RHEL】コピーしたディスクを自分自身にマウントする手順

https://tech-mmmm.blogspot.com/2020/09/rhel.html

XFSのUUID変更は、xfs_admin -U generate <ストレージデバイス>にて行う。

上記コマンドを実行した際に、以下エラーで失敗する場合がある。

# xfs_admin -U generate /dev/mapper/rhel1-root
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_admin. 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.

いろいろメッセージが書いてあるが、記載されている通り、xfs_repair -Lを使うことで対処する。問題なく修復できたら、再度xfs_adminコマンドにてUUID変更を実施すればよい。

コメント