Bug #2663

zpool should handle 4k drives

Added by Roy Sigurd Karlsbakk over 8 years ago. Updated over 7 years ago.

In Progress
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


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


Updated by Richard Yao over 8 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 over 8 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.


Updated by Bayard Bell over 8 years ago

This is not an OI issue. If you want features that require kernel changes, raise it with the illumos-gate upstream.


Updated by Bayard Bell over 8 years ago

  • Project changed from OpenIndiana Distribution to illumos gate

Updated by Andrew Stormont over 7 years ago

  • Status changed from New to In Progress
  • Assignee set to Andrew Stormont
  • % Done changed from 0 to 50

Also available in: Atom PDF