3 ms·
> any LVM or mdadm mode with parity contains a functional checksum. To use it for data integrity, do a regular scrub. That doesn't work. Scrubbing the RAID can
by Ded7xSEoPKYNsDd 11y ago
> any LVM or mdadm mode with parity contains a functional checksum. To use it for data integrity, do a regular scrub.
That doesn't work. Scrubbing the RAID can detect errors, but when they occur, the block layer has no idea which copy is the correct one. I haven't verified for LVM, but at least for mdraid, Linux explicitly does not make any attempts at recovering a 'correct' block even in cases where there is more than one copy. It just randomly picks a winner and overwrites the other versions. You still want to scrub for the error detection.
- bryanlarsen 11y agoI've seen it work. It knows which block has the error because the disk reported the error. It then rewrites the sector with the correct data, the disk moves the sector, you see "read error detected, corrected" or some such in your kernel logs.