all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: mirai <mirai@makinata.eu>
To: 60246@debbugs.gnu.org
Subject: bug#60246: Inability to add pseudo-filesystem fstab entries
Date: Wed, 21 Dec 2022 21:19:34 +0000	[thread overview]
Message-ID: <ccb0ccf0-624c-b43f-cdce-8f0715e8eff2@makinata.eu> (raw)

An entry of the form:

--8<---------------cut here---------------start------------->8---
  (file-system
    (mount-point "/media/foo-mount")
    (create-mount-point? #t)
    (mount? #f)
    (device "none")
    (type "overlay")
    (flags '(no-atime no-dev no-suid no-exec read-only))
    (options (string-append "lowerdir="
                            (string-join '("/srv/foo/overlays/bar"
                                           "/srv/foo/overlays/baz") ":")))
    (check? #f))
--8<---------------cut here---------------end--------------->8---

Does not result in a fstab entry line, which makes it impossible to mount. According to Guix docs, this shouldn't be the case:

--8<---------------cut here---------------start------------->8---
mount? (default: #t)

    This value indicates whether to automatically mount the file system when the system is brought up. When set to #f, the file system gets an entry in /etc/fstab (read by the mount command) but is not automatically mounted.
--8<---------------cut here---------------end--------------->8---

Looking at gnu/services/base.scm there's this snippet:

--8<---------------cut here---------------start------------->8---
(define (file-system-fstab-entries file-systems)
  "Return the subset of @var{file-systems} that should have an entry in
@file{/etc/fstab}."
  ;; /etc/fstab is about telling fsck(8), mount(8), and umount(8) about
  ;; relevant file systems they'll have to deal with.  That excludes "pseudo"
  ;; file systems.
  ;;
  ;; In particular, things like GIO (part of GLib) use it to determine the set
  ;; of mounts, which is then used by graphical file managers and desktop
  ;; environments to display "volume" icons.  Thus, we really need to exclude
  ;; those pseudo file systems from the list.
  (remove (lambda (file-system)
            (or (member (file-system-type file-system)
                        %pseudo-file-system-types)
                (memq 'bind-mount (file-system-flags file-system))))
          file-systems))
--8<---------------cut here---------------end--------------->8---

That seems to remove such pseudo-fs entries, regardless of 'mount?' value.
This is not a "documentation" bug, as there are valid uses for having pseudo-fs entries.

Right now I'm trying to add an overlayfs mount that is layered over a NFS system and
Guix doesn't exactly deal very well with mounting NFS as it depends on networking. To sidestep this,
I am mounting the NFS volume through a simple-service that puts a dependency on networking.

From here the fstab problem begins: since it can't be mounted at boot "conventionally", it is set
as mount? #f with the intention to mount it later via "mount /media/foo-mount" after NFS volume is ready
but since this entry does not end up in /etc/fstab, there's no way to mount it.




             reply	other threads:[~2022-12-21 21:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 21:19 mirai [this message]
2022-12-21 22:50 ` bug#60246: Inability to add pseudo-filesystem fstab entries Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-12-21 23:37   ` mirai
2022-12-21 23:41     ` Tobias Geerinckx-Rice via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccb0ccf0-624c-b43f-cdce-8f0715e8eff2@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=60246@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.