ola,

ive recently made a start on better supporting disks in openbsd that present
512 byte logical sectors, but actually use 4096 byte physical sectors on the
platter. the best examples of these are the western digital "advanced format"
SATA drives which have been mention on misc@ before. it was noted at the time
that performance on these disks is much better if you can align your
partitions and filesystems onto the 4k boundaries the physical sectors are
on.

the process of being able to better use 4k physical sectors relies on changes
at many layers of the kernel and in the partitioning and filesystem utilities,
beginning with fetching the details off the hardware, and then propagating it
up the storage stack into the disk and block layers, and then out to userland
to make smart decisions with.

the tragedy of this situation is that i cannot find a disk that implements the
parts of ATA specification that describe logical vs physical sector layouts. i
have bought a couple of the WD advanced format drives, and some other people
have bought me different models in the same family of drives, but none of them
include the bits of the spec required to be useful. i dont know of any other
manufacturers claiming to have disks with different sized logical and physical
sectors, so this work has kinda stalled before it really began.

however, as users we should know that the hardware has the 4k sector
"feature", so we should be able to configure machines to take advantage of it.
i have talked to a few people who have tried to use these drives, but have had
trouble setting them up as bootable disks.

if you want to install onto one of these disks and line the / filesystem up on
a 4k boundary, the trick is to modify the start of the openbsd partition (not
slice) in fdisk (not disklabel) so it begins on sector 64, not sector 63.
lining the rest of the partitions up in disklabel is then an easy exercise
left up to the reader. if you line the partition up properly then things will
Just Work(tm).

there are western digital drives that do implement the correct parts of the
ATA spec, i just dont know how to get hold of them. it appears that drives
with models beginning with WD??EARS-00Z have the spec implemented, but drives
with -00Y or before in their model name dont. all the local sellers only have
-00Y revisions of these drives :(

dlg

Reply via email to