Subject: bug#12626: Bug?: dd limited to <2G read size (2G-8K) on 64 bit machine?

From: Linda Walsh <[email-masked]>
Date: Thu, 11 Oct 2012 23:39:16 -0700

Paul Eggert wrote:
> On 10/11/2012 08:11 PM, Linda Walsh wrote:
>   
>> I find that if I try to use a read size of > (2G-8K), I get partial read errors.
>>     
>
> My guess is that it's your kernel, or maybe your
> file system, and not dd per se.  Try running 'strace'.
>   

open("/dev/Home+Space/Home", O_RDONLY|O_DIRECT) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
lseek(0, 0, SEEK_CUR)                   = 0
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
dup2(3, 1)                              = 1
close(3)                                = 0
mmap(NULL, 2147495936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0x7f1e5efae000
read(0, 
"XFSB\0\0\20\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
2147483648) = 2147479552
read(0, 
"XFSB\0\0\20\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
2147483648) = 2147479552
write(1, 
"XFSB\0\0\20\0\0\0\0\0\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
2147479552) = 2147479552
read(0, "   this.context.sourceBoxHighlig"..., 2147483648) = 2147479552
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/coreutils.mo", 
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) 
= -1 ENOENT (No such file or directory)
----

Maybe has something to do with lvm...am guessing...I was trying to dd 
read from an lvm device raw....

I'll look into it...but I'm not even getting error messages if I try to 
do 4G @ a time...

dd if=/dev/Home+Space/Home bs=2G count=4 of=/dev/null iflag=direct
dd: warning: partial read (2147479552 bytes); suggest iflag=fullblock
0+4 records in
0+4 records out
8589918208 bytes (8.6 GB) copied, 9.1148 s, 942 MB/s
dd if=/dev/Home+Space/Home bs=4G count=2 of=/dev/null iflag=direct
dd: warning: partial read (2147479552 bytes); suggest iflag=fullblock
0+2 records in
0+2 records out
4294959104 bytes (4.3 GB) copied, 5.4533 s, 788 MB/s
dd if=/dev/Home+Space/Home bs=8G count=1 of=/dev/null iflag=direct
0+1 records in
0+1 records out
2147479552 bytes (2.1 GB) copied, 3.58152 s, 600 MB/s
...

The larger the block size asked for... the smaller I got???