Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2008 19:15:47 +0200
From:      "=?ISO-8859-1?Q?Marius_N=FCnnerich?=" <marius@nuenneri.ch>
To:        "Marcel Moolenaar" <xcllnt@mac.com>
Cc:        Ivan Voras <ivoras@freebsd.org>, freebsd-geom@freebsd.org
Subject:   Re: [PATCH] Teach geom_label to recognise gpt labels and uuids
Message-ID:  <b649e5e0810231015m3f48856fh489a43b32a796734@mail.gmail.com>
In-Reply-To: <29F8C203-E193-4D4A-91E3-2545AA0594BD@mac.com>
References:  <b649e5e0810230412u5a80ddb8p3955d5b052fa1896@mail.gmail.com> <gdpnsf$8s2$1@ger.gmane.org> <FCAC7DF6-16C6-4960-9FA7-4E9EB4112D18@mac.com> <b649e5e0810230921t36e0df5bj4408fb7466b3dcdb@mail.gmail.com> <29F8C203-E193-4D4A-91E3-2545AA0594BD@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 23, 2008 at 6:35 PM, Marcel Moolenaar <xcllnt@mac.com> wrote:
>
> On Oct 23, 2008, at 9:21 AM, Marius N=FCnnerich wrote:
>
>>> 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.
>
> The consistency seems forced, based on a limitation then.
> It's quite valuable to have a label for your disk.

Sure, but a clean /dev namespace too :)
The problem can still get you, for example if you copy a disc
blockwise, you have the same hdr_uuid. I think the user should be sane
enough to use different gpt labels/names or live with the
consequences.

>>> ese 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`.
>
> gpart show has 3 forms:
> o  standard partition type (gpart show
>        ns1% gpart show ad5
>        =3D>       34 976773101 ad5 GPT (500.1GB)
>                 34 976773101 1 freebsd-zfs (500.1GB)
>
> o  raw (scheme-specific) type (gpart show -r)
>        ns1% gpart show -r ad5
>        =3D>       34  976773101  ad5  GPT  (500.1GB)
>                 34  976773101    1  516e7cba-6ecf-11d6-8ff8-00022d09712b
>  (500.1GB)
>
> o  partition label (gpart show -l)
>        ns1% gpart show -l ad5
>        =3D>       34  976773101  ad5  GPT  (500.1GB)
>                 34  976773101    1  (null)  (500.1GB)
>
>
> There's currently no form for showing a partition ID.
>
>> 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?
>
> It can be added if deemed useful, but it only really
> applies to GPT...

I would find it useful, especially for scripting, now I would have to
look at the dmesg output from geom_label with my patch :)
But it's of course your decision. I don't know how much trouble it
would be to add.

 - Marius

P.S. I updated the patch again



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b649e5e0810231015m3f48856fh489a43b32a796734>