[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Curious unionfs-ro-mount for /gnu/store in installation-image
From: |
Chris Marusich |
Subject: |
Re: Curious unionfs-ro-mount for /gnu/store in installation-image |
Date: |
Mon, 30 Oct 2017 18:56:37 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Hartmut!
Hartmut Goebel <address@hidden> writes:
> immediately after booting the installation image (build according to [1]
> and run according to [2]), the "mount" command spits out *two* unionfs
> mounted points:
>
> address@hidden ~# mount
> unionfs on / type fuse.unionfs (rw,…)
> unionfs on /gnu/store type fuse.unionfs (ro,…)
>
> The first one ("/") is easy to explain: It is created by
> gnu/build/linux-boot.scm (mount-root-file-system) if #:volatile-root is
> true.
>
> But I'm curious, where the second one comes from. I've been searching
> this for two or three hours now and did not find, where this is defined.
The second one is a read-only bind-mount of the store. The fact that
this exists is mentioned in the manual in the section titled "File
Systems"; look there for the string "%immutable-store". Do 'grep -r
%immutable-store .' from the Guix source root directory, and you will
find where it is used - in particular:
* gnu/system/file-systems.scm - here, the variable %immutable-store is
is defined with parameters that cause this file system to be
bind-mounted. The mechanism by which the bind-mounting occurs is
defined elsewhere, but this might be what you were looking for.
* gnu/system/install.scm- here, the %immutable-store is used to
construct the definition of the installation image.
Hope that helps! For the record, I was able to find this information
because I knew that this was a "bind mount" to begin with. So I did a
'grep -ir bind.*mount' and a 'grep -ir mount.*bind' in the Guix source
root directory and followed the clues from there. The mount output by
itself is cryptic if you don't already know about bind mounts.
Chris
signature.asc
Description: PGP signature