Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Mar 2010 14:29:10 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        freebsd-current@freebsd.org
Subject:   Re: A tool for remapping bad sectors in CURRENT?
Message-ID:  <4B94FBA6.5090107@quip.cz>
In-Reply-To: <20100308115052.GA31896@office.redwerk.com>
References:  <20100308102918.GA5485@localhost> <4B94DDC8.5080008@quip.cz> <20100308115052.GA31896@office.redwerk.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Eugene Dzhurinsky wrote:
> On Mon, Mar 08, 2010 at 12:21:44PM +0100, Miroslav Lachman wrote:
>> Eugeny N Dzhurinsky wrote:
>> We have this problem from time to time on bunch of machines. As we are
>> using gmirror, the easiest way is to force re-synchronization (rewrite)
>> of the whole drive. The problem is when there are Pending unreadable
>> sectors on both drives - it ends up with read error and some file(s) are
>> corrupted, but there is no easy way (on FreeBSD) to find what file.
>>
>> I tried it in the past with fsdb / findblk, but it does not work as I
>> expect or I do not fully understand the needed calculations with slices
>> + partitions offsets / LBAs and right meaning of the term "block". It
>> seems there are several meaning in different contexts.
>>
>> It would be nice if somebody with enough FS / GEOM knowledge can write
>> some HowTo or shell script to do the calculations and operations to find
>> file containing bad sector(s) and put it in FAQ, Handbook, or Wiki.
>
>
> Miroslav, thank you for the suggestion - but I am not using gmirror, that HDD
> is the one on my laptop. However suggestions about using dd to write something
> into bad block to force IDE controller do it's service stuff about remapping
> seems did the trick. And I was able to not calculate LBA but use it as block
> offset, which seemed to be correct way :)

Yes, rewriting by dd or any other way works for reallocating or clearing 
pending sectors counter, but in server environment I need to know the 
affected file, as it can be for example database file and then it is a 
big problem! Rewriting the sector inside InnoDB ib_data file can cause 
DB crash, data loss etc.

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B94FBA6.5090107>