1

With:

  • Kubuntu 22.04
    ~ 8000 GB ~ 8TB Usb Hard Disk Drive
    ~ 15 hours for 8TB with each dd command

dd --version
dd (coreutils) 8.32

Ran dd ... urandom:
time sudo dd if=/dev/urandom of=/dev/sd_ bs=64K status=progress
output

8001557168128 bytes (8.0 TB, 7.3 TiB) copied, 53987 s, 148 MB/s 
dd: error writing '/dev/sda': No space left on device 
122094166+0 records in 
122094165+0 records out 
8001563221504 bytes (8.0 TB, 7.3 TiB) copied, 54057 s, 148 MB/s 

Ran dd ... zero:
time sudo dd if=/dev/zero of=/dev/sd_ bs=64K status=progress
output

8001543208960 bytes (8.0 TB, 7.3 TiB) copied, 53986 s, 148 MB/s 
dd: error writing '/dev/sda': No space left on device 
122094166+0 records in 
122094165+0 records out 
8001563221504 bytes (8.0 TB, 7.3 TiB) copied, 54057.4 s, 148 MB/s

For above 2 commands, it took almost the
same time ~ 53986 seconds ~ 15 hours.

Note the last line is the same 8001563221504 bytes.

But, first line of bytes are different:

+ 8001557168128 ~ 8000 GB, for urandom   
- 8001543208960 ~ 8000 GB, for zero   
---------------------------------------  
+      13959168 ~ 13.9 MB difference   

dd ... urandom output was over 13 MBytes more.

How come the dd output first line
differs by over 13 MB?

Said differently,
Why did bytes differ between above 2 commands:
dd ... urandom and dd ... zero?

Ramhound
  • 41,734
  • 35
  • 103
  • 130
joseph22
  • 157
  • 1
  • 9

1 Answers1

1

These "first lines" are progress lines that were constantly updating. They are there because of status=progress. What you see at the end is the last state of the progress line before each respective dd printed the No space left error, printed the usual summary (independent from status=progress) and exited.

In your case the lines only mean that:

  • in 53987 seconds the first dd copied 8001557168128 bytes,
  • in 53986 seconds the second dd copied 8001543208960 bytes.

By chance the last updates of the respective progress lines happened at these exact values of time and amount of data. The differences between the two cases are not important. A slight fluctuation could have resulted in slightly different values.

Eventually each dd managed to write 8001563221504 bytes. This is what matters. I guess the progress lines were updated about once per second, but in both cases the summary was printed more than 60 s after the last update of the respective progress line because of syncing.

Kamil Maciorowski
  • 69,815
  • 22
  • 136
  • 202
  • On a another topic to Kamil's answer ... there is a difference between above 2 outputs ```dd ... urandom``` has: no decimal point and no 1/10 second digit, but ```dd ... zero``` has it, example: ```54057 s,``` 148 MB/s for ```dd ... urandom``` and ```54057.4 s,``` 148 MB/s for ```dd ... zero``` Based on above output: ```dd ... urandom``` is running different code, different decimal precision, than ```dd ... zero``` – joseph22 Apr 12 '23 at 18:27