On 02/20/2015 11:04 AM, Sami Kerola wrote:
Is there a reason why

$ dd if=/dev/zero count=1 of=/tmp/a of=/tmp/b

could not be made to write to two, or any number of of= destinations,
in single execution?

Because we have tee(1)

dd if=$SOURCE $I_OPTS \
  | tee \
      >( dd $O_OPTS of=$TARGET1 ) \
      >( dd $O_OPTS of=$TARGET2 ) \
      >( dd $O_OPTS of=$TARGET3 ) \
      >( dd $O_OPTS of=$TARGET4 )

Getting the errors of the writing dd processes would
be a bit hard though.

Anyway, this doesn't avoid the IO bottleneck, it just avoids
to read $SOURCE n-times.  IMO having more than 3-4 dd's in
parallel is only slowing down the whole process. Maybe the
'nochache' flag could help to avoid flooding the system cache
at least.

Have a nice day,
Berny



Reply via email to