From owner-freebsd-hackers@FreeBSD.ORG Mon May 1 20:27:16 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 4076016A407 for ; Mon, 1 May 2006 20:27:16 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 9C3F743D48 for ; Mon, 1 May 2006 20:27:13 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 1357 invoked by uid 2001); 1 May 2006 20:27:12 -0000 Date: Mon, 1 May 2006 15:27:11 -0500 From: "Rick C. Petty" To: freebsd-hackers@freebsd.org Message-ID: <20060501202711.GA476@megan.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: 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: Mon, 01 May 2006 20:27:16 -0000 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! :-) -- Rick C. Petty