Fixing bad blocks (was: Re: Do you need to dismount /usr to dump it?)

Matt Staroscik matt at
Wed Nov 10 17:07:49 PST 2004

At 01:18 PM 11/10/2004, you wrote:
>Your problem seems to be bad blocks in the /usr file system.
>That has nothing to do with dump.  It is a bad spot on the disk.
>fsck will not fix that sort of thing.   If you can figure out
>what files sit on the bad spots, you might be able to delete them
>and then do your dump.   Then you should immediately replace the

I tarred up all of /usr to another filesystem, and I did see an error 
reading a core dump file from squid. I deleted the file and I was then able 
to dump /usr successfully. So that's good news.

However, I apparently need to fix the bad blocks before my RAID will 
rebuild. (I had hoped it would do file-wise copies, but it looks like it 
does lower level reading.)

It is my understanding that an IDE disk will only remap a bad block on a 
write, not just a read. My plan is to load up /usr with enough files to 
fill it up; this should write to the bad blocks and force them to be 
remapped to spares.

I am hopeful that the drive is still healthy, as it only shows 2 SMART 
errors. (Can a core dump cause a bad block or two?)

(Of course, the 3ware twe driver may not allow rebuilds yet on the 7000 
cards, so I may have to try a Knoppix CD too.)

Thanks to all for the input.

Matt Staroscik * KF6IYW * mstar at *
"The combined weight of the horrors I have authored wrought would crush
your carbon hearts into perfect diamonds of terror."
                                         -- Leonid Kasparov Destroyovitch

More information about the freebsd-questions mailing list