I attended the monthly Central PA Linux Users Group meeting again this month. Doug talked about software RAID in Linux. He went through all the trouble of building a 3TB array during his talk and this sent me scouring for an virtual disk solution.
I remembered a ZFS tutorial which made use of several file backed disks to allow experimentation with the file system, to learn the commands, etc. (ZFS Tutorial 1) If you click through to that tutorial, you’ll see they make use of Solaris command ‘mkfile’. As this is not included with Linux, I had to dig around for another way to make a disk like file. Read enough books on virtual machines and you’re bound to remember something about using ‘dd’ to create virtual disks. That problem solved.
The next issue I ran into was that ‘mdadm’ did not like these raw disks. So I tried a couple things until, after too long, I found prior art using loopback devices. That now fixed, viola, RAID-6 array built from 6 100MB virtual drives. Heck of a lot easier to blow away and rebuild.
After figuring out the whole process now, I finally know enough search terms to get Google to give me just the result I wanted from the start. This blog post (Stupid RAID Tricks with EVMS and mdadm) gives a step-by-step walk through of setting up and managing RAID. I haven’t had time yet tonight to go through it, but I will do so and post back here with my own take on it. That post is 4 years old (some recent comments though) so I’m certain some things have changed since it was originally posted.