I have two disks, /dev/sda and /dev/sdb which are identical in size. The dd utility only deals with a single input and output file. To move all data between these drives so that sda contains all data that used to be on sdb and vice-versa, one would typically make a full backup of one of the disks and perform two clones. Is it possible to accomplish this in a single step?
To illustrate, this reminds me of doing:
flip_these_around(a, b)
as opposed to:
temp = a
a = b
b = temp
I’m prepared to write a utility to automate this process and provide fault tolerance—however, there may be another way for the OS to work with block devices which I have been unable to find the correct term for.