From owner-freebsd-questions@FreeBSD.ORG Sat Jun 28 18:01:28 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6E701065670 for ; Sat, 28 Jun 2008 18:01:27 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 581598FC19 for ; Sat, 28 Jun 2008 18:01:26 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.2/8.14.2) with ESMTP id m5SI1Ka9026585; Sat, 28 Jun 2008 19:01:20 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.6.0 smtp.infracaninophile.co.uk m5SI1Ka9026585 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1214676080; bh=pYHnMTw6AmrzwE Js8NMcVGxirNRGJk5G53RiUrbhMj8=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<48667C69.2060109@infracaninophile.co.uk>|Date:=20Sat,=2 028=20Jun=202008=2019:01:13=20+0100|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.14=20(X11/20080607)|MIME-Version:=201 .0|To:=20prad=20|CC:=20freebsd-questions@f reebsd.org|Subject:=20Re:=20first=20pre-emptive=20raid|References:= 20<20080628005702.2137bb8c@gom.home>=09<200806281302.20814.pieter@d egoeje.nl>=20<20080628095613.38e92182@gom.home>|In-Reply-To:=20<200 80628095613.38e92182@gom.home>|X-Enigmail-Version:=200.95.6|Content -Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0A=20proto col=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D"---------- --enig20A678F7FC6998F6733F7F0D"; b=nUtBuEcd4baa/JM86eszw6kggNxl9Rq0 Ioiv5RGj6LfMuJbC01SK0bJ5l7Wm2arU6+Z8KI8e8ZoBmGPnifg+R4RsKqfyZ78Q/vV pu9FCGADOrEnLgifsLFYXRdQMMdKdzbqAbH1e+xvsYzFPlG2LLlkFdLBj/lXPUyjYEw jrRYw= Message-ID: <48667C69.2060109@infracaninophile.co.uk> Date: Sat, 28 Jun 2008 19:01:13 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.14 (X11/20080607) MIME-Version: 1.0 To: prad References: <20080628005702.2137bb8c@gom.home> <200806281302.20814.pieter@degoeje.nl> <20080628095613.38e92182@gom.home> In-Reply-To: <20080628095613.38e92182@gom.home> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig20A678F7FC6998F6733F7F0D" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Sat, 28 Jun 2008 19:01:20 +0100 (BST) X-Virus-Scanned: ClamAV 0.93.1/7583/Sat Jun 28 16:00:59 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: first pre-emptive raid X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2008 18:01:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig20A678F7FC6998F6733F7F0D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable prad wrote: > why in diagram 20-3 of the handbook do they show 2 parity blocks though= > for disk3 and disk4? why would you ever have more than 1 for any single= > disk? The diagram shows a RAID5 made out of a number of disk stripes spread across 4 physical drives. It's the /stripes/ that are the basic building= block, not the disks in that implementation. What RAID5 does is take N-1 data blocks and adds a Nth parity block as a stripe across the N drives. ie. reading across the diagram the first stripe consists of the top row of 3 data blocks on the first three disks plus the 1 parity block= on the top row on the 4th disk. The next stripe (the 2nd row down) arrang= es=20 it as data data parity data, and so forth for the succeeding stripes. The parity blocks are staggered across the drives to even out the traffic= =20 levels on each spindle. As the diagram shows, it's not always possible to= =20 have an exactly equal balance of parity and data blocks per drive. The diagram is simplistic though -- in a real system the stripe size would be= something like N*128k -- which means that there would be millions of stri= pes on typical GB sized disks, so the differences between drives are entirely= =20 neglible. You have to have at least three disks to make a RAID5, and while=20 theoretically you can have as many disks as you want, there's a practical= limit somewhere around 12-13 drives [Remember, you have to calculate the XOR of all the data blocks in the stripe on any IO operation, and with so= =20 many drives, that rapidly becomes onerous.] The sweet spot seems to be around 7 drives. There is a variant not supported by vinum called RAID6 -- this is simply RAID5 with the parity block doubled up as a backup. It's relatively new and available under FreeBSD only by using hardware cards (Areca, 3ware et= c.) All this does is allow the file system to survive loss of any *two* disks= --=20 something that is more likely to occur than you might think, particularly= as the number of disks per RAID goes up. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig20A678F7FC6998F6733F7F0D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkhmfG8ACgkQ8Mjk52CukIx9WwCcDTcEGJg36OYFd73bY5QD2hzf Vs0Anib/FI/bSZUG+LNRoNGs9Y2uXtoJ =RyEz -----END PGP SIGNATURE----- --------------enig20A678F7FC6998F6733F7F0D--