GNU bug report logs - #7478
Puzzled by dd

Previous Next

Package: coreutils;

Reported by: 庄钦平 <cauccyu1980 <at> 126.com>

Date: Thu, 25 Nov 2010 04:09:02 UTC

Severity: normal

Done: P��draig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7478 in the body.
You can then email your comments to 7478 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#7478; Package coreutils. (Thu, 25 Nov 2010 04:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 庄钦平 <cauccyu1980 <at> 126.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 25 Nov 2010 04:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 庄钦平 <cauccyu1980 <at> 126.com>
To: bug-coreutils <at> gnu.org
Subject: Puzzled by dd
Date: Thu, 25 Nov 2010 11:53:44 +0800 (CST)
[Message part 1 (text/plain, inline)]
According to the partition table, the partition sda1 starts from sector 64, so the following two command lines will get same files:
1) dd if=/dev/sda1 of=f1 bs=1M count=32
2) dd if=/dev/sda of=f2 bs=512 count=65536 skip=63
It works and both of them get the same 32M raw data(md5sum f1 f2 get same checksum). But after some operations on the 32M in sda1(I'm running LVM tests, it only changes the 32M contents in the beginning of sda1, and maybe the LVM module reworked doesn't work well), it fails. Even if I dd 32M from /dev/zero(dd if=/dev/zero of=/dev/sda1 bs=1M count=32) and run above two commands, I get f1 and f2 with different checksum. WHY???
[Message part 2 (text/html, inline)]

Reply sent to P¨¢draig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Fri, 26 Nov 2010 00:12:02 GMT) Full text and rfc822 format available.

Notification sent to 庄钦平 <cauccyu1980 <at> 126.com>:
bug acknowledged by developer. (Fri, 26 Nov 2010 00:12:02 GMT) Full text and rfc822 format available.

Message #10 received at 7478-done <at> debbugs.gnu.org (full text, mbox):

From: P¨¢draig Brady <P <at> draigBrady.com>
To: ׯÇÕÆ½ <cauccyu1980 <at> 126.com>
Cc: 7478-done <at> debbugs.gnu.org
Subject: Re: bug#7478: Puzzled by dd
Date: Fri, 26 Nov 2010 00:15:57 +0000
On 25/11/10 03:53, ׯÇÕÆ½ wrote:
> According to the partition table, the partition sda1 starts from sector 64, so the following two command lines will get same files:
> 1) dd if=/dev/sda1 of=f1 bs=1M count=32
> 2) dd if=/dev/sda of=f2 bs=512 count=65536 skip=63
> It works and both of them get the same 32M raw data(md5sum f1 f2 get same checksum). But after some operations on the 32M in sda1(I'm running LVM tests, it only changes the 32M contents in the beginning of sda1, and maybe the LVM module reworked doesn't work well), it fails. Even if I dd 32M from /dev/zero(dd if=/dev/zero of=/dev/sda1 bs=1M count=32) and run above two commands, I get f1 and f2 with different checksum. WHY???

I very much doubt an issue with dd.
Your commands look valid, so I'm guessing some
kernel caching issue. I'd suggest doing a binary comparison
of the data, rather than comparing the hashes.

I'm closing this bug, and we can reopen
if you do find dd to be at issue.
If you still suspect dd, then we'll need version info
and straces of both commands.

cheers,
P¨¢draig.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Dec 2010 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.