> > > Some days ago, one disk on a 3ware RAID1 reported an unreadable sector.
> > > I found my way to the bad block HOWTO - uh-oh, this was Reiser3 on LVM1.
> > > As it turns out, the sector was in the swap partition, so I just did
> > > this:
> > >
> > > # swapoff -a
> > > # dd if=/dev/zero of=/dev/$swap
> > > # mkswap /dev/$swap
> > > # swapon -a
> > >
> > > Now all the SMART tests pass.
> > Cool. I might add this to the HOWTO.
> > > Question: how is it that the RAID1 controller didn't notice the bad
> > > sector? I would have expected it to fail the drive out of the array.
> > Good question.
> > I expect that the controller would only notice the bad sector if it tried
> > to READ it and the READ failed. So perhaps this particular sector of swap
> > space was never read.
> > Does this make sense to you?
> Sure it does; i.e. the controller doesn't interpret SMART commands or
> otherwise take action in response to them.
> But I just checked /root/.bash_history... I *did* do this right after
> the swapoff but before clearing the swap partition:
> # dd if=/dev/$swap of=/dev/null
> IIRC, dd stopped with an error before it finished. Shouldn't the
> controller have failed the drive out right there?
Yes, you are right. I don't understand why the dd failed. The RAID1
array *should* have been able to read the sector in question from the good
drive, even though the bad drive couldn't read it. Is there something in
the 3ware configuration that says to automatically repair bad sectors by
using data from the mirror disk? Perhaps this 'feature' is disabled.
In any case, I agree that if you did a READ as with dd above, then the
controller should have identified the bad sector, gotten the needed data
from the good disk, and then rewritten the bad sector on the bad disk,
forcing sector reallocation there.
At least naively, it appears that something is wrong with the RAID1
operation/configuration. It may be that the system is configured to
require manual intervention rather than carrying out repairs
automatically, whenever and inconsistency or problem is found.
Please let me know what you learn. I am thinking about buying a large
number of 3ware controllers, and want to understand them better.