New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support single files scrubbing #16018
base: master
Are you sure you want to change the base?
Conversation
80cb074
to
adca54a
Compare
tests/zfs-tests/tests/functional/cli_root/zfs_scrub/zfs_error_scrub_001_pos.ksh
Outdated
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/cli_root/zfs_scrub/zfs_error_scrub_002_pos.ksh
Outdated
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/cli_root/zfs_scrub/zfs_error_scrub_001_pos.ksh
Outdated
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/cli_root/zfs_scrub/zfs_error_scrub_001_pos.ksh
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/cli_root/zfs_scrub/zfs_scrub.cfg
Outdated
Show resolved
Hide resolved
adca54a
to
e9fe04c
Compare
|
Yes, I can do that.
Ok, I can try to add such.
The file will be added to the error list; however, the scrub will fail, as you can't start another scrub. |
Just so I'm understanding correctly - if I do:
...the And conversely, if I do:
The If this is correct, then we should print an error in both cases saying something to the effect of "I can't do that, there's a scrub in progress". We should mention this behavior in the man pages as well. Some other scenarios that come to mind:
|
e9fe04c
to
d453d4e
Compare
Yes, that is correct. You will see the file on error list.
Yes, as there is already a running scrub.
I have added that only one scrub can work.
So currently the file will be added to the error list and the scrub will be still paused.
Yes, its a normal scrub it behaves the same. |
This introduces the functionality of scrubbing data from files. Originally, the `errloglist` structure was utilized for tracking error blocks identified during scrub operations. Same structure can be used record blocks from specific files. By generating these records we can simbply scurb it. This allows scrubbing a single file, leveraging existing infrastructure. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Signed-off-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
d453d4e
to
1512020
Compare
log_must zinject -a -t data -C 0,1 -e io $mntpnt/file | ||
|
||
log_must zfs scrub $mntpnt/file | ||
log_must is_pool_without_errors $TESTPOOL true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the test corrupts the first two DVAs of $mntpnt/file
then I would expect scrub to say "I repaired data" rather than "everything was fine". Does this check that scrub repaired data here?
|
||
function is_pool_without_errors #pool <verbose> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this return true if there were no errors, or does it return true if there were errors but they were all repaired?
Hmm.. I'm worried that the user will think their files are corrupted when they really arn't. Is there a way around that? Also, minor typo in commit message:
Lastly, are you planning to add delegation support for |
Motivation and Context
Currently, we have various scrubbing approaches, including scrubbing an entire pool or scrubbing saved errors. However, the ability to target specific data for scrubbing can be particularly beneficial. For instance, one simple application of this is scrubbing a single file rather than the entire pool. One of the simplest examples is to scrub a single file instead of the whole pool. This scrubbing could be desired for files written prior to disk/controller errors or for older files that warrant inspection. For a large pools limiting the actual data that we have scrub can be quite usefull.
Description
This introduces the functionality of scrubbing data from files. Originally, the
errloglist
structure was utilized for tracking error blocks identified during scrub operations. Same structure can be used record blocks from specific files. By generating these records we can simbply scurb it. This allows scrubbing a single file, leveraging existing infrastructure.Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
How Has This Been Tested?
A new test was added.
Types of changes
Checklist:
Signed-off-by
.