Skip to content
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

btrfs scrub pre snapraid sync #8

Open
o010b opened this issue Feb 19, 2022 · 2 comments
Open

btrfs scrub pre snapraid sync #8

o010b opened this issue Feb 19, 2022 · 2 comments

Comments

@o010b
Copy link

o010b commented Feb 19, 2022

I would like to suggest checking data volumes for bit rot or otherwise corruption using btrfs scrub before updating the snapraid parity. Cheers.

@einsteinx2
Copy link

Since btrfs automatically verifies checksums on read, running a full scrub should not be necessary (not to mention it would take an incredibly long time to scrub all volumes if you have large drives). If the checksum of the file fails to verify, it should result in a read error of the file, which presumably snapraid would detect as it would any other read error like a bad sector.

Check out this SO answer for some more detailed info and an example script to confirm it works this way: https://superuser.com/a/1285549/66111

@Nosirus
Copy link

Nosirus commented Aug 11, 2024

Hi,
I'm coming back to this to understand, btrfs already checks the files in reading but only if they are read, so if the file is not used for 2 years, an error can be created?
I use NixOS I have a service that launches a scrub of the mount points every month do you think that's enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants