From owner-freebsd-geom@FreeBSD.ORG Thu Jun 23 18:05:13 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 AEFCD106566B for ; Thu, 23 Jun 2011 18:05:13 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 03B398FC08 for ; Thu, 23 Jun 2011 18:05:12 +0000 (UTC) Received: by fxm11 with SMTP id 11so2135626fxm.13 for ; Thu, 23 Jun 2011 11:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=q14NWe7tTPtP34yyirdoTdpFpmWR+eUBg8IkmHwdcLI=; b=s/UsRoMD9DuthkXCTig6S++uEhR5bMEmudi2dkgj0q+qqdTEvly1hn+eyWcDDBJIoo MpIl21fbrxlcG8wEOXcZKWpjfEBkizkN8kjmyhWYJXzbTnwAfyJgtG2nDw51bismjOUE Xeh79g50ZVOjOURhvCzfcylpJT0rWCVZiSrCE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=bgCGeg14iFXBJQ53I1tZCFQ/Uy1+t0biKzc6XROB4/lxh/CZrLok2JSlkLbxbD0W66 Ye/XXm6lb9RGSV4IeajuXRnTce3uBslmuKP2OVfJOQfDdps4NB4yIT1ogK2sLoM7oKIU Xfgi26MeTLkTR77Ny5oFAdVMGVtg0ByrOQ3zw= Received: by 10.223.37.153 with SMTP id x25mr3042583fad.117.1308852311579; Thu, 23 Jun 2011 11:05:11 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id h1sm1139401fag.11.2011.06.23.11.05.09 (version=SSLv3 cipher=OTHER); Thu, 23 Jun 2011 11:05:10 -0700 (PDT) Sender: Alexander Motin Message-ID: <4E038051.3020809@FreeBSD.org> Date: Thu, 23 Jun 2011 21:05:05 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110616 Thunderbird/3.1.10 MIME-Version: 1.0 To: Gavin Atkinson References: <1308851620.3853.34.camel@buffy.york.ac.uk> In-Reply-To: <1308851620.3853.34.camel@buffy.york.ac.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-geom@FreeBSD.org Subject: Re: 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:05:13 -0000 Hi. On 23.06.2011 20:53, Gavin Atkinson wrote: > 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 > =================================================================== > --- 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 = 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? In general case nothing prevents from using graid on partitions (instead of gmirror/gstripe/...) if BIOS support is not needed. I think this check at least should be moved to specific metadata modules in case if we later add support for abstract gxxx metadata formats. > 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... Aggressive tasting for each metadata format was actually the reason why I haven't added it. If we load all GEOM modules, then some floppy tasting will take ages. -- Alexander Motin