I dual boot Windows and Linux, and have an NTFS partition that is spread across two disk partitions, which I set up using Windows' Dynamic Disks functionality. I can access this dynamic volume under linux by assembling a linear RAID array containing both partitions. Since I want this file system to be mounted at boot, I have it in /etc/fstab as /dev/md0, and run mdadm to assemble it. I can't add it to mdadm.conf since it isn't listed when I run mdadm --scan.
I read that you could write unit files for device nodes under systemd, so I went ahead and wrote one for /dev/md0. It doesn't work; the unit file times out during boot and I have to run the command manually in the 'emergency shell' before booting can continue.
The unit file sits at /etc/systemd/system/dev-md0.device, and its content is as follows:
Code: Select all
Description=Cria softraid de discos lineares
ExecStart=/sbin/mdadm --build --verbose /dev/md0 --chunk=64 --level=linear --raid-devices=2 /dev/disk/by-id/ata-ST3500418AS_9VM30NE5-part2 /dev/disk/by-id/ata-ST3500418AS_9VM30NE5-part1
I am really lost as for what I should do, since while there is documentation on what each entry on the unit file does, there really aren't many example files. Any ideas?