unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices
@ 2023-09-15 18:27 Lars Rustand
  2023-09-18 12:24 ` Csepp
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Rustand @ 2023-09-15 18:27 UTC (permalink / raw)
  To: 66014

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

Setting up a RAID array using UUIDs does not work.

The following mapped-devices block works:

  (mapped-devices
    (list
      (mapped-device
        (source (list "/dev/nvme0n1p2" "/dev/nvme1n1p3"))
        (target "/dev/md0")
        (type raid-device-mapping))))

But this one fails:

  (mapped-devices
    (list
      (mapped-device
        (source (list (uuid "a07c54da-eb61-4135-86b8-8791e863e46a") (uuid "c40026af-ace9-47fc-9d3f-4b8d6a2219cb")))
        (target "/dev/md0")
        (type raid-device-mapping))))

The error message I get is guix system: error: #<<uuid> type: dce bv: #vu8(160 124 84 218 235 97 65 53 134 184 135 145 232 99 228 106)>: invalid G-expression input

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices
  2023-09-15 18:27 bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices Lars Rustand
@ 2023-09-18 12:24 ` Csepp
  2023-09-18 21:47   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Csepp @ 2023-09-18 12:24 UTC (permalink / raw)
  To: Lars Rustand; +Cc: 66014


Lars Rustand <rustand.lars@gmail.com> writes:

> [[PGP Signed Part:Undecided]]
> Setting up a RAID array using UUIDs does not work.
>
> The following mapped-devices block works:
>
>   (mapped-devices
>     (list
>       (mapped-device
>         (source (list "/dev/nvme0n1p2" "/dev/nvme1n1p3"))
>         (target "/dev/md0")
>         (type raid-device-mapping))))
>
> But this one fails:
>
>   (mapped-devices
>     (list
>       (mapped-device
>         (source (list (uuid "a07c54da-eb61-4135-86b8-8791e863e46a") (uuid "c40026af-ace9-47fc-9d3f-4b8d6a2219cb")))
>         (target "/dev/md0")
>         (type raid-device-mapping))))
>
> The error message I get is guix system: error: #<<uuid> type: dce bv: #vu8(160 124 84 218 235 97 65 53 134 184 135 145 232 99 228 106)>: invalid G-expression input
>
> [[End of PGP Signed Part]]

Would it be possible to use /dev/disk/by-uuid paths instead of uuid
objects for these?  I think this big "typeof" based dynamic dispatch
that we're using in Scheme is erm, not very robust, to put it mildly.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices
  2023-09-18 12:24 ` Csepp
@ 2023-09-18 21:47   ` Ludovic Courtès
  2023-09-19 10:48     ` Csepp
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2023-09-18 21:47 UTC (permalink / raw)
  To: Csepp; +Cc: 66014, Lars Rustand

Hi,

Csepp <raingloom@riseup.net> skribis:

> Lars Rustand <rustand.lars@gmail.com> writes:

[...]

>> But this one fails:
>>
>>   (mapped-devices
>>     (list
>>       (mapped-device
>>         (source (list (uuid "a07c54da-eb61-4135-86b8-8791e863e46a") (uuid "c40026af-ace9-47fc-9d3f-4b8d6a2219cb")))
>>         (target "/dev/md0")
>>         (type raid-device-mapping))))
>>
>> The error message I get is guix system: error: #<<uuid> type: dce bv: #vu8(160 124 84 218 235 97 65 53 134 184 135 145 232 99 228 106)>: invalid G-expression input
>>
>> [[End of PGP Signed Part]]
>
> Would it be possible to use /dev/disk/by-uuid paths instead of uuid
> objects for these?

Depends: /dev/disk/by-uuid is populated by eudev, which is not running
at the time initrd code runs; IOW it’s OK to use /dev/disk/by-uuid if
and only if the mapped device is not “needed for boot”.

> I think this big "typeof" based dynamic dispatch that we're using in
> Scheme is erm, not very robust, to put it mildly.

Yeah, it’s not great.  What would you suggest?

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices
  2023-09-18 21:47   ` Ludovic Courtès
@ 2023-09-19 10:48     ` Csepp
  0 siblings, 0 replies; 4+ messages in thread
From: Csepp @ 2023-09-19 10:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 66014, Lars Rustand, Csepp


Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Csepp <raingloom@riseup.net> skribis:
>
>> Lars Rustand <rustand.lars@gmail.com> writes:
>
> [...]
>
>>> But this one fails:
>>>
>>>   (mapped-devices
>>>     (list
>>>       (mapped-device
>>>         (source (list (uuid "a07c54da-eb61-4135-86b8-8791e863e46a") (uuid "c40026af-ace9-47fc-9d3f-4b8d6a2219cb")))
>>>         (target "/dev/md0")
>>>         (type raid-device-mapping))))
>>>
>>> The error message I get is guix system: error: #<<uuid> type: dce bv: #vu8(160 124 84 218 235 97 65 53 134 184 135 145 232 99 228 106)>: invalid G-expression input
>>>
>>> [[End of PGP Signed Part]]
>>
>> Would it be possible to use /dev/disk/by-uuid paths instead of uuid
>> objects for these?
>
> Depends: /dev/disk/by-uuid is populated by eudev, which is not running
> at the time initrd code runs; IOW it’s OK to use /dev/disk/by-uuid if
> and only if the mapped device is not “needed for boot”.
>
>> I think this big "typeof" based dynamic dispatch that we're using in
>> Scheme is erm, not very robust, to put it mildly.
>
> Yeah, it’s not great.  What would you suggest?
>
> Ludo’.

I guess MyPy-for-Guile is a bit out of scope for now, so the next best
way to catch these would be property based testing.
As for implementing them, can't we use Guile's generics, or model
something on Clojure's generics?  Something that lets client code add
implementations to an interface.  Although that might have some security
implications.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-19 10:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-15 18:27 bug#66014: Unable to use UUIDs to construct RAID array in mapped-devices Lars Rustand
2023-09-18 12:24 ` Csepp
2023-09-18 21:47   ` Ludovic Courtès
2023-09-19 10:48     ` Csepp

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).