Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raidz expand #14840

Closed
wants to merge 25 commits into from
Closed

Raidz expand #14840

wants to merge 25 commits into from

Commits on May 8, 2023

  1. disable zstd mempool

    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    f4caf7b View commit details
    Browse the repository at this point in the history
  2. raidz expansion feature

    This feature allows disks to be added one at a time to a RAID-Z group,
    expanding its capacity incrementally.  This feature is especially useful
    for small pools (typically with only one RAID-Z group), where there
    isn't sufficient hardware to add capacity by adding a whole new RAID-Z
    group (typically doubling the number of disks).
    
    == Initiating expansion ==
    
    A new device (disk) can be attached to an existing RAIDZ vdev, by
    running `zpool attach POOL raidzP-N NEW_DEVICE`, e.g. `zpool attach tank
    raidz2-0 sda`.  The new device will become part of the RAIDZ group.  A
    "raidz expansion" will be initiated, and the new device will contribute
    additional space to the RAIDZ group once the expansion completes.
    
    The `feature@raidz_expansion` on-disk feature flag must be `enabled` to
    initiate an expansion, and it remains `active` for the life of the pool.
    In other words, pools with expanded RAIDZ vdevs can not be imported by
    older releases of the ZFS software.
    
    == During expansion ==
    
    The expansion entails reading all allocated space from existing disks in
    the RAIDZ group, and rewriting it to the new disks in the RAIDZ group
    (including the newly added device).
    
    The expansion progress can be monitored with `zpool status`.
    
    Data redundancy is maintained during (and after) the expansion.  If a
    disk fails while the expansion is in progress, the expansion pauses
    until the health of the RAIDZ vdev is restored (e.g. by replacing the
    failed disk and waiting for reconstruction to complete).
    
    The pool remains accessible during expansion.  Following a reboot or
    export/import, the expansion resumes where it left off.
    
    == After expansion ==
    
    When the expansion completes, the additional space is available for use,
    and is reflected in the `available` zfs property (as seen in `zfs list`,
    `df`, etc).
    
    Expansion does not change the number of failures that can be tolerated
    without data loss (e.g. a RAIDZ2 is still a RAIDZ2 even after
    expansion).
    
    A RAIDZ vdev can be expanded multiple times.
    
    After the expansion completes, old blocks remain with their old
    data-to-parity ratio (e.g. 5-wide RAIDZ2, has 3 data to 2 parity), but
    distributed among the larger set of disks.  New blocks will be written
    with the new data-to-parity ratio (e.g. a 5-wide RAIDZ2 which has been
    expanded once to 6-wide, has 4 data to 2 parity).  However, the RAIDZ
    vdev's "assumed parity ratio" does not change, so slightly less space
    than is expected may be reported for newly-written blocks, according to
    `zfs list`, `df`, `ls -s`, and similar tools.
    
    Sponsored-by: The FreeBSD Foundation
    Contributions-by: Fedor Uporov <[email protected]>
    Contributions-by: Stuart Maybee <[email protected]>
    Contributions-by: Thorsten Behrens <[email protected]>
    Contributions-by: Fmstrat <[email protected]>
    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    18cb9f0 View commit details
    Browse the repository at this point in the history
  3. Increase the number of txgs added to last reflow complete sync txg

    Some blocks, which were synced in the same txg as
    raidz_reflow_complete_sync(), can have incorrect logical width.
    The increasing of txg value, which was added to expand txgs array,
    can help in this case.
    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    2e850ec View commit details
    Browse the repository at this point in the history
  4. panic in zthr_iscancelled

    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    80cc84d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fad7722 View commit details
    Browse the repository at this point in the history
  6. ztest: Make ztest_vdev_raidz_attach() error checking more closer to z…

    …test_vdev_attach_detach()
    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ac4637e View commit details
    Browse the repository at this point in the history
  7. ztest: Restore scratch object testing

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    935af3e View commit details
    Browse the repository at this point in the history
  8. ztest: Add raidz expansion testing as CLI option

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    0e4f962 View commit details
    Browse the repository at this point in the history
  9. ztest: Fix integer printing

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    5e3c16e View commit details
    Browse the repository at this point in the history
  10. fix a bug where we can fail to repair a few blocks while in the middl…

    …e of reflow
    
    The "shadow block" repair write was not acutally being executed due to
    bypassing in lower layers.
    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    1ac2855 View commit details
    Browse the repository at this point in the history
  11. manpage comments

    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ec9cf17 View commit details
    Browse the repository at this point in the history
  12. fix assertion failure in raidz_reflow_sync()

    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    40750f0 View commit details
    Browse the repository at this point in the history
  13. one more manpage tweak

    ahrens authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8a8423c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dccddfe View commit details
    Browse the repository at this point in the history
  15. Do not switch to scratch offset in the middle of the row

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    afc1123 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    33e2141 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    2fb3d7e View commit details
    Browse the repository at this point in the history
  18. Skip mmp ub writing if scratch object is active.

    MMP uberblock could be owerwritten by scratch object if raidz expansion is in progress.
    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    84b0814 View commit details
    Browse the repository at this point in the history
  19. Revert "Make vdev_rz_expanding config variable syncing more earlier"

    This reverts commit d99d9a3.
    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    95c65b6 View commit details
    Browse the repository at this point in the history
  20. Skip mmp ub writing if scratch object is active.

    Improve comment.
    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    c64d563 View commit details
    Browse the repository at this point in the history
  21. Handle scratch in case of shadow writes

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    91d1813 View commit details
    Browse the repository at this point in the history
  22. Scratch logic refactoring

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8cd6c85 View commit details
    Browse the repository at this point in the history
  23. Remove skip mmp ub writing if scratch object is active.

    Add mmp uberblock actualization from scratch object side
    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    6a6be8e View commit details
    Browse the repository at this point in the history
  24. Fix 'shadow write' to scratch region

    fuporovvStack authored and Your Name committed May 8, 2023
    Configuration menu
    Copy the full SHA
    914f429 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    b1c0c3d View commit details
    Browse the repository at this point in the history