From nobody@FreeBSD.org  Fri Feb 25 10:16:04 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B007E1065693
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Feb 2011 10:16:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F94E8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Feb 2011 10:16:04 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1PAG4mR022220
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 Feb 2011 10:16:04 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1PAG30g022219;
	Fri, 25 Feb 2011 10:16:04 GMT
	(envelope-from nobody)
Message-Id: <201102251016.p1PAG30g022219@red.freebsd.org>
Date: Fri, 25 Feb 2011 10:16:04 GMT
From: Fabrice <fabrice.bruel@orange-ftgroup.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Bad propose size in disklabel during install
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155023
>Category:       amd64
>Synopsis:       Bad propose size in disklabel during install
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linimon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 25 10:20:09 UTC 2011
>Closed-Date:    Sat Feb 26 09:15:34 UTC 2011
>Last-Modified:  Sat Feb 26 09:15:34 UTC 2011
>Originator:     Fabrice
>Release:        8.2
>Organization:
Orange Business Service
>Environment:
NA : problem during install
>Description:
I'm try to install FreeBSD 8.2 amd64 on a ESXi 4.1. I create a virtualdisk
of 20Go and so I boot on the 8.2 iso 

During install, in disklabel,the size af the disk before any action :
Disk: da0 Partion name: da0s1 Free: 41929587 blocks (20473MB)

I choose first "A auto defaults" and so disklabel create :
da0s1a    /         1024MB UFS2   Y
da0s1b    swap      4061MB swap
da0s1d    /var      6126MB UFS2+S Y
da0s1e    /tmp      1024MB UFS2+S Y
da0s1f    /usr      8237MB UFS2+S Y

To be able to compile the world, I want change the size of / and /tmp.

So I delete /tmp / and /usr
Disklabel say :
Disk: da0 Partion name: da0s1 Free: 21065651 blocks (10285MB)
So I create manualy / with size = 2G and /tm with size = 2G

At this time I can read :
Disk: da0 Partion name: da0s1 Free: 12677043 blocks (6189MB)

da0s1b    swap      4061MB swap
da0s1d    /var      6126MB UFS2+S Y
da0s1a    /         2048MB UFS2   Y
da0s1e    /tmp      2048MB UFS2+S Y

I do "Create" and disklabel show in the box "value required" 12677043.
I select OK, FS mount point /usr and the following error message appeared :

"Unable to create the partition. Too big ?"

To create the /usr  partition, the bigger value I can use for /usr is
5100M and so I can see :

Disk: da0 Partion name: da0s1 Free: 2232243 blocks (1089MB)

da0s1b    swap      4061MB swap
da0s1d    /var      6126MB UFS2+S Y
da0s1a    /         2048MB UFS2   Y
da0s1e    /tmp      2048MB UFS2+S Y
da0s1f    /usr      5100MB UFS2+S Y


>How-To-Repeat:

>Fix:
No really fix, all space on partition is not use 

>Release-Note:
>Audit-Trail:

From: Scot Hetzel <swhetzel@gmail.com>
To: Fabrice <fabrice.bruel@orange-ftgroup.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: amd64/155023: Bad propose size in disklabel during install
Date: Fri, 25 Feb 2011 08:39:14 -0600

 What happened is that the disklabel editor had pre-allocated chunks
 for each partition:
 
 old /           0-1G      1G
 swap         1G-5G     4G
 /var            5G-11G   6G
 old /tmp   11G-12G    1G
 old /usr     12G-20G   8G
 
 
 The problem is that when you recreated your new / partition it used
 2GB from the old /tmp (1G) + old /usr (8G) partitions (which is the
 largest continuous space available), which left only 7G available for
 you to partition between your new 2G /tmp and 5G /usr partitions.
 
 
                  0-1G      1G <- space available
 swap         1G-5G     4G
 /var            5G-11G   6G
 new /       11G-13G   2G
 new /tmp 13G-15G    2G
 new /usr  15G-20G    5G
 
 To fix this, you need to delete all the partitions and start over.
 
 Scot
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Feb 26 09:14:09 UTC 2011 
State-Changed-Why:  
A better way to lay out the disk was suggested. 


Responsible-Changed-From-To: freebsd-amd64->linimon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Feb 26 09:14:09 UTC 2011 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=155023 
>Unformatted:
