Confirming end-to-end data consistency checking
There are different types of end-to-end data consistency checking, with dependencies on hardware and software.
About this task
End-to-end data consistency checking is based on a data integrity field (DIF) that is added to transferred data blocks. DIF data is used to confirm that a data block originates from the expected source and was not modified during the transfer between the storage system and the FCP device. The SCSI Block Commands (T10 SBC) standard defines several types of DIF. Linux® data integrity extension (DIX) builds on DIF to extend consistency checking, for example, to the operating system, middleware, or an application.
- The FCP device calculates and checks a DIF checksum (DIF type 1)
Enable this mode with the
zfcp.dif=
kernel ordif=
module parameter.Interface change: As of kernel 5.0, the zfcp.dif= kernel parameter enables DIF only and no longer includes DIX. Use the zfcp.dix= kernel parameter to enable end-to-end data consistency checking in extended mode, with both DIF and DIX. - The Linux block integrity layer calculates and checks a
TCP/IP checksum, which the FCP device then translates to a DIF checksum (DIX type 1 with DIF type
1)
Enable this mode with the
zfcp.dix=
kernel ordix=
module parameter.Note: End-to-end data consistency checking in extended mode is experimental. SCSI disks for which this mode is enabled must be accessed with direct I/O. Direct I/O requires direct access through the block device or through a file system that fully supports end-to-end data consistency checking in extended mode. For example, XFS provides this support. Expect error messages about invalid checksums when you use other access methods.
For more information about the kernel or module parameters that control the end-to-end data consistency checking, see Setting up the zfcp device driver.
With end-to-end data consistency checking for SCSI disks enabled, Linux automatically discovers which FCP devices and which SCSI disks support end-to-end data consistency checking. No further setup is required.
/sys/block/sd<x>/integrity
In the
path, sd<x> is the standard name of the block device of
the SCSI disk.- SCSI disk
- Check your storage server documentation about T10 DIF support and any restrictions.
- IBM Z® hardware
- IBM Z FCP adapter hardware supports end-to-end data consistency checking as of FICON® Express8.
- Hypervisor
- For Linux on z/VM®, you require a z/VM version with guest support for end-to-end data consistency checking.
- FCP device
- Check your FCP adapter hardware documentation about the support and any restrictions. For example, end-to-end data consistency checking might be supported only for disks with 512-byte block size.
- 0
- The FCP device does not support end-to-end data consistency checking.
- 1
- The FCP device supports DIF type 1.
- 17
- The FCP device supports DIX type 1 with DIF type 1.
Procedure
# cat /sys/bus/ccw/devices/<device_bus_id>/host<n>/scsi_host/host<n>/prot_capabilities
where
<device_bus_id> identifies the FCP device and <n> is an
integer that identifies the corresponding SCSI host.Example
# cat /sys/bus/ccw/devices/0.0.1940/host0/scsi_host/host0/prot_capabilities
1