On Tue, Aug 22, 2017 at 5:10 AM, Sebastian Andrzej Siewior <sebastian@xxxxxxxxxxxxx> wrote: > On 2017-08-21 13:52:48 [-0600], Chris Murphy wrote: >> On Mon, Aug 21, 2017 at 1:04 PM, Sebastian Andrzej Siewior >> <sebastian@xxxxxxxxxxxxx> wrote: >> > Hi, >> > >> > my understanding is that only metadata is protected by CRC in the new >> > on-disk format. Are there any plans to also protect data? >> >> See dm-integrity, merged as of 4.12 kernel. I haven't seen any >> performance benchmarking so far. > > So this ensures integrity with the help of crypto algorithms. This is a > bit much as something like crc32c/crc64 would be sufficient. However > dm-integrity does not provide a way to recover (as far as I can tell). If a block fails integrity checking, there's a read error that goes to the next layer which would need to have replication such as mdadm/lvm RAID. And that layer would grab a good copy, and fix the bad copy. So every physical drive would first have dm-integrity applied, which is a 1:1 mapping, and then each dm-integrity logical device is made a PV for LVM, and then you create raid1/5/6 LV's or whatever you want, and then format it whatever you want. Documentation says either crc or hash is possible, including crc32. https://www.kernel.org/doc/Documentation/device-mapper/dm-integrity.txt > My idea was that if the "normal" path is faulty (and noticed by the crc > check) it (xfs or the dm layer) would try to read the data via an > alternative path if possible (say on RAID1/5/6). Yes you have to build each layer you want separately with this method. Otherwise you're looking at ZFS or Btrfs if you want it integrated. -- Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html