Date: Sat, 13 Mar 2010 22:24:49 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Miroslav Lachman <000.fbsd@quip.cz> Cc: freebsd-current@freebsd.org Subject: Re: A tool for remapping bad sectors in CURRENT? Message-ID: <86eijn3of2.fsf@ds4.des.no> In-Reply-To: <4B9BF957.4060507@quip.cz> (Miroslav Lachman's message of "Sat, 13 Mar 2010 21:45:11 %2B0100") References: <20100308102918.GA5485@localhost> <4B94DDC8.5080008@quip.cz> <20100308115052.GA31896@office.redwerk.com> <4B94FBA6.5090107@quip.cz> <861vfq995i.fsf@ds4.des.no> <4B9BF957.4060507@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Miroslav Lachman <000.fbsd@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 --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86eijn3of2.fsf>