2

I know that block 12024039 is bad on sda1 and I want to find out what file in the xfs filesystem is using that block and is thus corrupt. How do I do that? When I run

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

I get the error

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.

Is there anyway to do this without unmounting. This is something I do all the time with ext4 filesystems.

2
  • Try -r Open device or filename read-only. This option is required if the filesystem is mounted. Jul 2 '19 at 12:01
  • 1
    Unfortunately "-r" instead of "-f" (or both) does not work either. Same result.
    – raines
    Jul 2 '19 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.