Divan Santana <di...@santanas.co.za> skribis: > Ludovic Courtès <l...@gnu.org> writes:
[...] >> My guess is that you’d need to explicitly mark one of the mapped device >> as depending on the other; this cannot be guessed. >> >> If you run “guix system shepherd-graph” on your config you’ll probably >> see that there’s no such dependency. >> >> Currently dependencies among mapped devices cannot be expressed, but >> that’s easy to fix (by providing a ‘dependencies’ field as in >> ‘file-system’.) > > So I've tried altering the code and asked on IRC a while back too. I > tried some of the suggestions that were given but none of them worked. > > Would you be able to "spell out" for someone clueless what the code > should look like to express the dependencies. > > Currently the code looks like this > > (bootloader (grub-configuration (device "/dev/vdb"))) > (mapped-devices (list > (mapped-device > (source (list "/dev/vdb1" "/dev/vdc1")) > (target "/dev/md0") > (type raid-device-mapping)) > (mapped-device > (source (uuid "1c0f1601-97f4-4a3d-9528-cd76130ff919")) > (target "crypt") > (type luks-device-mapping)))) > (file-systems (cons (file-system > (device "/dev/mapper/crypt") > (title 'device) > (mount-point "/") > (type "ext4")) > %base-file-systems)) You can have your file system depend on the two mapped devices like this: (file-systems (cons (file-system (device "/dev/mapper/crypt") (title 'device) (mount-point "/") (type "ext4") (dependencies mapped-devices)) %base-file-systems)) What *cannot* be expressed yet is dependencies among mapped devices. For that we need to extend the <mapped-device> record with a ‘dependencies’ field like <file-system> does. You’re welcome to start working on it if you feel like it (and I’d be happy to help!) and/or submit it to bug-g...@gnu.org. I hope this is a bit clearer now! Ludo’.