ZPOOL_CONFIG_ASHIFT not set correctly for drives with large sector size
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.
Updated by Paul M almost 10 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 )
Updated by Jose Mestre over 7 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 (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 0.151.1.8 update to 0.151.1.9
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
Updated by Eric Schultz almost 7 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?
Updated by Jose Mestre almost 7 years ago
What about your Openindiana release ?
My binary file is only working with 0.151.1.9 (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.