From owner-freebsd-current@FreeBSD.ORG Mon Jun 2 20:32:21 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FB0E861; Mon, 2 Jun 2014 20:32:21 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 130D621AD; Mon, 2 Jun 2014 20:32:20 +0000 (UTC) Received: from zeppelin.tachypleus.net (airbears2-136-152-142-17.AirBears2.Berkeley.EDU [136.152.142.17]) (authenticated bits=0) by d.mail.sonic.net (8.14.4/8.14.4) with ESMTP id s52KWEJg026752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 2 Jun 2014 13:32:14 -0700 Message-ID: <538CDF4E.8050703@freebsd.org> Date: Mon, 02 Jun 2014 13:32:14 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Pawel Jakub Dawidek , jmg@freebsd.org Subject: Re: diskid documentation References: <20140601134147.GA99583@bewilderbeast.blackhelicopters.org> <538C7B71.20109@freebsd.org> <20140602153651.GB4116@bewilderbeast.blackhelicopters.org> <20140602180108.GX43976@funkthat.com> <20140602202639.GA1668@garage.freebsd.pl> In-Reply-To: <20140602202639.GA1668@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-ID: C;6Oxl+5Tq4xGQE8UoeQW9yA== M;QmOQ+5Tq4xGQE8UoeQW9yA== Cc: geom@freebsd.org, FreeBSD Current , Ryan Stone , "Michael W. Lucas" , Allan Jude X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2014 20:32:21 -0000 On 06/02/14 13:26, Pawel Jakub Dawidek wrote: > On Mon, Jun 02, 2014 at 11:01:08AM -0700, John-Mark Gurney wrote: >> Michael W. Lucas wrote this message on Mon, Jun 02, 2014 at 11:36 -0400: >>> On Mon, Jun 02, 2014 at 10:45:52AM -0400, Ryan Stone wrote: >>>> On Mon, Jun 2, 2014 at 9:26 AM, Allan Jude wrote: >>>>> It also tends to sometimes hide the gpt label provider on me (not sure >>>>> in which cases it does this, but it is annoying) >>>> This happens when something (e.g. zfs) happens to open the diskid >>>> provider instead of the gpt label. For me this ended up being a bit >>>> more than annoying; my swap was mounted in /etc/fstab via a gpt label >>>> so I silently lost my swap when I did an upgrade. >>> Wait-- one type of one label can hide another? >>> >>> I thought a big point of labels was to remove ambiguity... >> Surprisingly, yes... I didn't think about this, but it's true... >> >> A disk will get exported via two different devices, diskid and normal >> da/ada... The tasting will go through and create all the necessary >> sub devices, but the problem is that we now have two different paths, >> and if something opens the diskid path, then the da/ada paths all >> disappear... >> >> This sounds like we need to fix geom to "bind" the two together so >> that when one opens, the other doesn't disappear... The problem is >> that geom views them as two separate disks when in fact they are the >> same... someone who knows geom well should think about how to solve >> this problem, as diskid isn't the first time this has happened, just >> most prevalent w/ ZFS and diskid. > The problem is that GPT labels (or GPT IDs for that matter) should not > be implemented within GLABEL. This is wrong. It should be implemented as > part of GPART, so that GPART would create ada0p1, gpt/label and > gptid/whatever. Opening one of those should not make the others > disappear then. Only opening ada0 for writting would make them disappear. > Indeed. This would also fix some tasting races, allow programmatic retrieval of the label device from gpart, and expand label device support from GPT to all partition schemes supported by gpart (APM, for instance). -Nathan