I inserted the two drives in the Dom0 system, where they appeared as /dev/sda and /dev/sdb. I used fdisk to set their types to FD = Linux raid autodetect. Next, I assigned them to the DomU:
# virsh attach-disk valkyrie /dev/sda hdcFrom DomU, define the raid
# virsh attach-disk valkyrie /dev/sdb hdd
# fdisk -l 2>/dev/null | grep "/dev/hd.1"Mount per SOP.
/dev/hdc1 1 489 31270+ fd Linux raid autodetect
/dev/hdd1 1 489 31270+ fd Linux raid autodetect
# mdadm -C /dev/md0 -l 1 -n 2 /dev/hdc1 /dev/hdd1
mdadm: /dev/hdc1 appears to contain an ext2fs file system
size=31268K mtime=Fri Feb 9 13:12:40 2007
mdadm: /dev/hdd1 appears to contain an ext2fs file system
size=31268K mtime=Fri Feb 9 13:12:40 2007
Continue creating array? y
mdadm: array /dev/md0 started.
# mke2fs -j /dev/md0
Unfortunately, this is not persistant across reboots. For this, we need to edit the VM's config file and change the disk line to include:
disk = [ "tap:aio:/xen/valkyrie.img,xvda,w",That should get it.
"phys:/dev/sda,hdc,w",
"phys:/dev/sdb,hdd,w"
]