RAID1 synchronisation - howto OR not necessary?

Jan Catrysse J.Catrysse at
Mon Dec 3 06:33:19 PST 2007

> -----Original Message-----
> From: Jan Catrysse 
> Sent: Thursday, November 22, 2007 2:18 PM
> To: 'freebsd-questions at'
> Subject: RAID1 synchronisation - howto OR not necessary?
> Dear subscribers,
> I am currently running a production server:
> FreeBSD 6.2 STABLE
> Onboard Intel ICH8R Raid 1 with 2x SATA300 500GB HDD Using 
> ATA for Raid1
> On Windows systems it is an absolute must to do a Raid 
> Synchronisation every once and a while to maintain data consistency.
> I am some what disturbed that that kind of command / tool 
> seems not available on FreeBSD.
> Are there other methods to do the synchronisation?
> 1) Maybe atacontrol detach & atacontrol addspare & atacontrol rebuild?
> 2) Maybe data consistency is always maintained automatically 
> by the driver?
> 3) Maybe I have to panic and urgently make backups?
> Kind regards,
> Jan Catrysse

I have gotten some feedback from the ATA(4) developer and pasted it

Jan Catrysse

Synchronisation should not be needed at all, however if you want to do
it #1 above is the way.

ATA will always return error to the upper layers if one of the writes to
either drive fails, and will then mark the array as degraded, so there
should be no need to do and sync unless you change one of the drives.

If you zero out both drives before creating the RAID1 you can do a
simple  "cmp adX adY" of the two disks in the mirror to verify they are
equal, except for the RAID metadata normally located at the last 63
sectors of the media (depends on meta data format).
Note that you *HAVE* to zero out the disks first before use in that
case, as ATA has no idea which blocks are used and which are not, and in
the case of unused areas you will get differences if the disks wasn't
cleared before use.
ATA only makes certain that data *written* hits both disks and in case
not returns error to the upper layers and marks the array as degraded.

More information about the freebsd-questions mailing list