From owner-freebsd-questions@FreeBSD.ORG Fri Nov 23 15:05:23 2007 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 E3D0416A418 for ; Fri, 23 Nov 2007 15:05:23 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 54D6113C46B for ; Fri, 23 Nov 2007 15:05:23 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:49459 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Iva5g-0000Ga-7p for freebsd-questions@freebsd.org; Fri, 23 Nov 2007 16:05:12 +0100 Received: (qmail 57403 invoked from network); 23 Nov 2007 16:05:00 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 23 Nov 2007 16:05:00 +0100 Received: (qmail 85540 invoked by uid 1001); 23 Nov 2007 16:05:00 +0100 Date: Fri, 23 Nov 2007 16:05:00 +0100 From: Erik Trulsson To: Christian Walther Message-ID: <20071123150500.GA85473@owl.midgard.homeip.net> Mail-Followup-To: Christian Walther , Jan Catrysse , freebsd-questions@freebsd.org, Bill Moran References: <20071122155640.fa7e0536.wmoran@potentialtech.com> <20071123092146.E0E1B2878E@smtp.proximedia.com> <14989d6e0711230545k4b32c55bs3564647043f9f4ed@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14989d6e0711230545k4b32c55bs3564647043f9f4ed@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1Iva5g-0000Ga-7p. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Iva5g-0000Ga-7p 776033387b18010e8f10b066bada891d Cc: Jan Catrysse , freebsd-questions@freebsd.org, Bill Moran Subject: Re: RAID1 synchronisation - howto OR not necessary? 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: Fri, 23 Nov 2007 15:05:24 -0000 On Fri, Nov 23, 2007 at 02:45:37PM +0100, Christian Walther wrote: > Hi, > > On 23/11/2007, Jan Catrysse wrote: > > > From: Bill Moran [mailto:wmoran@potentialtech.com] > > > Sent: Thursday, November 22, 2007 9:57 PM > > > To: Jan Catrysse > > > Cc: freebsd-questions@freebsd.org > > > Subject: Re: RAID1 synchronisation - howto OR not necessary? > > > > > > "Jan Catrysse" wrote: > > > > > [...] > > This is what I found in a 3Ware manual: > > Verification can provide early warning of a disk drive problem or failure. > [...] > Yes, it deals with drives failing silently. It's possible that data on > a disk can get corrupted. You don't see the error until you read the > block the next time. AFAIK the data contained in the bad block is > delivered to the CPU/RAM and can cause some damage there. > The problem I see with this setup is that you can't know which block > is the one that is okay. You need some additional feature like a > checksum for each block to check which one is correct. This isn't > supported by all file systems, so you can only see that there is a > difference between two blocks which sould normally be identical. The disks themselves handle the checksumming to detect bad blocks. With modern disks it is *very* rare that a block on the disk goes bad without the disk being able to report it it as such. This means that if you have a functioning RAID1 setup and one of the disks report a bad block, then the controller can simply read the corresponding block from the other disk, and rewrite it to the disk with the bad block. If a disk has problems writing a block it will transparently re-map the block to another. The problems can occur when one disk in a RAID-array has failed and you try to rebuild it from the other disk(s). If you then encounter a bad block on that disk you have a problem since you don't have a good copy of that block. This is what verification (which, btw, is not the same as synchronization) tries to prevent by reading every block on each disk on a regular basis. Then the RAID controller can recover the data on any bad blocks from the other disk(s) in the array. > > I doubt that cheep RAID-Controllers have this capability, so you have > to stick to some software solution. Does FreeBSD take care about > something like this, I mean for software RAIDs? The cheap RAID-controller do almost all the RAID-operations in software anyway so it does indeed have to be a software solution anyway. I don't think FreeBSD's software RAID implementations have any support for disk verification - at least I couldn't find anything when doing a quick read through the man-pages. -- Erik Trulsson ertr1013@student.uu.se