danbi said:
You are, of course wrong. ZFS is designed to use any sector size the underlying media says it has. And, you need to understand, that ZFS does not deal with only 'spinning disk media' but will all sorts of other storage devices, including network storage. Therefore, there is not any "512 byte sector" code compiled in.
Yes, there is.
The "minimum block size" is a compile-time option, and is currently set to 512 B. This means, that ZFS will use variable-sized blocks for all writes, with the smallest block size being 512 B.
All of these "Advanced Format" drives advertise their block size as "512 B". Thus, ZFS will happily write 0.5, 1, 2, and 4 KB blocks, nicely destroying any manual partition alignment you've done. All it takes is writing out 1 little text file under 4 KB in size, to screw things up.
If the drive manufacturers fix their firmware to report 4 KB sectors, then things may work correctly.
Until then, you need to recompile all the ZFS tools to set the minimum block size to 4 KB.
The truth is, that these drives do work with ZFS. They just don't performs to the user expectations, that are based on published spec. Thing is, this spec is only valid if you align writes to the assumed, but not reported 4k sector size.
Which requires you to recompile all the ZFS tools to set the minimum block size to 4 KB. Without that, any small writes will be done using 0.5, 1, or 2 KB blocks, destroying your nicely aligned partitions.
There is nothing in ZFS to blame about this. Other file systems fail to utilize those drives 'performance' as well.
Never said ZFS was to blame, just that ZFS will not work with these 4 KB drives without either manually recompiling the ZFS tools to set the minimum block size to 4 KB, or manufacturers fixing their firmware to report 4 KB physical and logical sectors.
Or, let me ask it in a different way: everything with these WD drives works as designed.
They don't follow the ATA spec, which lists separate logical sector size and physical sector size parameters that the OS can query. These drives list 512 B for both.