From owner-freebsd-hackers@FreeBSD.ORG Tue May 2 06:32:25 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 016D216A407 for ; Tue, 2 May 2006 06:32:25 +0000 (UTC) (envelope-from stijn@win.tue.nl) Received: from mailhost.tue.nl (mailhost.tue.nl [131.155.2.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F2C043D48 for ; Tue, 2 May 2006 06:32:24 +0000 (GMT) (envelope-from stijn@win.tue.nl) Received: from localhost (localhost [127.0.0.1]) by mailhost.tue.nl (Postfix) with ESMTP id 01AF75C0C0; Tue, 2 May 2006 08:32:23 +0200 (CEST) Received: from mailhost.tue.nl ([131.155.2.19]) by localhost (pastinakel.tue.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19915-07; Tue, 2 May 2006 08:32:22 +0200 (CEST) Received: from umta.win.tue.nl (umta.win.tue.nl [131.155.71.100]) by mailhost.tue.nl (Postfix) with ESMTP id B12475C092; Tue, 2 May 2006 08:32:22 +0200 (CEST) Received: from pcwin691.win.tue.nl (dyn223 [131.155.70.29]) by umta.win.tue.nl (Postfix) with ESMTP id ABB2F31401C; Tue, 2 May 2006 08:32:22 +0200 (CEST) Received: by pcwin691.win.tue.nl (Postfix, from userid 1000) id 969253C411; Tue, 2 May 2006 08:31:01 +0200 (CEST) Date: Tue, 2 May 2006 08:31:01 +0200 From: Stijn Hoop To: "Rick C. Petty" Message-ID: <20060502063101.GA32191@localhost.localdomain> References: <20060501202711.GA476@megan.kiwi-computer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060501202711.GA476@megan.kiwi-computer.com> X-Bright-Idea: Let's abolish HTML mail! User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: amavisd-new at tue.nl X-Mailman-Approved-At: Tue, 02 May 2006 11:43:59 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: gvinum start volume returns EBUSY X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2006 06:32:26 -0000 On Mon, May 01, 2006 at 03:27:11PM -0500, Rick C. Petty wrote: > When rebuilding a degraded plex with "gvinum start volume" on a mounted > filesystem, gvinum reports "errno: 16" (EBUSY). In the CVS: > > src/sys/geom/vinum/geom_vinum_init.c, lines 363-364 (of MAIN, added > 2005-Oct-09, rev 1.10.2.1) has the check: > > if (gv_is_open(p->geom)) > return (EBUSY); > > Why is this the case? The log for that change suggests this is to prevent > sync operations from starting when they are already in progress, but that > really refers to lines 366-367: > > if (p->flags & GV_PLEX_SYNCING) > return (EINPROGRESS); > > It seems to me that lines 363-364 should be deleted. If you have a > degraded volume but need to keep it mounted (such as /usr or /home, etc.), > I can't see any reason why you should be forced to unmount the volume > before rebuilding (if the volume is RAID5). Maybe this restriction is > useful for non-RAID5 configurations, but gv_rebuild_plex is only called > in the context of GV_PLEX_RAID5 on degraded plexes. > > Maybe I'm misunderstanding something. Feel free to enlighten me! :-) While regular vinum allowed rebuilding plexes that were mounted, I have seen resulting filesystem corruption afterwards. Unfortunately I don't know whether Lukas has implemented & tested rebuilding online plexes for gvinum yet. --Stijn