Re: A tool for remapping bad sectors in CURRENT?

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Sat, 13 Mar 2010 22:24:49 +0100
Miroslav Lachman <000.fbsd_at_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 - des_at_des.no
Received on Sat Mar 13 2010 - 20:24:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:01 UTC