S
S
syxoi2017-09-14 12:45:26
linux
syxoi, 2017-09-14 12:45:26

UNIX: How to perform operations on a read/write file in parallel?

The question sounds strange, I know.
On the subject: let's say I create a partition / disk dump using dd, then how to make sure that the checksum of the future file is immediately calculated for a certain amount read (so that the "hasher" does not have to re-read all the data from the media, and if the file 500 GB each?) If you run the process in parallel, then it will read what is (it will not wait).
Or, let's say, I'm backing up to two (or more) disks, then I need to first copy to one disk, then to the second, and so on, i.e. constantly re-read data from the 1st disk, but you need to read a certain amount and immediately write to several disks (do not offer an array, this is just an example), and simultaneous copying will greatly reduce the speed of the hard disk.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexander, 2017-09-14
@beza2000

The task is bad, but did not check - use tee:

dd if=someting bs=1M | tee file1 | tee file2 | ...
dd if=/dev/sda bs=1M | tee /dev/sdb | tee /dev/sdc | ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question