Re: Testing dm-integrity (WAS: Re: Support for data CRC)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/10/2017 09:43 PM, Sebastian Andrzej Siewior wrote:
> On 2017-08-22 16:37:07 [-0600], Chris Murphy wrote:
>> 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.
> 
> So I tried this:
> 
> dmsetup create test-raid1 --table '0 4194304 raid raid1 3 0 region_size 1024 2 - /dev/vdc - /dev/vdd'
> 
> # creating the target (size 1)
> provided_data_sectors=1
> table="0 $provided_data_sectors integrity /dev/mapper/test-raid1 4096 - D 1 internal_hash:crc32c"
> dmsetup create dm-int --table "$table"
> dmsetup remove /dev/mapper/dm-int
> 
> # hexdumped. is there a tool for that?

There is integritysetup tool (part of cryptsetup package) that automates format and mount of dm-integrity devices.
For now in devel git, I expect we will do some release package this month.
(So no need to use dmsetup here.)

...

> at some point I expected dm-integrity to check the other disk in RAID.

The dm-integrity has no connection to RAID, it will just return EILSEQ (instead of EIO error)
to inform that the error is an data integrity error, not a media (or other) IO error.

> Isn't this possible or is my setup wrong at some point? If it is not
> possible, could it be made possible?

It is up to RAID driver to handle integrity error properly (the same should happen
for hardware DIF integrity error I guess - you can try to simulate it with scsi_debug).

Milan

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux