-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add ability to scrub from last scrubbed txg #16301
base: master
Are you sure you want to change the base?
Conversation
68edb6e
to
42d967f
Compare
42d967f
to
8d59c2c
Compare
I noticed a $ sudo ./zpool scrub tank && sleep 1 && sudo ./zpool scrub -p tank
$ sudo ./zpool status
pool: tank
state: ONLINE
scan: scrub paused since Tue Aug 27 16:02:26 2024
scrub started on Tue Aug 27 16:02:25 2024
14.7G / 14.7G scanned, 3.22G / 14.7G issued
0B repaired, 21.95% done
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
vdb ONLINE 0 0 0
errors: No known data errors
$ sudo ./zpool scrub -C tank
cannot scrub tank: delegated administration is disabled on pool
$ echo $?
1
$ sudo ./zpool status
pool: tank
state: ONLINE
scan: scrub repaired 0B in 00:00:14 with 0 errors on Tue Aug 27 16:02:39 2024
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
vdb ONLINE 0 0 0
errors: No known data errors It returns an error code, but then the scrub seems to complete successfully. Any thoughts? |
@tonyhutter This is after the applied patch, but without it, it works fine? |
8d59c2c
to
cc72197
Compare
I have added another feature just to scrub "recent data". |
cc72197
to
4823cc2
Compare
2a34659
to
d9c7d38
Compare
@oshogbo Would you rebase and resolve the test failures? |
d9c7d38
to
f108d90
Compare
@amotin Yes, let my try to fix that. |
f108d90
to
b08bd76
Compare
e5635df
to
77f2265
Compare
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.
Thank you. I have no objections for this variant.
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.
Reviewed-by: Allan Jude <[email protected]>
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.
A few small comments but nothing major. This seems like a good first step for an interface and something we can build on.
77f2265
to
0e0cd2a
Compare
@behlendorf @allanjude @amotin Thank you for the review. |
Sponsored-By: Wasabi Technology, Inc. Sponsored-By: Klara Inc. Signed-off-by: Mariusz Zaborski <[email protected]>
The `last_scrubbed_txg` property indicates the transaction group (TXG) up to which the most recent scrub operation has checked and repaired the dataset. This provides administrators with insight into the data integrity status of their pool at a specific point in time. Sponsored-By: Wasabi Technology, Inc. Sponsored-By: Klara Inc. Signed-off-by: Mariusz Zaborski <[email protected]>
@oshogbo it looks like this change unexpectedly breaks ztest. I've resubmitted the ztest CI build multiple times now and haven't been able to get a clean pass. Can you take a look at the CI logs from the failures: https://github.com/openzfs/zfs/actions/runs/11891031862?pr=16301 |
Motivation and Context
Sometimes it is useful to only scrub a particular range of txg. Some users might want to scrub only new data because they would like to know if the new write wasn't corrupted. This PR adds possiblity scrub only newly flushed data.
Description
Users who would like to scrub only new data, a new zpool property was introduced, that stores last scrubbed txg, so users can run scrub only from the last saved point.
We use a scn_max_txg and scn_min_txg which are already built into scrub, to accomplish that.
How Has This Been Tested?
Via test cases.
Types of changes
Checklist:
Signed-off-by
.