Sample Header Ad - 728x90

did `dd` buffer entire ~700MB iso image?

0 votes
0 answers
128 views
I read that to transfer an iso image to a pendrive and print progress I should execute pipeline below.
$ dd if=$IMG bs=4M | pv -s 668M | sudo dd of=/dev/sdc bs=4M
pv should print and update a progress bar in terminal. However, my progress bar jumped to 100% and the command hanged. I could not kill the dd writing to the pendrive so I looked under the hood. journal
Jan 13 01:57:32 nixos systemd: systemd-udevd.service: Watchdog timeout (limit 3min)!
Jan 13 01:57:32 nixos systemd: systemd-udevd.service: Killing process 1830 (systemd-udevd) with signal SIGABRT.
Jan 13 01:57:54 nixos sudo: pam_unix(sudo:session): session closed for user root
Jan 13 01:57:54 nixos kernel:  sdc: sdc1 sdc2
iotop
TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND                                                                                       
   1830 be/4 root        0.00 B/s    0.00 B/s  0.00 % 99.99 % systemd-udevd
   3788 be/4 root        0.00 B/s    0.00 B/s  0.00 % 99.99 % dd of=/dev/sdc bs=4M
      8 be/4 root        0.00 B/s    0.00 B/s  0.00 % 99.99 % [kworker/u64:0+flush-8:32]
I tried with sudo or as root. Same effect. pv shows 100% immediately but dd of=... blocks for about 3 minutes. That is not consistent with what I read on the internet and saw myself on other machines. What happened? PS.
$ sudo hdparm -W /dev/sdc

/dev/sdc:
 write-caching = not supported
PPS. Tried status=progress - same effect (100% and hangs until write is complete).
Asked by lord.didger (164 rep)
Jan 17, 2022, 11:39 PM