Project

General

Profile

Actions

Bug #12636

closed

Prevent unnecessary resilver restarts

Added by Jason King about 2 years ago. Updated about 2 years 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

Port of two OpenZFS resilver related issues:

commit 3c819a2c7da4560abb75b9dbf9a314ceafddaf86
Author: jwpoduska <jpoduska@datto.com>
Date:   Wed Nov 27 13:15:01 2019 -0500

    Prevent unnecessary resilver restarts

    If a device is participating in an active resilver, then it will have a
    non-empty DTL. Operations like vdev_{open,reopen,probe}() can cause the
    resilver to be restarted (or deferred to be restarted later), which is
    unnecessary if the DTL is still covered by the current scan range. This
    is similar to the logic in vdev_dtl_should_excise() where the DTL can
    only be excised if it's max txg is in the resilvered range.

    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: John Gallagher <john.gallagher@delphix.com>
    Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
    Signed-off-by: John Poduska <jpoduska@datto.com>
    Issue #840
    Closes #9155
    Closes #9378
    Closes #9551
    Closes #9588

and

commit fa130e010c2ff9b33aba11d2699b667e454b3ccb
Author: Alexander Motin <mav@FreeBSD.org>
Date:   Thu Mar 12 13:52:03 2020 -0400

    Fix infinite scan on a pool with only special allocations

    Attempt to run scrub or resilver on a new pool containing only special
    allocations (special vdev added on creation) caused infinite loop
    because of dsl_scan_should_clear() limiting memory usage to 5% of pool
    size, which it calculated accounting only normal allocation class.

    Addition of special and just in case dedup classes fixes the issue.

    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Alexander Motin <mav@FreeBSD.org>
    Sponsored-By: iXsystems, Inc.
    Closes #10106
    Closes #8694

Related issues

Related to illumos gate - Feature #12635: Allow for '-o feature@<feature>=disabled' on the command lineClosedJason King

Actions
Blocked by illumos gate - Bug #12684: Inject zinject a percentage amount of dev errsClosedJason King

Actions
Actions #1

Updated by Jason King about 2 years ago

  • Related to Feature #12635: Allow for '-o feature@<feature>=disabled' on the command line added
Actions #2

Updated by Jason King about 2 years ago

  • Blocked by Bug #12684: Inject zinject a percentage amount of dev errs added
Actions #3

Updated by Jason King about 2 years ago

Also includes

commit 7bda69a1a9e7b852e8651ab87a05dd7ad5572a5a
Author: John Poduska <jpoduska@datto.com>
Date:   Tue Dec 10 12:10:36 2019 -0500

    ZTS: Fixes for spurious failures of resilver_restart_001 test

    The resilver restart test was reported as failing about 2% of the
    time. Two issues were found:

    - The event log wasn't large enough, so resilver events were missing
    - One 'zpool sync' wasn't enough for resilver to start after zinject

    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: John Kennedy <john.kennedy@delphix.com>
    Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
    Signed-off-by: John Poduska <jpoduska@datto.com>
    Issue #9588
    Closes #9677
    Closes #9703

Actions #4

Updated by Jason King about 2 years ago

To test, I booted a BE with the changes and ran the zfs test suite. All failures were known issues w/ existing tickets.

In addition, I also ran the new resilver test from this change on a BE without this change and verified that the test fails without the ZFS changes.

Actions #5

Updated by Electric Monk about 2 years ago

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

git commit 0c06d385ea5bbe11d20ecea2e02cdc78733d5359

commit  0c06d385ea5bbe11d20ecea2e02cdc78733d5359
Author: jwpoduska <jpoduska@datto.com>
Date:   2020-05-12T20:42:50.000Z

    12636 Prevent unnecessary resilver restarts
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: John Gallagher <john.gallagher@delphix.com>
    Reviewed by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
    Reviewed by: John Kennedy <john.kennedy@delphix.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Portions contributed by: Alexander Motin <mav@FreeBSD.org>
    Portions contributed by: Jason King <jason.king@joyent.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF