GNU bug report logs - #44196
Problems with /gnu/store in a different btrfs subvolume

Previous Next

Package: guix;

Reported by: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>

Date: Sat, 24 Oct 2020 17:58:01 UTC

Severity: normal

Tags: patch

Done: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #69 received at 44196 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com>
Cc: 44196 <at> debbugs.gnu.org
Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to
 boot-parameters.
Date: Mon, 02 Nov 2020 17:06:45 +0100
Hi!

Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>> Could you explain why we need ‘store-directory-prefix’ in addition to
>> ‘store-mount-point’?  At first sight, looking at the fields in there,
>> these two can seem to be synonymous.
>
> The difference is subtle unless you use btrfs subvolumes... or bind
> mounts, which currently probably would fail as the check is only
> performed for btrfs partitions---note to self, think about this and
> probably prepare a patch.  This check was already implemented, but the
> parameter was only provided to grub-configuration-file during
> init/reconfigure.
>
> Should I add an explanation of/link the bug on the commit message?  Or
> maybe is something like this better?
> ----
> ;; Mount point of the store device (as in /etc/fstab's second field)
> (store-mount-point boot-parameters-store-mount-point)
> ;; Actual path of the store inside of the device at boot time.
> (store-directory-prefix boot-parameters-store-directory-prefix)
> ----
>
> In any case, if that doesn't clarify enough, it can be better understood
> with an example:
> -----
> Disk configuration:
> /dev/xda1: btrfs file system
>   - /rootfs: subvolume mounted on /
>   - /gnufs: subvolume mounted on /gnu.
>
> Therefore the serialized boot-parameters should be:
> (boot-parameters
>   ...
>   (store
>     (device "/dev/xda1")
>     (mount-point "/gnu")
>     (directory-prefix "/gnufs"))
>   ...)
> -----

(Btrfs no0b here.)  Does that mean that /gnu is like a bind-mount of
/gnufs in this case?

Anyway, I think I got it now, but I feel I’ll have to search again for
this example next time I stumble upon it.  ;-)

> Writing the last email I though about adding this:
> ------------------------------------------------------------------------------
>    ;; OS's root file system, so it might be a device path like "/dev/sda3".
> +  ;; The 'store-directory-prefix' field contains #f or the actual path of
> +  ;; the store inside the 'store-device' as seen by GRUB, e.g. it would
> +  ;; contain "/storefs" if the store is located in that subvolume of a btrfs
> +  ;; partition.
>    (root-device      boot-parameters-root-device)
>    (bootloader-name  boot-parameters-bootloader-name)
>    (bootloader-menu-entries                        ;list of <menu-entry>
>     boot-parameters-bootloader-menu-entries)
>    (store-device     boot-parameters-store-device)
>    (store-mount-point boot-parameters-store-mount-point)
> +  (store-directory-prefix boot-parameters-store-directory-prefix)
> ------------------------------------------------------------------------------

s/path/file name/, but otherwise LGTM.

Thanks for working on these changes!

Ludo’.




This bug report was last modified 4 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.