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
It would be nice to be able to visualize how the RAIDZ disk columns for a given file are laid out on disk. For example, one might ponder if the parity is being evenly distributed or are the same disks being used for parity?
Description
This change introduces the --file-layout (-f) option to zdb(8) to display the raidz file layout for a given file. The change leverages the
vdev_raidz_map_alloc()
function to find the map of how the block data is laid out across the child disks.A typical column entry looks like:
Which here represents the logical data column 2 that is 43 sectors high starting at sector 0x6020da. The parity is displayed in inverse text if output is to a terminal (see example below).
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
An example
How Has This Been Tested?
Tested with various flavors of raidz and disk counts.
Tested with ZTS
cli_root/zdb
suite of tests.Known Issues/Limitations
RAIDZ
. A follow-on pull request can add support fordRAID
.'├'
, can sometimes show final connector'└'
by mistake.Types of changes
Checklist:
Signed-off-by
.