misc/161720: bsdinstall: partition editor does not put partitions on even 4K boundaries

Warren Block wblock at wonkity.com
Sun Oct 16 18:00:29 UTC 2011


>Number:         161720
>Category:       misc
>Synopsis:       bsdinstall: partition editor does not put partitions on even 4K boundaries
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 16 18:00:28 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Warren Block
>Release:        9.0-BETA3
>Organization:
>Environment:
FreeBSD machine3.example.com 9.0-BETA3 FreeBSD 9.0-BETA3 #0: Sat Sep 24 21:31:28 UTC 2011     root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Partitions created by the Auto option of bsdinstall's partition editor do not start on even 4K boundaries.  This will seriously compromise performance on drives with 4K-byte blocks.

gpart show ada0
=>      34  25694141  ada0  GPT  (12G)
        34       128     1  freebsd-boot  (64k)
       162  23068544     2  freebsd-ufs  (11G)
  23068706   1284096     3  freebsd-swap  (627M)
  24352802   1341373        - free -  (655M)

Partition 2 starts at block 162.  Instead, it should start at 1M as with
gpart add -t freebsd-ufs -b 1M -s 11G ada0

Note: at present, FreeBSD boot code fails when freebsd-boot partitions are larger than 512K, so making the freebsd-boot partition 1M is not the simple fix it appears to be.

Reported by je33 in http://forums.freebsd.org/showthread.php?t=27044
>How-To-Repeat:
Install FreeBSD 9.0-BETA3 with bsdinstall and Auto partitioning.
>Fix:
FreeBSD partition types other than freebsd-boot should start at the next even multiple of 1M for good performance on Advanced Format (4K block) drives without harming performance of 512 byte drives.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list