This is an old revision of the document!


Table of Contents

Chunksum

Print and compare file checksum ranges.

Chunksum was created to fix errors introduced into a 128 gigabyte disk image transferred from one site to another over a low speed vpn link.

The reason for the fault is not known and may be disc related or even mounting the image rw in by mistake to inspect it.

The solution to synchronise the files is shown below and is very much faster than transferring the full 128GB image.

Install

hg clone http://hg.kewl.org/pub/chunksum
cd chunksum
make
sudo make install

Demo

Generate checksums (default: 1MB block size) on origin and destination and copy across.

chunksum goodfile > good.sum
scp good.sum destination:
chunksum badfile  > bad.sum
scp bad.sum  origin:

Compare checksums.

chunkcmp good.sum bad.sum

Extract good blocks on origin site and copy to destination.

chunkcmp good.sum bad.sum -e goodfile
scp *.block destination:

Replace bad blocks on destination site.

chunkcmp good.sum bad.sum -r badfile
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies