[WIP] Raidz Expansion: multiple devices expanding #17588
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Allow to attach multiple raidz children at once, by applying single reflow process for all newly attached devices in parallel.
This PR allows to attach multiple devices to raidz in same time in parallel. The zpool command is executed by the next way:
Description
The multiple devices raidz expnding will be completed after single reflow process iteration. The number of attached devices should be less, then raidz have initially. The older versions of ZFS with raidz expansion support will not be able to work with raidz expanded with the multiple raidz attached devices.
The multiple devices raidz expansion become possible by adding new vdev label config variable
ZPOOL_CONFIG_RAIDZ_EXPAND_VDEVS
additionally toZPOOL_CONFIG_RAIDZ_EXPAND_TXGS
. This variable is an array of values of devices attached per raidz expansion iteration. Updated on every reflow process completion, same asZPOOL_CONFIG_RAIDZ_EXPAND_TXGS
array. BothZPOOL_CONFIG_RAIDZ_EXPAND_TXGS
andZPOOL_CONFIG_RAIDZ_EXPAND_VDEVS
should have the same size and used to build raidz txg avl tree to compute raidz width dependent of bp birth txg value.I did not found any reasons, why it would be impossible from raidz math point of view.
If you have any concerns or suggestions regarding raidz math and multiple devices raidz expanding process, please let me know.
Notes:
TODO:
How Has This Been Tested?
No zfs-tests.sh tests scripts for now.
Types of changes
Checklist:
Signed-off-by
.