So, I clone lots of Windows-based NTFS drives from images each day and I'm halfway through a project that could potentially help me and others to speed up this process dramatically.
I currently have a set up of Ubuntu 17.10 with mdadm and 16 SATA ports. The idea is to connect drives to each of the SATA ports and do a simultaneous clone to each at once.
If I use dd on one drive at a time, I can get a result of around ~135MB/s (max ~180MB/s) but as soon as I start cloning other drives at the same time, the speed reduces considerably.
Same thing happens with dcfldd which has the added bonus of being able to specify multiple of=
outputs.
Now... initially I had the idea to utilise a RAID1 array containing all of the drives I wish to clone at once. However, there seems to be some inconsistencies with the architecture of RAID and the usability of the drives after cloning.
Here's what I've tried so far: I can create an array of multiple drives using mdadm and then proceed to run sudo dd if=/home/clone/some_image.img of=/dev/md0 bs=4096
This process seems to run absolutely fine and with brilliant speed results (~110Mb/s for every drive at once). After the process has finished, the drives do not appear to contain the data we just wrote to them. My next step would be to zero the superblock on the drives in the hopes of reverting them back to usable drives, this does not seem to work either.
I have even tried creating a new array using an older superblock version (from 1.2 to 0.9) but this yields the same results as before.
It is as if the drives will only ever be accessible via mdadm regardless of the data stored on them, which makes this idea fail completely, even though the initial results were so promising.
So I pose these questions to you: Is there any way of writing an image to a RAID1 array and then turning back into single disks? Are there any other technologies that will allow me to have the speed benefits of cloning to RAID1 but without using RAID or the necessity of third-party tools in order to mount the drives?
Thank you so very much for reading this.