zpool should handle 4k drives
The current zpool should have a way to override sector size in case of "advanced format" drives with internal 4k sector, and reporting 512B sector size to the OS. Since most large drives lie about their sector size like this, we need a way to override it with zpool upon creation. A patch was submitted some time back, but for some reasons, it was rejected. Discussions about this exist at http://wiki.openindiana.org/pages/viewpage.action?pageId=4883847
Updated by Richard Yao about 10 years ago
ZFSOnLinux supports setting ashift at pool creation. The following command will work:
zpool create -o ashift=12 -o cachefile= -O normalization=formD -O canmount=noauto -m /rpool -R /mnt/gentoo rpool /dev/sda
If ashift is not specified, the default behavior is used. It might be useful for upstream to adopt this. Here is a reference to installation instructions for Linux that show that command being used:
Updated by Roy Sigurd Karlsbakk about 10 years ago
This update should go in regardless of what autosensing exists, since if you're setting up a pool on 512B sectors and this pool is likely to get 4k sector size drives later, ashift should be forced up even though the drives have 512B sectors.