It was pointed out to me that linux's dd has a oflag=nonblock and a iflag=nonblock option to invoke non-blocking I/O.
I don't know why linux allows non-blocking I/O on the input file. It never makes any sense to have non-blocking I/O in the input file, The read has to complete before the write can take place. All it would do is complicate the program flow. -----Original Message----- From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of Ted Unangst Sent: Wednesday, June 11, 2014 2:11 PM To: Peter Fraser Cc: 'misc@openbsd.org' Subject: Re: Duplicating a disk On Wed, Jun 11, 2014 at 17:45, Peter Fraser wrote: > To duplicate a disk I used the following: > > dd if=/dev/rsd2c of=/dev/rsd3c bs=32M seek=1 skip=1 conv=noerror > > the bs=32M was picked because it was a large size, and the machine has > lots of free memory. > > Watching the machine I could see the disk activity lights blinking > alternately about once a second and looks like, what I would expect, > that dd does blocking I/O. > > Is there any method of coping a disk or partition, or even a file that > uses non-blocking I/O?