Bug #453


ZPOOL_CONFIG_ASHIFT not set correctly for drives with large sector size

Added by Albert Lee over 13 years ago. Updated about 6 years ago.

cmd - userland programs
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:

seems to indicate that large sector size support isn't reporting the native sector size to ZFS (or maybe just the userland tools) in some (all?) cases, necessitating modifications to zpool(1) to force alignment.

Files (92.2 KB) Jose Mestre, 2014-03-14 01:45 PM

Related issues

Related to illumos gate - Bug #2671: zpool import should not fail if vdev ashift has increasedResolvedGeorge Wilson2012-05-02

Related to illumos gate - Feature #2665: sd.conf should be able to override physical-block-sizeResolvedGeorge Wilson2012-05-01

Actions #1

Updated by Paul M over 12 years ago

  • Difficulty set to Medium
  • Tags set to needs-triage

where did the following lead to?

quoting relevant parts:

I have a fix for bug 453 ready to be checked in. [..] been reviewed on IRC [.. by ..] Triskelios, gisburn, jbk

his description of the fix:

zpool create block-size 4096 dsk1 dsk2

Which will set the block-size for all following drives on the command line.
block-size 0 will reset to hw detect, and setting block-size again is allowed per pool, so that different pools can have different block sizes.

it did get kind of a positive reaction, but there was no final decision/conclusion.

(relevant quote: [I] would first like to make sure we're making the right design decision )

Actions #2

Updated by Paul M over 12 years ago

confusion: i did not touch any bug report properties. not sure why my previous post shows that i changed Tags and Difficulty. (I don't even see those :p)

Actions #3

Updated by Jose Mestre about 10 years ago


I'm using ZFS and I have 4K sectors drives connected on an LSI HBA, and the sd.conf workaround doesn't work with those disks, they continue to be 512 bytes sectors to the OS (
The sd.conf workaround works fine with the HDD connected directly on the motherboard (Intel Z68 chipset).

I usually used a zpool-12 binary file in older versions to create my pools, but since I upgraded my OS, I have an issue: zpool-12: fatal: relocation error: file zpool-12: symbol zpool_set_history_str: referenced symbol not found

So I compiled a new zpool command with a ashift hardcoded value of "12".
I would like to add an option to set ashift, but I don't know how to do that, so it is just to be used with 4K sectors drives

Currently, I'm using OpenIndiana build update to

How to use it:
Unzip the attached file and chmod it to be executable and then run it like zpool command


# ./zpool-12 create tank mirror c15t0d0 c15t1d0

To verify if ashift is 12
# zdb -C tank | grep ashift
#                   ashift: 12

Hope it helps

Actions #4

Updated by Eric Schultz over 9 years ago

I have the same issue as Jose, drives connected through lsi controller showing as 512-byte sectors.

I've tried the zpool-12 program however I get this:

# ./zpool-12 create tank3 raidz c1t0d0 c1t1d0 c1t2d0 c1t3d0
cannot create 'tank3': invalid feature '(null)'

Any Idea's why?

Actions #5

Updated by Jose Mestre over 9 years ago

Hi Eric,

What about your Openindiana release ?
My binary file is only working with (also called b129) , ZFS binaries are not the same as in previous Openindiana releases.

If you are looking for Openindiana b127 or b128 zpool-12 binary, you can find it here:

If that doesn't work, let me know your Opendindana release, and I'll post the appropriate zpool-12 binary.


Also available in: Atom PDF