I stumbled across a very unusual problem. I have one computer with a number of big files from 1Gb to 10 Gb. The files are dd images of some disk partitions. md5sum, sha1sum and sha256sum hashes are OK on this computer.
# for i in md5sum sha1sum sha256sum; do $i -c $i.sum ; done
Partition_1.dd: OK
Partition_2.dd: OK
Partition_3.dd: OK
Partition_4.dd: OK
Partition_5.dd: OK
disk_image.dd: OK
Partition_1.dd: OK
Partition_2.dd: OK
Partition_3.dd: OK
Partition_4.dd: OK
Partition_5.dd: OK
disk_image.dd: OK
Partition_1.dd: OK
Partition_2.dd: OK
Partition_3.dd: OK
Partition_4.dd: OK
Partition_5.dd: OK
disk_image.dd: OK
Using scp I move it to another computer with disks in RAID-6. md5sum, sha1sum and sha256sum hashes FAILED on this computer. The most weird thing is that SOME of the hash values are OK for a file when two other hash values are FAILED!
$ for i in md5sum sha1sum sha256sum; do $i -c $i.sum ; done
Partition_1.dd: FAILED
Partition_2.dd: FAILED
Partition_3.dd: FAILED
Partition_4.dd: FAILED
Partition_5.dd: FAILED
disk_image.dd: FAILED
md5sum: WARNING: 6 of 6 computed checksums did NOT match
Partition_1.dd: FAILED
Partition_2.dd: FAILED
Partition_3.dd: FAILED
Partition_4.dd: OK
Partition_5.dd: FAILED
disk_image.dd: FAILED
sha1sum: WARNING: 5 of 6 computed checksums did NOT match
Partition_1.dd: FAILED
Partition_2.dd: FAILED
Partition_3.dd: FAILED
Partition_4.dd: FAILED
Partition_5.dd: OK
disk_image.dd: FAILED
sha256sum: WARNING: 5 of 6 computed checksums did NOT match
The disk images, however, can be mounted correctly and perfectly readable.
The files are copied back to the original computer into another directory. The most of the hashes are OK. However, some of them FAILED. Contrary to the previous hash check now the results are consistent, i.e. hashes FAILED for the same files.
$ for i in md5sum sha1sum sha256sum; do $i -c $i.sum ; done
Partition_1.dd: OK
Partition_2.dd: OK
Partition_3.dd: OK
Partition_4.dd: FAILED
Partition_5.dd: OK
disk_image.dd: FAILED
md5sum: WARNING: 2 of 6 computed checksums did NOT match
Partition_1.dd: OK
Partition_2.dd: OK
Partition_3.dd: OK
Partition_4.dd: FAILED
Partition_5.dd: OK
disk_image.dd: FAILED
sha1sum: WARNING: 2 of 6 computed checksums did NOT match
Partition_1.dd: OK
Partition_2.dd: OK
Partition_3.dd: OK
Partition_4.dd: FAILED
Partition_5.dd: OK
disk_image.dd: FAILED
sha256sum: WARNING: 2 of 6 computed checksums did NOT match
To be continued…