Using checksums for verifying disk image download is very common, but how do you verify uploading a disk image to a virtual disk or verify that a backup is correct? The standard tools such as sha256sum cannot help since the disk image and the virtual disk may use different image formats. Even if the image formats match, standard tools are too slow to handle huge virtual disks which typically contain a small amount of data and a large amount of unallocated space.
In this talk we will learn about the blkhash
algorithm for computing a fast checksum of sparse disk images, up to 3 orders of magnitude faster compared with standard algorithms, the libblkhash
C library that you can use in your program, and the blksum
command line tool for computing checksum of common disk image formats.
The blkhash project grew from the ovirt-imageio project, providing fast disk checksums since oVirt 4.4. The blkhash project adds support for multiple threads, uses the high performance libnbd library, and is implemented in C. The project is released under LGPL license so you can use it in your project or package it for your distribution.
Speakers: Nir Soffer