From owner-freebsd-geom@FreeBSD.ORG Thu Oct 23 16:21:28 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F32F310656AF for ; Thu, 23 Oct 2008 16:21:28 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id D28B78FC2D for ; Thu, 23 Oct 2008 16:21:28 +0000 (UTC) (envelope-from marius@nuenneri.ch) Received: by wf-out-1314.google.com with SMTP id 24so404416wfg.7 for ; Thu, 23 Oct 2008 09:21:28 -0700 (PDT) Received: by 10.114.154.1 with SMTP id b1mr858945wae.4.1224778887414; Thu, 23 Oct 2008 09:21:27 -0700 (PDT) Received: by 10.115.89.3 with HTTP; Thu, 23 Oct 2008 09:21:27 -0700 (PDT) Message-ID: Date: Thu, 23 Oct 2008 18:21:27 +0200 From: "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" To: "Marcel Moolenaar" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: Ivan Voras , freebsd-geom@freebsd.org Subject: Re: [PATCH] Teach geom_label to recognise gpt labels and uuids 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 Oct 2008 16:21:29 -0000 On Thu, Oct 23, 2008 at 5:57 PM, Marcel Moolenaar wrote: > > On Oct 23, 2008, at 4:41 AM, Ivan Voras wrote: > >> Marius N=FCnnerich wrote: >>> >>> Hi all, >>> >>> I wrote the following patch for geom_label: >>> http://nuenneri.ch/freebsd/geom_label.patch >>> >>> What do you think about it? I would love to hear about some tests. >> >> Do you think it's wise to have two separate directories: /dev/gpt and >> /dev/gpt_uuid? I don't think anyone will mistake the UUID from the label >> if it's in the same directory. Also, if I remember correctly how GPT >> works, UUID is always present but the label is optional? > > Yes, the name/label is optional. > > Something to think about: A system can have multiple disks, > and therefore multiple GPT tables. Each table has its own > UUID (hdr_uuid). This is the UUID of the disk itself in a > way. It's probably a good idea to expose that as well: > /dev/gpt/${hdr_uuid}/${ent_uuid} > /dev/gpt/${hdr_uuid}/${ent_name} I tried something like this but decided against it, no other g_label is like this. If ent_name is not unique on the system only the first one is shown, that's consistent with the normal FS labels. > or even: > /dev/gpt/${hdr_uuid}-${ent_uuid} > /dev/gpt/${hdr_uuid}-${ent_name} These are too long filenames imo. For my taste the ent_uuid is unique enough as a filename, but there should probably be a way to show which partition has which ent_uuid with `gpart show`. I know that you try to keep the interface consistent and the other partition types don't have such a field. Anyway, what do you think about that? BTW, do you know about another partition type which could be exposed like t= his? Thanks for your response! Marius