Why is dd command limiting dummy file size at 2GB?

6.5k views Asked by At

I'm just curious about why the dd command is limiting the size of a dummy file to about 2.1GB

[aesteban@localhost ~]$ dd if=/dev/zero of=test.img bs=3G count=1
0+1 records in
0+1 records out
2147479552 bytes (2.1 GB) copied, 10.0044 s, 215 MB/s
[aesteban@localhost ~]$ ls -sh test.img 
2.0G test.img

I seen above I specified 3GB but the file is only 2.1GB, any ideas ?

Thanks

2

There are 2 answers

0
Sergey Sosnin On BEST ANSWER

I can suppose that that's a limitation of dd buffer size, just try to split it by setting bs=1Gb count=3

0
Dan Lowe On

In order to use files larger than 2GB, you need kernel support, filesystem support, and usually application support. If any of those requirements are not met, you can't exceed 2GB.

This answer from serverfault may be of help.