I have my system all set up on a pair of older NVMe drives and I have a new pair of PCIe 4.0 drives coming in today. My motherboard will support all four drives. Is there a way to clone the arrays, which will be equal in size? Created with MDADM when installing Ubuntu server which I converted to a workstation.
51 Answer
Caveat: I am running a brand new Asus Z590 motherboard and 11900k 11th gen CPU.
This IS possible but I did not fully do it because when I tried my Parted Magic USB would not boot up. AFTER I just did a clean install on my new M.2 drive array I decided to tinker around. I was able to boot a Ubuntu usb by choosing "safe graphic" (there is still an issue with Ubuntu and this new hardware)
From there:
1)install mdadm then run "sudo mdadm --assemble md0" to assemble the one existing array I had installed in the live environment.
install gparted and clonezilla (sudo apt install)
Fire up gparted and check for the array
Fire up clonezilla. I elected to make an image of my array to another drive. Since I can make an image of an array it is only logical I could also clone an image onto an array. I may still try that and/or just clone array to array to prove it can be done even though I now have no need (clean install)
Now this presents one BIG problem. When you clone software raid arrays you are only cloning the raid partitions on the physical disks, this means the boot-efi partition would NOT be cloned. What I would recommend is when you create the new array FIRST make a 512mb fat partition on each THEN make your raid partitions and build your array. I would then clone your original boot-efi partition to one of these partitions in the new array. I prefer to put my boot-efi on the first drive. Since it's efi you could just copy the files over as well I suppose.
So the answer yes it seems entirely possible and when I get time I will do it just to prove it can be done. My motherboard supports 4 M.2 drives so hardware is not an issue for me.
It is VITAL you install mdadm first and reassemble your array(s) otherwise clonezilla will NOT recognize them. OR, and I won't test this, you could just clone drive for drive ie raid A drive 0 to Raid B drive 0 and raid A drive 1 to raid B drive 1. I see no reason that would not work assuming all drives are the same size.
!!! In before the naysayers !!!
I KNOW raid 0 is risky and software raid 0 is riskier still! I have a 12tb REAL raid array running on a server card for data in this machine with SSD caching and 6 HDDs in Raid 5. My home directory rsync's to a separate M.2 nightly and from there to the big raid weekly, rotating every 8 weeks. I also have an install script I keep updated to make installs go quickly. I just happen to like the performance of really fast OS drives. I cut my teeth back in the old days on ultrawide SCSI drive arrays, then ultra2, ultra160, ultra320 and eventually hardware SATA/SAS arrays. I actually beta tested for Microsoft several Win2k service packs and some experiemental drivers allowing me to run 8 SCSI drives for my OS in raid 0, boy I thought that was fast at the time!