Re: A tool for remapping bad sectors in CURRENT?

From: Miroslav Lachman <000.fbsd_at_quip.cz>
Date: Sat, 13 Mar 2010 21:45:11 +0100
Dag-Erling Smørgrav wrote:
> Miroslav Lachman<000.fbsd_at_quip.cz>  writes:
>> Yes, rewriting by dd or any other way works for reallocating or
>> clearing pending sectors counter, but in server environment
>
> In a server environment, you'd be a fool not to have some sort of
> redundancy set up.

I am using gmirror on low-end servers, so rewriting some sectors on one 
disk drive is useless and in this case I prefer resync of the whole 
gmirror (but it is log run - about 10 hours on busy server)

>> 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.
>
> How is that different from *not* rewriting the sector?  If there's a bad
> sector somewhere in your data, your database is still going to crash.

It is not about "different", it is about "I need to know the affected 
file" to know what actions should be taken.
If it is some logfile, I can delete it and then rewrite the sector. If 
it is some "normal" unchanged file, I can restore it from backup, if it 
is database file, I must take some special action. For example, stop DB 
engine, try to repair/fix the DB file, dump & restore etc.
So the first step is to find "what file is affected", then take some 
action AND rewrite the sector by dd to reallocate the sector. (or 
replace the drive)

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?

Miroslav Lachman
Received on Sat Mar 13 2010 - 19:45:15 UTC

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