Re: [BUG] Btrfs scrub sometime recalculate wrong parity in raid5: take two
From: Chris Mason <clm@fb.com>
Date: 2016-07-15 15:21:29
From: Chris Mason <clm@fb.com>
Date: 2016-07-15 15:21:29
On 07/15/2016 11:10 AM, Andrei Borzenkov wrote:
15.07.2016 16:20, Chris Mason пишет:quoted
quoted
quoted
Interesting, thanks for taking the time to write this up. Is the failure specific to scrub? Or is parity rebuild in general also failing in this case?How do you rebuild parity without scrub as long as all devices appear to be present?If one block is corrupted, the crcs will fail and the kernel will rebuild parity when you read the file. You can also use balance instead of scrub.As we have seen recently, btrfs does not compute, stores or verifies checksum of RAID56 parity. So if parity is corrupted, the only way to detect and correct it is to use scrub. Balance may work by side effect, because it simply recomputes parity on new data, but it will not fix wrong parity on existing data.
Ah, I misread your question Yes, this is definitely where scrub is the best tool. But even if we have to add debugging to force parity recomputation, we should see if the problem is only in scrub or deeper. -chris