#18172: Detect and heal orphaned DTL entries on pool import#18173
Draft
nmarasoiu wants to merge 1 commit intoopenzfs:masterfrom
Draft
#18172: Detect and heal orphaned DTL entries on pool import#18173nmarasoiu wants to merge 1 commit intoopenzfs:masterfrom
nmarasoiu wants to merge 1 commit intoopenzfs:masterfrom
Conversation
When a system crashes during vdev detach operations, the on-disk state can become inconsistent: the vdev tree shows the device as a "hole" or "missing", but DTL entries from the detached device remain on disk. On pool import, these orphaned DTL entries can trigger a phantom resilver that scans the entire pool with no valid target device, causing severe I/O load and system instability. This patch adds: - vdev_dtl_check_orphaned(): detect orphaned DTL on hole/missing vdevs - New import flag ZFS_IMPORT_HEAL_ORPHANED_DTL (0x100) - CLI option: zpool import -o heal_orphaned_dtl=on poolname - Clear warning messages to inform the administrator By default, import fails with a helpful error message when orphaned DTL entries are detected, directing the user to re-import with the healing option. This ensures administrators are explicitly aware of and consent to the recovery action. Signed-off-by: Nicola Remasoiu <dumitru.nicolae.marasoiu@outlook.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Member
|
Would we have transactions to handle atomic operations... ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#18172
When a system crashes during vdev detach operations, the on-disk state can become inconsistent: the vdev tree shows the device as a "hole" or "missing", but DTL entries from the detached device remain on disk.
On pool import, these orphaned DTL entries can trigger a phantom resilver that scans the entire pool with no valid target device, causing severe I/O load and system instability.
This patch adds:
By default, import fails with a helpful error message when orphaned DTL entries are detected, directing the user to re-import with the healing option. This ensures administrators are explicitly aware of and consent to the recovery action.
Motivation and Context
Description
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by.