Software RAID1 with atacontrol

Pawel Jakub Dawidek pjd at
Mon Sep 27 04:17:36 PDT 2004

On Mon, Sep 27, 2004 at 11:46:03AM +0200, Thomas Pornin wrote:
+> I then tried to simulate a crash by unplugging one disk (with the
+> machine swtiched off). On reboot, the mirror could still be accessed
+> under the name ar0s1d, and atacontrol reported one disk as READY and
+> the other as DOWN. This is fine. I thus made some write accesses on the
+> filesystem, switched off the machine, plugged back the missing disk and
+> rebooted. There, things have gone amiss: the code did not detect that
+> both disks were not synchronized, and happily mounted the filesystem.
+> Bad errors then happend upon reading the disk ("ls" reporting "invalid
+> file descriptor", and so on). I detached one disk (with "atacontrol
+> detach") and attached it again, and then added it with "addspare"; then
+> I rebuilt the array ("atacontrol rebuild") and all was fine again.
+> I then did a second test: I launched a process which wrote on the
+> mirror filesystem ("dd if=/dev/random of=foo") and, which the system
+> was writing on the disk, I hit the reset switch (thus simulating a
+> power failure). Since the two disk writes cannot be guaranteed as
+> simultaneous, the two disks cannot be synchronized. But, upon reboot,
+> the system considered both disks to be READY.
+> Therefore I think that there is something fishy here. Since the same
+> code is used for Promise RAID cards, the support for those card may be
+> "broken" as well (at least unreliable in case of a crash, which is a
+> problem since RAID1 is meant to add reliability in case of a crash).
+> What can I do to help debug this ?

I can only suggest gmirror(8):)

+> As a side note: I get the same read and write throughput on the mirror
+> (about 20 MB/s for reading or writing -- this is what each disk can do
+> alone). I expected a doubled throughput for reading (the disks are on
+> two distinct ATA controllers). Maybe this is a symptom of something
+> wrong elsewhere ?

Random reads? Yes. Sequential read? No, because it isn't seqential from
disk point of view. Compare how data are read from mirror and stripe.

Pawel Jakub Dawidek             
pjd at                 
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-current mailing list