[plug] Bad sectors on IDE disk
James Devenish
devenish at guild.uwa.edu.au
Mon Aug 4 13:49:08 WST 2003
In message <200308041159.14911.derekfountain at yahoo.co.uk>
on Mon, Aug 04, 2003 at 11:59:14AM +0800, Derek Fountain wrote:
> > Four letters: R A I...er... ;)
>
> In a laptop? :o)
LOL. Hence the "...er..." (I should have said "...oops..." ;)
> I checked on how ReiserFS handles bad blocks, and basically it doesn't. There
> are some low level hacks which can be forced which might do the job, but it
> looked really horrible and error prone.
>
> Perhaps that's a better way to phrase my question. Do advanced filesystems
> like XFS or ext3 have tools which allow you to manipulate bad blocks?
I imagine that bad blocks, by definition, can't be manipulated with any
accuracy ;-) I mentioned previously the "bad block inode" which is one
high-level way of excluding bad blocks. AFAIK, you could do `apropos
ext2` or `apropos ext3` and find some utilities that would handle bad
blocks. Additionally, some systems might offer generic (filesystem
independent) tools for doing much the same thing.
However, all of these high-level methods have a drawback. The drawback,
from my view, is that they involve the filesystem.
My understanding is that handling bad blocks in the filesystem is the
"lowest common denominator" (by which I mean that it is available with
basically all combinations of disks, drivers and operating systems but
has the same fundamental drawbacks in all cases). For example, you don't
want backup programmes to try to back up the bad blocks and you don't
want `dd` to try to read the bad blocks when you are copying the
contents of one device to another. Yet a filesystem-based could suffer
from those problems (though the bad block inode sounds like a good
compromise).
It would probably be better if bad blocks were handled by the disk and
its driver or volume manager (i.e. at a lower level than the
filesystem). That way, the problem is invisible for all user-space
intents and purposes (unless you are querying the driver for a list of
bad blocks, of course ;). Assuming that the disk doesn't handle bad
blocks by itself (if it did, I imagine it would have been obvious in the
vendor software), perhaps you could look for Linux driver-related
solutions (and let us know if you find any ;). The other thing is that
if the bad blocks are handled by the filesystem, how does the filesystem
prevent corruption of itself or of the partition tables, etc.
In message <1.5.4.32.20030804043516.006795c8 at pop.ozemail.com.au>
on Mon, Aug 04, 2003 at 12:35:16PM +0800, Arie Hol wrote:
> If the bad sectors are close together (Hopefully), you might be able to
> repartition the drive in such a manner that the bad sectors are located
> 'between' the partitions on unused areas of the drive.
Interesting!
More information about the plug
mailing list