Project

General

Profile

Feature #11640

add zpool ashift property tunable

Added by Kody Kantor about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

ZFS on Linux has had a tunable pool property to allow an operator to change the pool's ashift. This can sometimes lead to performance improvements when firmware reports incorrect sector sizes. We should pull this over to illumos.

Here are some relevant commits in the ZoL tree:
df30f56639f96175ba71d83b4456ccf410c46542 - Add "ashift" property to zpool create
32a9872bbae90a7cd9793c371f558701ec268976 - Illumos #2671: zpool import should not fail if vdev ashift has increased
c30e34faa12e4b6e190edcccd4b2db185a286680 - ZTS: Fix create-o_ashift test case
dddef7d600580ea35177299fe8394f665cc13387 - More ashift improvements
ff61d1a4959065aa99d52489438f6737765987c6 - Check ashift validity in 'zpool add'
b28e57cb82c5d5a992b90c56f67dd7dbf9b6f296 - Allow setting a lower ashift with -o ashift
4588bf57017f5d2693cd7b3f763640fe8cfe5909 - Make zpool attach -o ashift=... actually work
df83110856950c8e7b16a7e94cdf42b8531b9cc8 - Add "-o ashift" to zpool add and zpool attach
4e9b156960562373e005798575a3fbc6d66e32ff - Various ZED fixes
d4aae2a05475ed7a9b39bd0c6b4fe99085a1cbd5 - Improve differing sector size error

A few notes on the port:
- The port of '4e9b156960562373e005798575a3fbc6d66e32ff - Various ZED fixes' is only partial. In order to take this whole commit we'd need a number of larger follow-on commits that include changes to how fletcher4 works, which is out of the scope of this port. I pulled in the most critical piece that allows different sector sized hot spares to replace other vdevs in some circumstances. I also didn't pull in the added test for this behavior since it heavily relies on functionality that we don't yet support in the illumos version of the ZFS test suite (creating raw scsi devices w/ specific sector sizes).
- The ZoL fix for '32a9872bbae90a7cd9793c371f558701ec268976 - Illumos #2671: zpool import should not fail if vdev ashift has increased' used different logic by throwing an ereport rather than logging to the console like we chose to do in illumos. I pulled in the ZoL behavior here. This ereport isn't handled by FMA.
- A couple of the tests need to use 'nawk' rather than 'awk' on illumos.

#2

Updated by Kody Kantor about 1 year ago

ZFS test failures on debug bits after rebase:

$ grep '\[FAIL\]' /var/tmp/test_results/20190903T195350/log
Test: /opt/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_encrypted (run as root) [00:02] [FAIL]
Test: /opt/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_missing_003_pos (run as root) [03:11] [FAIL]
Test: /opt/zfs-tests/tests/functional/mmp/mmp_on_zdb (run as root) [00:23] [FAIL]
Test: /opt/zfs-tests/tests/functional/projectquota/projectspace_004_pos (run as root) [00:00] [FAIL]
Test: /opt/zfs-tests/tests/functional/scrub_mirror/setup (run as root) [00:00] [FAIL]
Test: /opt/zfs-tests/tests/functional/write_dirs/setup (run as root) [00:00] [FAIL]

I dug into each of these and they all appear to be unrelated to this change.

#3

Updated by Electric Monk about 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 5711d3938643272e5ca2aaf5d868e612e7bc97b6

commit  5711d3938643272e5ca2aaf5d868e612e7bc97b6
Author: loli10K <ezomori.nozomu@gmail.com>
Date:   2019-09-06T14:48:40.000Z

    11640 add zpool ashift property tunable
    Portions contributed by: Richard Laager <rlaager@wiktel.com>
    Portions contributed by: Christian Kohlschutter <christian@kohlschutter.com>
    Portions contributed by: Cyril Plisko <cyril.plisko@mountall.com>
    Portions contributed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Portions contributed by: Martin Matuska <martin@matuska.org>
    Portions contributed by: Kody Kantor <kody.kantor@joyent.com>
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF