3 ms·
I'm surprised file systems don't offer the ability to save data to disk as an error-correcting code.
by JulianMorrison 17y ago
I'm surprised file systems don't offer the ability to save data to disk as an error-correcting code.
- logicalmind 17y agoThat's what RAID5 does. It protects from single drive failure by placing an "error-correcting code" on an alternate disk. Unless you're talking about error-correcting codes on a single disk, eg. within the filesystem. But this doesn't solve the same problem as RAID is intended to solve.
- aplusbi 17y agoTechnically that's RAID 4, 5 distributes the parity across all disks.
- JulianMorrison 17y agoParity is a very weak ECC, basically. A more complex one of the sort used in outer-space networking can detect and rescue large swathes of destruction, or even tolerate it and prioritize relocation of the most damaged data. It doesn't protect against outright drive failure, but straight-up mirroring will do that. This is of course at the cost of tunable space wastage.
- signa11 17y agoisn't that exactly what zfs supports ?
- deleted 17y ago[deleted]
- JulianMorrison 17y agoNo, ZFS has checksums. It detects errors but can only repair them if the data is mirrored.
- rbanffy 17y agoECC would work if you could read both the ECC and enough of the data out of the defective block. I am not sure how frequent this situation is, but I suspect full-block failures are more common. Considering the trends in storage capacity, I think the mirroring approach done with ZFS is a clever solution. One could even conceive a file system that would position multiple copies of blocks of frequently accessed files all over the disks in order to maximize throughput, keeping only a minimum redundancy condition declared by file. I am happy file systems are no longer boring ;-)
- rbanffy 17y agoAh... The difference a day makes. The ECC idea could work, but it would be best to build it into the drive's firmware. This way the drive would get read errors less often, could attempt to rewrite the block or to relocate it somewhere else in case of a "bad enough" error.