GNU bug report logs -
#51345
dd with conv=fsync sometimes returns when its writes are still cached
Previous Next
Full log
Message #14 received at 51345 <at> debbugs.gnu.org (full text, mbox):
Sworddragon wrote:
> On Knoppix 9.1 with the Linux Kernel 5.10.10-64 x86_64 and GNU Coreutils
> 8.32 I wanted to overwrite my USB Thumb Drive a few times with random data
> via "dd if=/dev/random of=/dev/sdb bs=1M conv=fsync". While it usually
> takes ~2+ minutes to perform this action dd returned once after less than
> 60 seconds which made me a bit curious.
I suggest another try using oflag=direct instead of conv=fsync.
dd if=/dev/random of=/dev/sdb bs=1M oflag=direct
Also with rates status.
dd if=/dev/random of=/dev/sdb bs=1M oflag=direct status=progress
Here is the documentation for it.
‘oflag=FLAG[,FLAG]...’
‘direct’
Use direct I/O for data, avoiding the buffer cache. Note that
the kernel may impose restrictions on read or write buffer
sizes. For example, with an ext4 destination file system and
a Linux-based kernel, using ‘oflag=direct’ will cause writes
to fail with ‘EINVAL’ if the output buffer size is not a
multiple of 512.
Bob
This bug report was last modified 3 years and 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.