[CentOS] question on software raid

Mon Apr 4 09:17:49 UTC 2011
Jeremy Sanders <jeremy at jeremysanders.net>

Scott Silva wrote:

> Could it be that the bad sectors so far have been in unused areas? Once a
> drive runs out of sectors to map corrections to, I would really think
> about replacing it.

This advice is so often repeated by people on lists. This is a pretty normal 
function of modern hard drives. The drive needs to reallocate the bad 
sectors. It does not mean that the drive is failing unless there have been a 
large number of sectors requiring reallocation or it keeps happening often.

Have a look at this to fix them for normal drives without raid:
http://smartmontools.sourceforge.net/badblockhowto.html

Linux raid will rewrite the block if it is in the raided part of the disk. 
You can force a scrub doing this (md0 is the raid device).
 echo check > /sys/block/md0/md/sync_action
Check /proc/mdstat and dmesg for status.

You should be doing this weekly to identify bad blocks, so check your 
crontab.

Jeremy