From owner-freebsd-geom@FreeBSD.ORG Sat Mar 10 17:44:15 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BE6116A409; Sat, 10 Mar 2007 17:44:15 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from merke.itea.ntnu.no (merke.itea.ntnu.no [129.241.7.61]) by mx1.freebsd.org (Postfix) with ESMTP id 09B5A13C441; Sat, 10 Mar 2007 17:44:14 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from localhost (localhost [127.0.0.1]) by merke.itea.ntnu.no (Postfix) with ESMTP id D5FDB13C671; Sat, 10 Mar 2007 18:44:13 +0100 (CET) Received: from gaupe.stud.ntnu.no (gaupe.stud.ntnu.no [129.241.56.184]) by merke.itea.ntnu.no (Postfix) with ESMTP; Sat, 10 Mar 2007 18:44:13 +0100 (CET) Received: by gaupe.stud.ntnu.no (Postfix, from userid 2312) id 9669FD000E; Sat, 10 Mar 2007 18:44:17 +0100 (CET) Date: Sat, 10 Mar 2007 18:44:17 +0100 From: Ulf Lilleengen To: freebsd-geom@freebsd.org Message-ID: <20070310174417.GA28619@stud.ntnu.no> References: <0B1A704D-A455-4741-BC11-A2019BFB4B22@bitheaven.net> <45EF18C3.3070106@freebsd.org> <20070308015812.GA30713@twoflower.idi.ntnu.no> <20070309011635.GA4329@twoflower.idi.ntnu.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070309011635.GA4329@twoflower.idi.ntnu.no> User-Agent: Mutt/1.5.9i X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. Cc: le@FreeBSD.org Subject: Re: Problems simulating gvinum raid5 rebuild X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2007 17:44:15 -0000 On fre, mar 09, 2007 at 02:16:35 +0100, Ulf Lilleengen wrote: > On tor, mar 08, 2007 at 02:58:12am +0100, Ulf Lilleengen wrote: *SNIP* > > Ok, apparently it does bind objects together, but a subdisk that is not > registered with a drive (if the drive is not there) doesn't get tasted. > I'm having problems to find a nice way of adding the subdisk without a drive to > a plex, so that the plex can get into it's correct state. > > One way i tried it in gv_plex_taste was to loop through all subdisks, and find > subdisks that didn't have any drive, _and_ was to be registered with this plex. > Then i registered it with the plex. Something like this: > > LIST_FOREACH(s, &sc->subdisks, sd) { > if s->plex equals plexname > if s has no drive > add the subdisk to this plex Turns out i need to check my own code better :) If add the subdisk to the plex _and_ sets the state to GV_SD_DOWN, the plex will come out degraded after the _plex_taste. I also added an gv_update_plex to update the plex-state after it has come up. I'll just test it a bit first. -- Ulf Lilleengen