unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Curious unionfs-ro-mount for /gnu/store in installation-image
@ 2017-10-29 17:18 Hartmut Goebel
  2017-10-29 17:30 ` Tobias Geerinckx-Rice
  2017-10-31  1:56 ` Chris Marusich
  0 siblings, 2 replies; 4+ messages in thread
From: Hartmut Goebel @ 2017-10-29 17:18 UTC (permalink / raw)
  To: guix-devel

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

Hello,

immediately after booting the installation image (build according to [1]
and run according to [2]), the "mount" command spits out *two* unionfs
mounted points:

root@gnu ~# 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.

- unionfs is used twice only in the whole code:
    1) In gnu/build/linux-boot.scm (mount-root-files-ystem) to make a
unionfs root – this is our first case
    2) in gnu/system/install.scm (make-cow-store) – which is not started
yet.

- gnu/system/install.scm defines the system to be put into the
installation image. Thuns I thought it may be a file-system defined in
install.scm. But related to the store there is only %immutable-store,
which does not use unionfs a ro-bind-mount, not a unionfs.

- I tried to find some hint in the disk-image, but did not. I found
"shepherd-file-system--gnu-store.scm", which implements %immutable-store".

Any ideas where this second unionfs-mount comes from?

[1]
https://www.gnu.org/software/guix/manual/guix.html#Building-the-Installation-Image
[2]
https://www.gnu.org/software/guix/manual/guix.html#Installing-GuixSD-in-a-VM

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


[-- Attachment #2: 0xBF773B65.asc --]
[-- Type: application/pgp-keys, Size: 14855 bytes --]

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

* Re: Curious unionfs-ro-mount for /gnu/store in installation-image
  2017-10-29 17:18 Curious unionfs-ro-mount for /gnu/store in installation-image Hartmut Goebel
@ 2017-10-29 17:30 ` Tobias Geerinckx-Rice
  2017-10-29 17:45   ` Hartmut Goebel
  2017-10-31  1:56 ` Chris Marusich
  1 sibling, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2017-10-29 17:30 UTC (permalink / raw)
  To: h.goebel, guix-devel

Hartmut,

Hartmut Goebel wrote on 29/10/17 at 18:18:
> immediately after booting the installation image (build according to [1]
> and run according to [2]), the "mount" command spits out *two* unionfs
> mounted points:
[...]
> 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.

Running the same ‘mount’ command on my GuixSD returns a hint:

  nckx@apollo.tobias.gr ~$ mount
  /dev/mapper/root on / type ext4 (rw,relatime,data=ordered)
  /dev/mapper/root on /gnu/store type ext4 (ro,relatime,data=ordered)

> - gnu/system/install.scm defines the system to be put into the
> installation image. Thuns I thought it may be a file-system defined in
> install.scm. But related to the store there is only %immutable-store,
> which does not use unionfs a ro-bind-mount, not a unionfs.

I think this is all that's going on, and it's merely the output of
‘mount’ that's confusing you: the ‘ro’ bind mount ‘inherits’ the file
system type of the parent. In my example above, it's ext4. In yours,
it's fuse.unionfs.

Unless I'm missing something.

Kind regards,

T G-R

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

* Re: Curious unionfs-ro-mount for /gnu/store in installation-image
  2017-10-29 17:30 ` Tobias Geerinckx-Rice
@ 2017-10-29 17:45   ` Hartmut Goebel
  0 siblings, 0 replies; 4+ messages in thread
From: Hartmut Goebel @ 2017-10-29 17:45 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice, guix-devel

Am 29.10.2017 um 18:30 schrieb Tobias Geerinckx-Rice:
> I think this is all that's going on, and it's merely the output of
> ‘mount’ that's confusing you: the ‘ro’ bind mount ‘inherits’ the file
> system type of the parent. In my example above, it's ext4. In yours,
> it's fuse.unionfs.

IC, this is a plausible explanation. Thanks!

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: Curious unionfs-ro-mount for /gnu/store in installation-image
  2017-10-29 17:18 Curious unionfs-ro-mount for /gnu/store in installation-image Hartmut Goebel
  2017-10-29 17:30 ` Tobias Geerinckx-Rice
@ 2017-10-31  1:56 ` Chris Marusich
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Marusich @ 2017-10-31  1:56 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

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

Hi Hartmut!

Hartmut Goebel <h.goebel@crazy-compilers.com> 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:
>
> root@gnu ~# 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

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

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

end of thread, other threads:[~2017-10-31  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-29 17:18 Curious unionfs-ro-mount for /gnu/store in installation-image Hartmut Goebel
2017-10-29 17:30 ` Tobias Geerinckx-Rice
2017-10-29 17:45   ` Hartmut Goebel
2017-10-31  1:56 ` Chris Marusich

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).