[PATCH] Teach geom_label to recognise gpt labels and uuids

Marcel Moolenaar xcllnt at mac.com
Thu Oct 23 15:58:15 UTC 2008


On Oct 23, 2008, at 4:41 AM, Ivan Voras wrote:

> Marius Nünnerich 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}
or even:
	/dev/gpt/${hdr_uuid}-${ent_uuid}
	/dev/gpt/${hdr_uuid}-${ent_name}

FYI,

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-geom mailing list