Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Dec 2011 17:43:13 +0100
From:      Mark Martinec <Mark.Martinec+freebsd@ijs.si>
To:        freebsd-current@freebsd.org
Subject:   bsdinstall guided partitioning should 4k-align swap and ufs partitions
Message-ID:  <201112051743.13483.Mark.Martinec%2Bfreebsd@ijs.si>

next in thread | raw e-mail | index | archive | help
Using a guided partitioning install of 9.0-RC2 on a 64GB (virtual) disk
(from a 9.0-RC2 ISO image) results in the following GPT partitioning:

# gpart show /dev/ada0
=>       34  134217661  ada0  GPT  (64G)
         34        128     1  freebsd-boot  (64k)
        162  125828992     2  freebsd-ufs  (60G)
  125829154    6709248     3  freebsd-swap  (3.2G)
  132538402    1679293        - free -  (820M)

This is most unfortunate for installations using 4kB sectored disks
or SSD disks, especially as the guided partitioning tool is
"recommended for beginners" - who may not be aware of performance
issues of using unaligned partitions on 4k sectored disk, or may
not be aware they are using such disks, or may not dare to venture
into manual partitioning.

Neither the freebsd-ufs partition, nor the freebsd-swap partition
are aligned on a 4k boundary - quite unnecessarily so.

At the expense of making the boot partition larger by 2 kB
or shrinking it by 2 kB, the rest would align just fine.
I see no ill effect for 512 B disks, but obvious benefit
for 4k disks.


Btw (unrelated), tried the same with a 2 TB (virtual) disk, the
guided partitioning suggested 64k boot, 2TB ufs, and 4GB swap,
but then fails with "No free space left on device".
Didn't investigate, looks like a bug.

  Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112051743.13483.Mark.Martinec%2Bfreebsd>