So... can somebody with enough knowledge write some docs / script how
to find the affected file based on LBA read error from messages /
ZFS will tell you straight away, but I guess if you used ZFS, you
wouldn't be asking :)
For FFS, you can unmount the file system (boot from a CD or memory stick
or whatever if that file system is / or /usr), run fsdb on the failing
disk, use findblk to look up the inode number for the file that contains
the bad sector. Note that you have to convert the LBA to an offset
relative to the start of the partition.
Unfortunately, you can't easily go from inode to file name; you have to
mount the file system and use something like find -inum.