add cli command to verify local block integrity #94

Closed
trinity-1686a wants to merge 3 commits from trinity-1686a:cli-verify-integrity into main

iterate over all local blocks, reading them entirely, and verifying their integrity.

I've integrated an optional speed limit so it does not impact too much i/o performances. It's however pretty rough, unit is byte/s, but granularity is actually block, so it can't be less than 1 block (whatever its size is) per second, and is rounded up in case the speed requested is not an exact multiple of block size. Also the behavior is very sawtoothy and not smooth (max speed at the start of each second, then no i/o to meet the requested average)

iterate over all local blocks, reading them entirely, and verifying their integrity. I've integrated an optional speed limit so it does not impact too much i/o performances. It's however pretty rough, unit is byte/s, but granularity is actually block, so it can't be less than 1 block (whatever its size is) per second, and is rounded up in case the speed requested is not an exact multiple of block size. Also the behavior is very sawtoothy and not smooth (max speed at the start of each second, then no i/o to meet the requested average)
trinity-1686a added 2 commits 2021-06-24 11:48:39 +00:00
reuse code for listing local blocks
All checks were successful
continuous-integration/drone/pr Build is passing
f0748e97fb
trinity-1686a added 1 commit 2021-07-04 11:40:16 +00:00
add disk i/o speed limit on integrity check
All checks were successful
continuous-integration/drone/pr Build is passing
0bac96f57f
trinity-1686a reviewed 2021-07-04 11:41:23 +00:00
@ -199,3 +200,3 @@
);
let mut path2 = path.clone();
path2.set_extension(".corrupted");
path2.set_extension("corrupted");
Author
Owner

files where getting named <hash>..corrupted

files where getting named `<hash>..corrupted`
Owner

LGTM. Just one thing, I think we should call this operation a scrub because that's a short and memorable term that is already used for this kind of operation in other contexts (e.g. ZFS)

LGTM. Just one thing, I think we should call this operation a `scrub` because that's a short and memorable term that is already used for this kind of operation in other contexts (e.g. ZFS)
Owner

Replaced by #132

Replaced by #132
lx closed this pull request 2021-10-27 08:40:30 +00:00
Some checks are pending
continuous-integration/drone/pr Build is passing
ci/woodpecker/pr/debug
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#94
No description provided.