在运行的 xfs 文件系统上使用特定块查找 inode/文件

在运行的 xfs 文件系统上使用特定块查找 inode/文件

我知道 sda1 上的块 12024039 是坏的,我想找出 xfs 文件系统中的哪个文件正在使用该块并因此损坏。我怎么做?当我跑步时

xfs_db -f -c 'blockget -b 12024039' /dev/sda1

我收到错误

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_db.  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.

无论如何,有没有办法在不卸载的情况下执行此操作。这是我一直在使用 ext4 文件系统时所做的事情。

相关内容