RAID1 synchronisation - howto OR not necessary?

Erik Trulsson ertr1013 at student.uu.se
Fri Nov 23 07:05:24 PST 2007


On Fri, Nov 23, 2007 at 02:45:37PM +0100, Christian Walther wrote:
> Hi,
> 
> On 23/11/2007, Jan Catrysse <j.catrysse at proximedia.be> wrote:
> > > From: Bill Moran [mailto:wmoran at potentialtech.com]
> > > Sent: Thursday, November 22, 2007 9:57 PM
> > > To: Jan Catrysse
> > > Cc: freebsd-questions at freebsd.org
> > > Subject: Re: RAID1 synchronisation - howto OR not necessary?
> > >
> > > "Jan Catrysse" <J.Catrysse at proximedia.be> wrote:
> > > >
> [...]
> > This is what I found in a 3Ware manual:
> > Verification can provide early warning of a disk drive problem or failure.
> [...]
> Yes, it deals with drives failing silently. It's possible that data on
> a disk can get corrupted. You don't see the error until you read the
> block the next time. AFAIK the data contained in the bad block is
> delivered to the CPU/RAM and can cause some damage there.
> The problem I see with this setup is that you can't know which block
> is the one that is okay. You need some additional feature like a
> checksum for each block to check which one is correct. This isn't
> supported by all file systems, so you can only see that there is a
> difference between two blocks which sould normally be identical.

The disks themselves handle the checksumming to detect bad blocks.
With modern disks it is *very* rare that a block on the disk goes bad
without the disk being able to report it it as such.  

This means that if you have a functioning RAID1 setup and one of the
disks report a bad block, then the controller can simply read the
corresponding block from the other disk, and rewrite it to the disk
with the bad block.  If a disk has problems writing a block it will
transparently re-map the block to another.


The problems can occur when one disk in a RAID-array has failed and you
try to rebuild it from the other disk(s). If you then encounter a bad block
on that disk you have a problem since you don't have a good copy of that
block.

This is what verification (which, btw, is not the same as synchronization)
tries to prevent by reading every block on each disk on a regular basis. 
Then the RAID controller can recover the data on any bad blocks from the
other disk(s) in the array.


> 
> I doubt that cheep RAID-Controllers have this capability, so you have
> to stick to some software solution. Does FreeBSD take care about
> something like this, I mean for software RAIDs?

The cheap RAID-controller do almost all the RAID-operations in software
anyway so it does indeed have to be a software solution anyway.

I don't think FreeBSD's software RAID implementations have any support
for disk verification - at least I couldn't find anything when doing
a quick read through the man-pages.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list