GEOM_PART: a quick update on logical partitions

João Barros joao.barros at
Mon Feb 2 13:34:03 PST 2009

On Mon, Feb 2, 2009 at 7:27 PM, Dimitry Andric <dimitry at> wrote:
> On 2009-02-02 20:16, Marcel Moolenaar wrote:
>> In case people are wondering: I'm working on proper support for
>> logical partitions. This should also allow us to create and
>> modify them. Of course when you add or remove a partition, the
>> index changes and consequently the device name. I still need
>> to find a good solution for that. Currently I'm thinking that
>> we should create the device special file that contains the
>> sector offset (which is the one constant) and create compatibility

This approach assumes you'll only add/remove partitions, not move
and/or resize them.
Let's go big and assume all possibilities.

>> symlinks. For example:
>>       /dev/da0s2.00000000
>>       /dev/da0s2.0834F7A0
>>       /dev/da0s5 -> /dev/da0s2.00000000
>>       /dev/da0s6 -> /dev/da0s2.0834F7A0
>> The idea is that the logical name (i.e. the symlink) change when
>> you add or remove a partition, but that all references (i.e. mount
>> information) are against the fixed name.
> This sector-based ID is a creative approach. :)  In Linux, they just
> assign a GUID to each unique partition (or actually, filesystem), and
> you can use that to mount it.  It doesn't matter anymore whether you
> shift partitions around then...

...shift partitions or controllers. Being controller agnostic is the
way to go. Being able to duplicate my OSX partition from the internal
sata to an external usb or firewire disk and booting from it on my mac
without any modifications whatsoever to the system: priceless. This
would be a step closer in that direction.
I'd go UUID :)

> OTOH, this gives ugly fstabs like:

I can live with an ugly fstab, but can't live with an unbootable system ;)

> UUID=cf3de368-9729-4399-b612-2b62f4e98930  /  ext3  relatime,errors=remount-ro  0  1
> Also, you need a place to put the GUID, and there may not be room for
> this in the filesystem and/or partition.

Joao Barros

More information about the freebsd-current mailing list