1

I have an issue with computing md5sum. For the same file when I run md5sum I get different results.

/tmp @at46> md5sum seq.swi
9b5f6616c8d9240ba504607e0a8085b8  seq.swi
/tmp @at46> md5sum seq.swi
7577bd05a3e49ca52a7d4e91cb0965df  seq.swi
/tmp @at46> md5sum seq.swi
4592ee5f7bf5d28ff7539cd32592f3ed  seq.swi
/tmp @at46> md5sum seq.swi
ecc75fe71ad4a7aa577f642c7ddc41a7  seq.swi

Updates:

/images @at46.> md5sum seq.swi
c1f29e3e83cbf025ca6283bd9dc26718  seq.swi

/images @at46.> stat seq.swi
  File: `seq.swi'
  Size: 468380585       Blocks: 914816     IO Block: 4096   regular file
Device: 803h/2051d      Inode: 35127480    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-03-13 21:05:37.850790017 +0000
Modify: 2017-02-24 23:17:20.000000000 +0000
Change: 2017-02-28 04:00:33.148495437 +0000

/images @at46.> md5sum seq.swi
7c2179135cea70a4da7e84bc0a299f09  seq.swi

/images @at46.> stat seq.swi
  File: `seq.swi'
  Size: 468380585       Blocks: 914816     IO Block: 4096   regular file
Device: 803h/2051d      Inode: 35127480    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-03-13 21:05:37.850790017 +0000
Modify: 2017-02-24 23:17:20.000000000 +0000
Change: 2017-02-28 04:00:33.148495437 +0000


/images @at46.> df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             19223252   8647436   9599332  48% /
tmpfs                  8139080        84   8138996   1% /dev/shm
/dev/sda3            1901713564 397742452 1407369616  23% /persist
/images @at46.>

The image directory is in /dev/sda3 mounted on /persist.

Any thoughts what could be the reason for this. We load the same file using yum install on different servers. We see this issue only on few servers.

Can this be a disk issue?

Anand
  • 11
  • 2
  • Thanks for editing the question and making it more readable. – Anand Mar 14 '17 at 17:31
  • 1
    Are you sure that the file isn't changing during this timeframe? Where is `/tmp` mounted (`tmpfs` / disk)? How large is the file? If you run `stat abc-m3.swi; md5sum abc-m3.swi` multiple times, does any of the `stat` output change when the hash changes? – Attie Mar 14 '17 at 17:58
  • Please update your original question, with the results in a code block to preserve formatting. – Attie Mar 14 '17 at 21:12
  • @Attie added to my original question – Anand Mar 14 '17 at 21:33
  • 1
    Is this question a better fit for Super User, Server Fault, or Unix & Linux? – pydsigner Mar 14 '17 at 21:48
  • Hmm... can you run: `cp ./seq.swi /dev/shm/A; sleep 5; cp ./seq.swi /dev/shm/B; diff -q /dev/shm/A /dev/shm/B; rm /dev/shm/{A,B}` – Attie Mar 14 '17 at 22:20

0 Answers0