From owner-freebsd-current@FreeBSD.ORG Mon Nov 21 17:52:37 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66993106564A; Mon, 21 Nov 2011 17:52:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 252288FC0C; Mon, 21 Nov 2011 17:52:37 +0000 (UTC) Received: from bigwig.baldwin.cx (96.47.65.170.static.nyinternet.net [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 58B7946B3C; Mon, 21 Nov 2011 12:52:36 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0DFEDB978; Mon, 21 Nov 2011 12:52:33 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 21 Nov 2011 12:52:35 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <4EC844DE.7020003@freebsd.org> In-Reply-To: <4EC844DE.7020003@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111211252.35193.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 21 Nov 2011 12:52:33 -0500 (EST) Cc: nevtic@tx.net, Nathan Whitehorn Subject: Re: 9.0-RC2 - bsdinstall miscount of remaining diskspace after partition deletion. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 17:52:37 -0000 On Saturday, November 19, 2011 7:07:58 pm Nathan Whitehorn wrote: > On 11/18/11 17:09, nevtic@tx.net wrote: > > > > If you are performating a manual partion in 9.0-RC2 bsdinstall and you > > delete any created partition except the most recently created one, the > > total remaining space will be miscalculated. Reproducable as shown > > below. > > > > Workaround: if you delete a partition that is not the last partition > > that was created, delete all partitions created after that partition > > before continuing. Order does not seem to be important. > > > > The results are similar with other hard drive sizes, with the i386 or > > amd64 distributions, and with either 9.0-RC2 or 9.0-RC1 (I did not go > > back and check install discs prior to RC1) > > > > Reproducing the miscount: > > > > A 114 GB drive is used for this example: > > > > Select Manual Partitioning > > > > Perform the first Create on the drive and select GPT > > > > Creating the first partition: "Add Partition" "size" shows 114GB > > > > Change size to 4GB, set mountpoint to / and tab to OK > > (agree to the boot partition creation) > > > > Create a second partition: "Add Partition" "size" shows 110GB > > > > Adjust size to 10GB, set mountpoint to /usr and tab to OK > > > > Create a third partition: "Add Partition" "size" shows 100GB > > > > Adjust size to 20GB, set mountpoint to /var, and tab to OK > > > > Create a 4th partition: "size" shows 80GB remaining > > > > Adjust size to 40GB, set mountpoint to /data, and tab to OK. > > > > There is 40 GB remaining on the drive. Now change the size of /var. > > First, delete the currently configured /var partition. > > > > In the Partition Editor, adding up all the lines on the screen shows > > 54GB (plus a 64K boot) as allocated, so there should now be 60GB > > remaining. But the deleted /var space has not been added back into > > the total. > > > > Select Create again: "Add Partition" "size" shows 40GB > > > > Adjust size to 30GB, set mountpoint as /var, tab to OK > > > > A subsequent "Create" will show that 20GB is remaining, rather than > > the actual remaining 30GB. Selecting any size 20GB or larger for > > /home will give you a 20GB partition, and then an additional create > > will show the 10GB. > > This isn't a bug. The partitions are laid out on disk already, and, > because you deleted one in the middle, the largest *contiguous* block of > free space is 20GB, which is what is shown and the maximum it is > possible to create. That's why you can make one 20 GB partition and one > 10 GB partition, but not a single 30 GB one. Except that this is not intuitive. If I'm laying out a disk and haven't committed the changes yet, it should be possible to do things like resize an existing partition, or have the installer realize that if you delete one partition the other partitions that are pending should just "move up" to maximize free space automatically. I ran into this when first trying the new installer last week where you could not modify a pending partition's size which I found non-intuitive. -- John Baldwin