Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2007 15:34:20 +0100
From:      "Jan Catrysse" <J.Catrysse@proximedia.be>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: RAID1 synchronisation - howto OR not necessary?
Message-ID:  <BA04B44B6241D74AAA06D90286DA7EBBBD819D@MAILDC.office.proximedia.be>

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

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

Regards
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA04B44B6241D74AAA06D90286DA7EBBBD819D>