GNU bug report logs - #9191
dd does not use the given block size > 2GB

Previous Next

Package: coreutils;

Reported by: Ole Tange <tange <at> gnu.org>

Date: Thu, 28 Jul 2011 19:12:06 UTC

Severity: normal

Full log


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

From: Ole Tange <tange <at> gnu.org>
To: bug-coreutils <at> gnu.org
Subject: dd does not use the given block size > 2GB
Date: Thu, 28 Jul 2011 17:11:11 +0200
Hi Coreutils.

$ ./dd if=/dev/zero of=/dev/null bs=2G

gives the following in 'top':

23182 tange     20   0 2058m 2.0g  616 R  100 25.8   0:25.13 dd

So it actively uses 2 G. This is exactly what I would expect.

However, if I use 10G it mallocs 10 G but only uses 2 G:

$ ./dd if=/dev/zero of=/dev/null bs=10G

Apparently all I need to do is:

 ./dd iflag=fullblock if=/dev/zero of=/dev/null bs=10G

But for a normal user (indeed for me before I read the source) this
comes as a surprise.

I would like to suggest that if bs is bigger than the used block, then
you get a warning like this:

dd: given bs=10G but used bs=2G. To force using 10G use 'iflag=fullblock'

Also the man page should refer to 'iflag=fullblock' under 'bs' and 'ibs'.

$ ./dd --version
dd (coreutils) 8.12
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, and Stuart Kemp.


/Ole




This bug report was last modified 13 years and 331 days ago.

Previous Next


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