[clue-tech] bad block

Angelo Bertolli angelo at freeshell.org
Tue Nov 15 10:57:57 MST 2005


David L. Anselmi wrote:

> Jason S. Friedman wrote:
> [...]
>
>> could not read block 503854 of relation
>> "zip_code_distance": Input/output error
>
>
> Seems to be a bad disk block, according to Google (I should write a 
> FAQ on those).  Do you have any other error messages 
> (/var/log/messages, syslog, kern.log)?  Usually you'll get several 
> retries and log messages if a block is really bad.  Maybe pg is 
> bypassing the something though.
>
>> I was thinking I would use fsck to investigate, but it
>> warns me about operating on a mounted filesystem, and I
>> read the manpage on umount, but it wasn't clear how to
>> proceed.
>
>
> You unmount the fs and then run fsck (you can run it so it tells you 
> what's wrong without fixing anything to assess the damage).  For a 
> single bad block, fsck may not complain but badblocks will.
>
> Which filesystem is it?  You can't have any files open to umount so 
> you'll have to stop pg and possibly other things.  If it's / it would 
> be easiest to boot from a CD (rescue, Knoppix, ...) and run fsck from 
> there.

I agree.  And if it is an ext2 system, you can use -c with fsck to 
recover bad blocks.

Angelo

_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list