You are not logged in.
Pages: 1
First of all, I don't know if this is the proper place to ask this.
I am experiencing what I assume to be file corruption. After copying files in different ways, some of them report back with a different hash checksum.
I am using SHA1 to verify it. I am copying the file from a computer running Arch to another one running Arch. I tried various methods and all of them result in a few files ending up with different hashes. Here's what I tried:
- all of them use an ext4 filesystem
- I tried copying with cp, rsync and with scp, with the same results
- computer 1 and 2 are running Arch (up-to-date), but I also added a 3rd computer running Ubuntu to rule out hardware issues on the first 2
Computer 1 via wired local network to Computer 2: some files with different hashes
Computer 1 to an external hard drive (using ext4): files are not corrupted
External hard drive to Computer 2: some files with different hashes
Computer 1 via wired local network to Computer 3: some files with different hashes
Computer 1 to an external hard drive (same as above) and then to Computer 3: some files with different hashes
Computer 2 via wired local network to Computer 3: some files with different hashes
Computer 2 via an external hard drive (same as above) to Computer 3: some files with different hashes
Computer 1 via USB flash drive (with ntfs file system) to Computer 2: some files with different hashes
According to that my external hard drive, USB flash drive, router/cables and all 3 computers must have defects causing the corruption. I don't know how likely that is. So, I'm wondering if there's maybe a software error somewhere or if I'm doing something wrong? What could cause a file to end up with a different SHA1 hash? Can file attributes do that? According to very superficial research, they can't.
Another interesting thing I noticed was that one time a file changed its hash after being copied somewhere else. The source file, not the destination (new file) that is.
Is there anything else I could do to investigate this?
Last edited by justasug (2016-12-09 13:08:13)
Offline
What tool(s) are you using to calculate the hash?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I am using sha1sum from the coreutils. First I generated a list of hashes + filenames with it on the initial computer. Then I used sha1sum's -c flag to verify them on the destination computer.
Offline
Give cfv a try. Maybe try passing the md5 option to cfv.
PS: Where do you live? Looks like the result of some massive cosmic radiation ![]()
Offline
I figured it out: it was faulty RAM on Computer 2.
For some reason it never crossed my mind to simply run memtest86+. Only after I ran through all the combinations again and noticed that C1 transferred files correctly to C3, did I suspect an issue on C2. Well, better late than never.
Offline
Pages: 1