From owner-freebsd-questions@freebsd.org Fri Sep 9 09:14:53 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F31DBD131E for ; Fri, 9 Sep 2016 09:14:53 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 529F6B64 for ; Fri, 9 Sep 2016 09:14:53 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id u899Em6K014195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 9 Sep 2016 02:14:49 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id u899Em5G014194; Fri, 9 Sep 2016 02:14:48 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA02093; Fri, 9 Sep 16 01:46:36 PDT Date: Fri, 09 Sep 2016 01:46:46 -0700 From: perryh@pluto.rain.com (Perry Hutchison) To: brandon.wandersee@gmail.com Cc: wblock@wonkity.com, freebsd-questions@freebsd.org Subject: Re: "gpart add" falsely claiming "No space left on device" Message-Id: <57d276f6.CwaoGNki0kQYiZns%perryh@pluto.rain.com> References: <57ce6e64.EITkODjuwy6pZ4L+%perryh@pluto.rain.com> <57cf9b95.Zj/JGHeshaKL6Zr5%perryh@pluto.rain.com> <57d0f29b.3QNvCze7LJDzs0SU%perryh@pluto.rain.com> <86wpimm6om.fsf@WorkBox.Home> In-Reply-To: <86wpimm6om.fsf@WorkBox.Home> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2016 09:14:53 -0000 "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. > > See "ATTRIBUTES." 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?