Bug #453

ZPOOL_CONFIG_ASHIFT not set correctly for drives with large sector size

Added by Albert Lee about 7 years ago. Updated about 3 years ago.

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

0%

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

Description

http://digitaldj.net/2010/11/03/zfs-zpool-v28-openindiana-b147-4k-drives-and-you/
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

History

#1 Updated by Paul M about 6 years ago

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

where did the following lead to?

http://lists.illumos.org/pipermail/developer/2011-January/001218.html

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 about 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 almost 4 years ago

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

Hi,

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

e.g.

# ./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 about 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 about 3 years ago

Hi Eric,

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:
https://web.archive.org/web/20110525033341/http://digitaldj.net/zpool-12

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

Also available in: Atom