bsdinstall guided partitioning should 4k-align swap and ufs
partitions
Mark Martinec
Mark.Martinec+freebsd at ijs.si
Mon Dec 5 16:43:17 UTC 2011
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
More information about the freebsd-current
mailing list