Subject: Re: [bug#41143] [PATCH 2/2] mapped-devices: Add 'lvm-device-mapping'

From: Ludovic Courtès <[email-masked]>
Date: Wed, 09 Sep 2020 22:48:22 +0200

tsmish <[email-masked]> skribis:

> "vgscan --mknodes" is a bit of a hack. Everyone else relies on udev to
> create files in /dev/mapper, but since initrd doesn't have working
> udevd, they need to be created this way.

Oh, I guess that’s fine.  Could you place this as a comment above the
“vgscan” invocation?

> Also, while this code is able to boot from root on LVM, grub in
> current configuration can't find required files, This can be fixed by
> placing (format port "insmod lvm") in grub configuration builder, but
> this is somewhat hacky.

Uh, future work.  :-)

> +(define (open-lvm-device source target)
> +  #~(begin
> +       (use-modules
> +        (srfi srfi-1)
> +        (srfi srfi-26))

Since this gets spliced into the initrd expression (not at the top
level), we cannot have ‘use-modules’ here (well, it may not work as
expected, as you found out with srfi-26 macros).

I’d suggest adding (srfi srfi-1) to the ‘use-modules’ form in
‘raw-initrd’, in (gnu system linux-initrd), so you can rely on it
(srfi-26 is already there).

It would be great to have a system test for LVM support.  We have tests
for Btrfs, RAID with mdadm, etc., but these are system installation
tests in (gnu tests install).  Do you think we could have either an
installation test or maybe a less expensive test for LVM?

Thanks for your work!

Ludo’.