On Thu, 8 Apr 2010 17:40:17 +1000 David Gwynne <l...@animata.net> wrote:

> 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
> 

A pair of WD15EARS-00Z5B1 (Rev: 80.00A80, Jan 31 2010) disks were found
here in the Silicon Valley and a patch from dlg@ is being tested to
determine if they will meet his requirements (e.g. specific parts of
the ATA spec are implemented).

You might want to note the suggestion above from dlg@ about installing
the root filesystem (the 'a' partition) at sector 64 rather than the
default sector 63 was not necessary with these very new disks. At
present, the reason why they just work is unknown, but it is possibly
due to commits like:
http://marc.info/?l=openbsd-cvs&m=127044093310329&w=2
http://marc.info/?l=openbsd-cvs&m=127042894602052&w=2
http://marc.info/?l=openbsd-cvs&m=127027862308889&w=2

which have been made without having access to the needed hardware.

-jcr

Reply via email to