From owner-freebsd-geom@FreeBSD.ORG Thu Jun 23 18:11:12 2011 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D0CA1065670 for ; Thu, 23 Jun 2011 18:11:12 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id DC8748FC1C for ; Thu, 23 Jun 2011 18:11:11 +0000 (UTC) Received: from mail-gw12.york.ac.uk ([144.32.129.162]) by gse-mta-27.emailfiltering.com with emfmta (version 4.8.2.32) by TLS id 1045496144 for freebsd-geom@FreeBSD.org; a62f5eb6a2bbd093; Thu, 23 Jun 2011 18:53:42 +0100 Received: from buffy-128.york.ac.uk ([144.32.128.160]:24432 helo=buffy.york.ac.uk) by mail-gw12.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QZo61-0005f1-IC; Thu, 23 Jun 2011 18:53:41 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id p5NHreTA028223; Thu, 23 Jun 2011 18:53:40 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id p5NHreAI028222; Thu, 23 Jun 2011 18:53:40 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: freebsd-geom@FreeBSD.org Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Thu, 23 Jun 2011 18:53:40 +0100 Message-ID: <1308851620.3853.34.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: mav@FreeBSD.org Subject: geom_raid tasting providers that can't be raw disks 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: Thu, 23 Jun 2011 18:11:12 -0000 Hi, While debugging a problem that looks like it was unrelated to geom_raid, I realised that it tastes all providers, including each partition and slice on raid devices it itself created. Given that geom_raid is purely a replacement for ataraid, the only place that the metadata can be valid is on the raw disk itself. Therefore, I'm proposing this patch: Index: sys/geom/raid/g_raid.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/geom/raid/g_raid.c (revision 223446) +++ sys/geom/raid/g_raid.c (working copy) @@ -1993,6 +1993,12 @@ g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name); G_RAID_DEBUG(2, "Tasting provider %s.", pp->name); + if (pp->geom->rank > 1) { + G_RAID_DEBUG(2, "Rank of provider %s is %d, skipping.", + pp->name, pp->geom->rank); + return (NULL); + } + gp =3D g_new_geomf(mp, "mirror:taste"); /* * This orphan function should be never called. This will only allow the probing to happen on providers of rank 1, i.e. the disks themselves. I can't see any reason to probe any other providers. Any objection to this? Also, should geom_raid be in GENERIC? ataraid was, and it's one less "gotcha" for upgrades. Given the lack of ar0 -> raid/r0 aliases, the upgrade is painful enough for users already, putting it in GENERIC may at least help slightly... Thanks, Gavin --=20 Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B)