Miroslav Lachman <000.f...@quip.cz> writes:
> So... can somebody with enough knowledge write some docs / script how
> to find the affected file based on LBA read error from messages /
> SMART log?

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.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to