Bug 155023

Summary: Bad propose size in disklabel during install
Product: Base System Reporter: Fabrice Bruel <fabrice.bruel>
Component: amd64Assignee: Mark Linimon <linimon>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Fabrice Bruel 2011-02-25 10:20:09 UTC
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

Fix: 

No really fix, all space on partition is not use
Comment 1 Scot Hetzel 2011-02-25 14:39:14 UTC
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
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2011-02-26 09:14:09 UTC
State Changed
From-To: open->closed

A better way to lay out the disk was suggested. 


Comment 3 Mark Linimon freebsd_committer freebsd_triage 2011-02-26 09:14:09 UTC
Responsible Changed
From-To: freebsd-amd64->linimon