Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Sep 2016 01:46:46 -0700
From: (Perry Hutchison)
Subject:   Re: "gpart add" falsely claiming "No space left on device"
Message-ID:  <>
In-Reply-To: <86wpimm6om.fsf@WorkBox.Home>
References:  <> <> <57cf9b95.Zj/> <> <> <86wpimm6om.fsf@WorkBox.Home>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
"Brandon J. Wandersee" <> wrote:
> Perry Hutchison writes:
> > Warren Block <> wrote:
> >> What does the man page need?
> >
> > For starters, default values for -b, -s, -t, and -i in "gpart add".
> > (I guess -i defaults to "lowest not currently in use", but what about
> > the others?)
> The defaults are exactly what you'd expect them to be. '-b' defaults
> to the start of the disk.

That would explain why my first attempt failed, since that default
is useful only if no partitions are already defined.

Other reasonable defaults would be the start of the first (lowest
addressed), last (highest addressed), or largest free area.  In any
event, the man page ought to say what the default is.

> '-i' defaults to the lowest available integer.

as I suspected

> '-s' defaults to everything available.

"available" on the entire disk (as if no partitions were defined),
the first free block, or the largest free block?  (One hopes, not
the sum of all free blocks :)  Again, the man page should say!

> '-t' default to nothing,
> because it would be senseless to assume the type of a partition;
> gpart(8) will exit with an error if you don't provide it.

... which _could_ be implied by its not being bracketed in the usage
section, if not for the fact that -b and -s (which apparently do
have defaults, even though the man page does not say what they are)
are not bracketed either.

> > List of what-all "attributes" can be set and what they do.

There's no such section in the gpart(8) man page I'm looking at (on
FreeBSD 8.1).

> > Explanation of when one would use -b vs. -p in "gpart bootcode"
> > since they are apparently different ways of specifying where the
> > bootcode comes from (but then your example uses both?)
> '-b' and '-p' specify different values. '-b' specifies what is written;
> '-p' specifies how and where. How they're used depends on your partition
> scheme and motherboard. See "BOOTSTRAPPING."

There's no BOOTSTRAPPING section in this gpart(8) man page, either.

> > Description of how to show the current state of the provider vs what
> > it would look like if pending changes were committed.
> I don't know if this is possible. I believe it's assumed that the
> user/administrator has---or at least *should* have---a good idea
> of what state the disk is in before they start messing with the
> existing (presumably good) partition table.

Seems to me it kind of defeats the purpose of "pending" changes, if
I can't say "show me what would change if I committed this set" --
the same general idea as doing
  :w !diff % -
in vi before saving the file.

> > 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.

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?

Want to link to this message? Use this URL: <>