help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guixsd install questions


From: Ludovic Courtès
Subject: Re: guixsd install questions
Date: Sat, 01 Jul 2017 16:05:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Divan Santana <address@hidden> skribis:

> Ludovic Courtès <address@hidden> 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 address@hidden

I hope this is a bit clearer now!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]