Bug #453

ZPOOL_CONFIG_ASHIFT not set correctly for drives with large sector size

Added by Albert Lee over 7 years ago. Updated 4 months ago.

Status:FeedbackStart date:2010-12-06
Priority:NormalDue date:
Assignee:-% Done:


Category:cmd - userland programs
Target version:-
Difficulty:Medium Tags:needs-triage


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.

zpool-12.zip (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 increased Resolved 2012-05-02
Related to illumos gate - Feature #2665: sd.conf should be able to override physical-block-size Resolved 2012-05-01


#1 Updated by Paul M over 6 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 )

#2 Updated by Paul M over 6 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)

#3 Updated by Jose Mestre over 4 years ago

  • Status changed from New to Feedback
  • File zpool-12.zip added


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 (http://wiki.illumos.org/display/illumos/ZFS+and+Advanced+Format+disks).
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:
ld.so.1: 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

#4 Updated by Eric Schultz over 3 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?

#5 Updated by Jose Mestre over 3 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