3 ms·
No, LVM doesn't provide any protection, you need to layer mdadm below LVM to provide any sort of protection. Even with the use of mdadm, it doesn't provide nea
by benjaminl 11y ago
No, LVM doesn't provide any protection, you need to layer mdadm below LVM to provide any sort of protection.
Even with the use of mdadm, it doesn't provide near the sort of protection that ZFS does. Due to pervasive checksuming of data, ZFS handles the bit-rot and corruption that a dying disk does much better than the traditional raid that mdadm provides. For example if you have your disks mirrored or RAIDed, if the disk doesn't provide a read error, mdadm will pass the data back to the OS. Since the data isn't checksumed, there is no way for it to know if it needs to read from the mirrored disk or the parity drives.
- voltagex_ 11y agoThanks. I'm hanging out for FreeNAS 10, which seems like it will solve a lot of things.
- bryanlarsen 11y ago- as of RHEL 6.3, LVM supports raid4/5/6 without mdadm. It has supported raid1 (mirroring) and raid0 (striping) for much longer. - any LVM or mdadm mode with parity contains a functional checksum. To use it for data integrity, do a regular scrub. You should be doing a regular scrub with ZFS anyways, so ZFS's checksum on read doesn't add much except for slowing things down.
- 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.