From owner-p4-projects@FreeBSD.ORG Fri Jul 20 13:05:46 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1999E16A469; Fri, 20 Jul 2007 13:05:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA5BE16A41F for ; Fri, 20 Jul 2007 13:05:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 823B313C491 for ; Fri, 20 Jul 2007 13:05:43 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A562D6.dip.t-dialin.net [84.165.98.214]) by redbull.bpaserver.net (Postfix) with ESMTP id 93ADD2E0D9; Fri, 20 Jul 2007 15:05:36 +0200 (CEST) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 9B7835B5B7F; Fri, 20 Jul 2007 15:03:24 +0200 (CEST) Date: Fri, 20 Jul 2007 15:07:16 +0200 From: Alexander Leidinger To: Ulf Lilleengen Message-ID: <20070720150716.77d2636a@deskjail> In-Reply-To: <20070720123524.GA71360@twoflower.idi.ntnu.no> References: <200707172109.l6HL9PMJ078780@repoman.freebsd.org> <46A03390.3030602@freebsd.org> <20070720123524.GA71360@twoflower.idi.ntnu.no> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.13; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.9, required 8, BAYES_00 -15.00, DKIM_POLICY_SIGNSOME 0.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: perforce@freebsd.org, Eric Anderson Subject: Re: PERFORCE change 123662 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2007 13:05:46 -0000 Quoting Ulf Lilleengen (Fri, 20 Jul 2007 14:35:24 +0200): [growing RAID-5] > Well, what I do is to attach/create the new subdisk as usual, but since it's a > RAID-5 array that I know is operational, I give the subdisk a flag, and sets the > plex in a resize state. Then, In the raid-5 code, I modify gv_raid5_offset > (which basically computes offsets within a subdisk based on the number of > subdisks and stripesize). However, what I do, is that instead of taking all > subdisks in the calculation, I only take those who does not have the GROW flag > (when reading), and I take all subdisks into calculation when it's a write. > > This means, that if a create a gv_grow_plex function that reads (stripesize x > sdcount) bytes (from the subdisks that do not have the GROW flag), and writes > that data to the plex (including all subdisks). This way, i sort of overwrite > the old data, but the data is spread out over the new subdisks. I'm sorry if > this might seem a bit complex, but just ask more questions if you didn't > understand. Do you use the additional drive(s) only to write checksums to them, or do you write real data to it? If the later, how do you make sure you read the right data in case you read data again, which was just written there a moment before (how do you know to read from all subdisks and not only from a subset in this case)? Bye, Alexander. -- TONY RANDALL! Is YOUR life a PATIO of FUN?? http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137