From owner-freebsd-current@FreeBSD.ORG Mon Sep 27 11:17:36 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E73D16A4CE for ; Mon, 27 Sep 2004 11:17:36 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB9A143D41 for ; Mon, 27 Sep 2004 11:17:35 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 4D3E3ACAFE; Mon, 27 Sep 2004 13:17:34 +0200 (CEST) Date: Mon, 27 Sep 2004 13:17:34 +0200 From: Pawel Jakub Dawidek To: Thomas Pornin Message-ID: <20040927111734.GS9550@darkness.comp.waw.pl> References: <20040927094602.GA17898@gnah.bolet.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N7HXVILz59yg1nI8" Content-Disposition: inline In-Reply-To: <20040927094602.GA17898@gnah.bolet.org> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-current@freebsd.org Subject: Re: Software RAID1 with atacontrol X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 11:17:36 -0000 --N7HXVILz59yg1nI8 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. +>=20 +> I then did a second test: I launched a process which wrote on the +> mirror filesystem ("dd if=3D/dev/random of=3Dfoo") 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. +>=20 +>=20 +> 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. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --N7HXVILz59yg1nI8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBV/bOForvXbEpPzQRAnulAKDwBBoQ7WmA8lzS0SkK2/NWfncKzwCfUGyA 2Vei8cKwHj/CWRwEbj6lPbk= =WEAo -----END PGP SIGNATURE----- --N7HXVILz59yg1nI8--