Repository navigation
Allow zdb -r to understand object ids as well - #16307
Merged
Merged
Conversation
akashb-22
approved these changes
Jun 28, 2024
robn
reviewed
Jul 17, 2024
Contributor
Author
|
@kithrup made some changes to this, so it now uses |
Contributor
|
I'm happy to take another look, but could you first rebase this on master and resolve the build issue. |
Contributor
Done, thanks! |
kithrup
force-pushed
the
zdb_r
branch
2 times, most recently
from
December 17, 2025 11:31
01bb2ad to
77735cf
Compare
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Sean Eric Fagan
behlendorf
approved these changes
Dec 17, 2025
kithrup
pushed a commit
to KlaraSystems/zfs
that referenced
this pull request
Jan 19, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307 (cherry picked from commit 1d43387)
amotin
pushed a commit
to amotin/zfs
that referenced
this pull request
Jan 29, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307
mcmilk
pushed a commit
to mcmilk/zfs
that referenced
this pull request
Jan 31, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307
amotin
pushed a commit
to amotin/zfs
that referenced
this pull request
Feb 3, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307
lundman
pushed a commit
to openzfsonosx/openzfs-fork
that referenced
this pull request
Feb 5, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307
tonyhutter
pushed a commit
that referenced
this pull request
Feb 5, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes #16307
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Feb 23, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Feb 23, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307
allanjude
added a commit
to KlaraSystems/zfs
that referenced
this pull request
Feb 27, 2026
"zdb -r -O pool/dataset obj-id destination" will copy the file with object-id obj-id to the named destination; without -O it'll still be interpreted as a pathname. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian BehlendorfReviewed-by: Akash B Signed-off-by: Sean Eric Fagan Closes openzfs#16307 (cherry picked from commit 1d43387)
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.
Sponsored-by: Klara, Inc.
Sponsored-By: Wasabi Technology, Inc.
Motivation and Context
Previously I created:
zdb -r pool/dataset path/to/file /tmp/recover.datBut it turns out, if there is a problem with a directory, you might want to recover a file by its inode number instead
Description
If the argument is a number, thread it as the object-id instead of a filename
How Has This Been Tested?
Manually
Types of changes
Checklist:
Signed-off-by.