unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Gábor Boskovits" <boskovits@gmail.com>
To: Matthew Brooks <matthewfbrooks@mailbox.org>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: How to declare a bind mount in the "file-systems" definition?
Date: Sun, 29 Mar 2020 11:36:57 +0200	[thread overview]
Message-ID: <CAE4v=pgsLZbBy5K8GadQyV-XcUphWMd3_sS40B2X=MU01HOf3A@mail.gmail.com> (raw)
In-Reply-To: <20200326101032.50ba3d9c@mailbox.org>

Hello,

I am glad that this finally worked!

Matthew Brooks <matthewfbrooks@mailbox.org> ezt írta (időpont: 2020.
márc. 26., Cs, 16:11):
>
> On Sun, 22 Mar 2020 18:12:10 -0400
> Leo Famulari <leo@famulari.name> wrote:
>
> > Looking in the manual for mentions of bind-mount I found the
> > documentation of %immutable-store, which is a bind-mounted filesystem
> > that exists by default in Guix System. It's implemented in
> > 'gnu/systems/file-systems.scm' and hopefully provides a helpful example:
> >
> > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/file-systems.scm?h=v1.0.1#n346
>
> Thanks! I was able to get it working from that example!
>
> For anyone else in the future who might want the info, here's what I did:
>
> first I had to define these two things before the operating system section:
>
> >(define data-drive
> >   (file-system
> >    (device (uuid "UUID goes here"))
> >    (mount-point "/path-to-spinning-disk-goes-here")
> >    (type "ext4")))
> >
> >(define (%tmp-directory) "/path-to-spinning-disk-goes-here/tmp")
>
> Then, in the file-systems list I added the following:
>
> >(file-systems (cons*
> >
> >                ...<other drives omitted for clarity>...
> >
> >                data-drive
> >
> >                (file-system
> >                 (device (%tmp-directory))
> >                 (mount-point "/tmp")
> >                 (type "none")
> >                 (flags '(bind-mount))
> >                 (dependencies (list data-drive))
> >                 )
> >
> >                %base-file-systems))
>

Could you consider adding an example to the cookbook?
I believe that would be a great addition.

Best regards,
g_bor
-- 
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21

  reply	other threads:[~2020-03-29  9:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  0:31 How to declare a bind mount in the "file-systems" definition? Matthew Brooks
2020-03-20  1:41 ` Leo Famulari
2020-03-21  4:14   ` Matthew Brooks
2020-03-22 22:12     ` Leo Famulari
2020-03-26 15:10       ` Matthew Brooks
2020-03-29  9:36         ` Gábor Boskovits [this message]
2020-03-29 20:01           ` Matthew Brooks
2020-04-08 16:52             ` Leo Famulari
2020-04-22 17:03               ` Matthew Brooks
2020-04-22 19:52                 ` Leo Famulari

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='CAE4v=pgsLZbBy5K8GadQyV-XcUphWMd3_sS40B2X=MU01HOf3A@mail.gmail.com' \
    --to=boskovits@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=matthewfbrooks@mailbox.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.
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).