From owner-cvs-all@FreeBSD.ORG Tue Feb 27 09:20:58 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08C8D16A406; Tue, 27 Feb 2007 09:20:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 8955613C4A5; Tue, 27 Feb 2007 09:20:57 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 426762087; Tue, 27 Feb 2007 10:20:53 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on tim.des.no Received: from dwp.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 226AE2085; Tue, 27 Feb 2007 10:20:53 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 1001) id DAA27B874; Tue, 27 Feb 2007 10:20:52 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: Brooks Davis References: <200702091903.l19J3Ik5099479@repoman.freebsd.org> <86k5y6p9t2.fsf@dwp.des.no> <20070226172130.GB21095@lor.one-eyed-alien.net> Date: Tue, 27 Feb 2007 10:20:52 +0100 In-Reply-To: <20070226172130.GB21095@lor.one-eyed-alien.net> (Brooks Davis's message of "Mon, 26 Feb 2007 11:21:30 -0600") Message-ID: <86vehohs7f.fsf@dwp.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/conf GENERIC src/sys/i386/conf GENERIC src/sys/ia64/conf GENERIC src/sys/pc98/conf GENERIC src/sys/powerpc/conf GENERIC src/sys/sparc64/conf GENERIC src/sys/sun4v/conf GENERIC X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 09:20:58 -0000 Brooks Davis writes: > While I agree there are serious problems with glabel and software RAID1 > configurations, I don't think that warrants continuing to hide it from > the rest of us. We should probably add more warnings to the appropriate > manpages and fix the RAID implementations. The problem isn't just with the RAID implementations. It goes deeper than that. First, when geom_label sees multiple identical labels, it ignores all but the first one. The old implementation (geom_vol_ffs) had comments in the source code pointing this out: /* XXX We need to check for namespace conflicts. */ /* XXX How do you handle a mirror set? */ /* XXX We don't validate the volume name. */ g_topology_lock(); /* Alright, we have a label and a volume name, reconfig. */ g_slice_config(gp, 0, G_SLICE_CONFIG_SET, (off_t) 0, pp->mediasize, pp->sectorsize, "vol/%s", fs->fs_volname); g_free(fs); g_topology_unlock(); The new implementation has the same bug / feature, but does not document it: snprintf(name, sizeof(name), "%s/%s", dir, label); LIST_FOREACH(gp, &mp->geom, geom) { pp2 =3D LIST_FIRST(&gp->provider); if (pp2 =3D=3D NULL) continue; if (strcmp(pp2->name, name) =3D=3D 0) { G_LABEL_DEBUG(1, "Label %s(%s) already exists (%s).= ", label, name, pp->name); if (req !=3D NULL) { gctl_error(req, "Provider %s already exists= .", name); } return (NULL); } } In addition, the issue is never logged; the debugging message is normally disabled, and the error message is ignored when req is NULL (req is always NULL when tasting existing labels; it is non-NULL only when creating a new label using 'glabel create') This is exacerbated by the fact that ataraid does not hide the underlying devices when an array is configured, and they are usually tasted before the array, so you are pretty much guaranteed that geom_label attaches to the wrong provider. (this same fact also leads to spurious and confusing error messages from other GEOM classes, such as "corrupt or invalid GPT detected" when tasting the first component of a RAID 0 array that contains a GPT) DES --=20 Dag-Erling Sm=F8rgrav - des@des.no