"gpart add" falsely claiming "No space left on device"

Warren Block wblock at wonkity.com
Fri Sep 9 19:20:49 UTC 2016


On Fri, 9 Sep 2016, Perry Hutchison wrote:

>>> List of what-all "attributes" can be set and what they do.
>>
>> See "ATTRIBUTES."
>
> There's no such section in the gpart(8) man page I'm looking at (on
> FreeBSD 8.1).

Support for 8.1 ended over four years ago.  Improvements to man pages 
are not MFCed back to unsupported releases.

>>> I suppose there must be some reason for leaving those
>>> 3.0k and 492k free spaces around gpboot, but it isn't obvious.
>>
>> Partition alignment.
>
> Alignment to 4k makes sense if the physical sector size is 4k (as
> is often the case with newer disk drives) -- but 1M?  Seems a bit
> much, which is why it would be useful for that page to include a
> more detailed explanation.

1M is a useful value for several reasons.  A partition aligned with 1M 
is aligned with all the smaller values.  It also better fits with the 
larger internal block sizes used by SSDs and other flash devices.

Starting the first data partition at 1M is a de facto standard and 
provides a little additional insurance that some rock-stupid 
partitioning tool will see the partition and not destroy it.

At most, aligning to 1M wastes less than one meg of space.  Not one gig, 
one meg.  On UEFI systems, you can even use that small amount of space 
for an EFI partition.

> Getting back to the original inquiry, I'm still mystified as to
> why gpart won't create a partition in the space that it reports
> as being free.  Does anyone have a clue what is going on, or how
> to find out?

It could be an actual bug.  gpart and the man page have been revised 
quite a bit over the last few years.


More information about the freebsd-questions mailing list