Skip to content

Implement shadow mirrors - #18896

Open
pcd1193182 wants to merge 2 commits into
openzfs:masterfrom
KlaraSystems:shadow_drive
Open

Implement shadow mirrors#18896
pcd1193182 wants to merge 2 commits into
openzfs:masterfrom
KlaraSystems:shadow_drive

Conversation

@pcd1193182

Copy link
Copy Markdown
Contributor

Sponsored by: Railway Corporation; Klara, Inc.

Description

Shadow mirrors provide a mechanism for adding an experimental or untrustworthy device to ZFS. This can be useful for testing purposes, where we want to put actual load on a drive in a production or near-production environment, but also want the assurances of existing, reliable storage. Shadow mirrors issue reads to all of their shadow children and one of their non-shadow children (like regular mirrors). The shadow reads are checked for correctness, but not used to return the result of the read. Writes are directed to all children as usual.

How Has This Been Tested?

In addition to the new unit test, manual testing was performed to ensure that reads and writes are directed appropriately (all reads go to the shadow child, non-shadow children are distributed as normal).

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Aug 6, 2026
Shadow mirrors provide a mechanism for adding an experimental or
untrustworthy device to ZFS. This can be useful for testing purposes,
where we want to put actual load on a drive in a production or
near-production environment, but also want the assurances of existing,
reliable storage.  Shadow mirrors issue reads to all of their shadow
children and one of their non-shadow children (like regular
mirrors). The shadow reads are checked for correctness, but not used to
return the result of the read. Writes are directed to all children as
usual.

Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Sponsored-by: Klara, Inc.
Sponsored-by: Railway Corporation
Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Code Review Needed Ready for review and testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants