Andreas Enge writes: > the attached patch adds RAID support to our mapped device mechanism. > > To give more explanation: > Like for LUKS devices or file systems, the RAID itself needs to be created > during installation, after booting from the USB key: > mdadm --create /dev/md0 --level=raid10 --layout=f2 \ > --raid-devices=2 /dev/sda2 /dev/sdb2 > (wait 12 hours or so for 4 TB disks) > mkfs.ext4 /dev/md0 > > Then one adds a mapped-device of type raid-device-mapping, adds the > raid10 kernel module to the initrd and can boot from the RAID device. > The mapped-device mechanism calls "mdadm --assemble" and "mdadm --stop". > > I might write a more detailed blog post about this; there is a little > subtlety with the non-automatic determination of dependencies between > devices, so one needs to make sure that the partitions to be assembled > are present before the mdadm command is executed. Thanks. Starting with baby steps, I am running GuixSD system from a separate drive and adding raid1 array with 2 new disks. I created an array that will assemble like so... g1@g1 ~$ sudo mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 mdadm: /dev/md0 has been started with 2 drives. g1@g1 ~$ cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdc1[0] sdb1[1] 239809536 blocks super 1.2 [2/2] [UU] bitmap: 0/2 pages [0KB], 65536KB chunk I added this to my config (system25.scm attached) ... (operating-system [...] (initrd (lambda (fs . args) (apply base-initrd fs #:extra-modules '("raid1") #:mapped-devices '((mapped-device (source (list "/dev/sdb1" "/dev/sdc1")) (target "/dev/md0") (type raid-device-mapping))) args))) [...] I rebooted and the array is not assembled ;-( g1@g1 ~$ cat /proc/mdstat Personalities : [raid1] unused devices: /var/log/messages contains ... [...] Jul 30 18:09:59 localhost vmunix: [ 1.872801] md: raid1 personality registered for level 1 [...] Any suggestions, corrections or a sample working config would be most welcome. TIA - George