From: bbb ee <blasforr@gmail.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: help-guix@gnu.org
Subject: Re: guix shell: error: mount: Invalid argument
Date: Sat, 19 Nov 2022 20:17:44 +0100 [thread overview]
Message-ID: <CALNLCmWLDnpJewyZivMhYSKq=eikxy3riHFcRvtoiOE1junT+g@mail.gmail.com> (raw)
In-Reply-To: <87fsef9nds.fsf@nckx>
/tmp, /, $HOME are in same partition. But only subdir of /tmp are mountable:
```
dev_1@dev_1 /tmp/test2$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p7 209921236 180793652 19663932 91% /
dev_1@dev_1 /tmp/test2$ guix shell --container coreutils -- echo Elmo
Elmo
dev_1@dev_1 /tmp/test2$ cd /tmp/
dev_1@dev_1 /tmp$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p7 209921236 180793720 19663864 91% /
dev_1@dev_1 /tmp$ guix shell --container coreutils -- echo Elmo
Elmo
dev_1@dev_1 /tmp$ cd /
dev_1@dev_1 /$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p7 209921236 180793808 19663776 91% /
dev_1@dev_1 /$ guix shell --container coreutils -- echo Elmo
guix shell: error: mount: mount "/" on "/tmp/guix-directory.fKcwvT//":
Invalid argument
dev_1@dev_1 /mnt/recoverData$ cd ~
dev_1@dev_1 ~$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p7 209921236 180793732 19663852 91% /
dev_1@dev_1 ~$ guix shell --container coreutils -- echo Elmo
guix shell: error: mount: mount "/home/dev_1" on
"/tmp/guix-directory.LUuYdU//home/dev_1": Invalid argument
```
Other partition is also no mountable:
```
dev_1@dev_1 /mnt$ cd recoverData/
dev_1@dev_1 /mnt/recoverData$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p8 122503676 91394804 25287412 79% /mnt/recoverData
dev_1@dev_1 /mnt/recoverData$ guix shell --container coreutils -- echo Elmo
guix shell: error: mount: mount "/mnt/recoverData" on
"/tmp/guix-directory.ut68VE//mnt/recoverData": Invalid argument
```
I don't think it is a partition issue.
Le sam. 19 nov. 2022 à 12:47, Tobias Geerinckx-Rice <me@tobias.gr> a écrit :
> Hi bbb,
>
> bbb ee 写道:
> > I feel guix shell --container can only mount subdir in /tmp, and
> > fail for
> > all other dir:
>
> Your example for ‘all other dir’ just tests /home/dev_1 again,
> which looks extremely much like a mount point. So does /mnt. So
> no mystery there, but I do wonder what's *special* about these
> mountpoints compared to others.
>
> What is mounted at /home/dev_1 and (presumably) /mnt on your
> system? Anything mounted at /home? Anything mounted *below*
> /mnt/*?
>
> On my system:
>
> --8<---------------cut here---------------start------------->8---
> ~ λ mountpoint /tmp
> /tmp is a mountpoint
>
> ~ λ guix shell -C --expose=/tmp=/test coreutils -- echo Elmo world
> Elmo world
>
> ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo
> world
> guix shell: error: mount: mount "/proc" on
> "/tmp/guix-directory.zTa1qb//test": Invalid argument
> --8<---------------cut here---------------end--------------->8---
>
> Weird! Clearly, /proc is imbued with magical Kernel magick and
> simply canno— what? Oh:
>
> --8<---------------cut here---------------start------------->8---
> ~ λ mount | grep /proc
> none on /proc type proc (rw,relatime)
> binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
> (rw,relatime)
> --8<---------------cut here---------------end--------------->8---
>
> Surely not…
>
> --8<---------------cut here---------------start------------->8---
> ~ λ sudo umount /proc/sys/fs/binfmt_misc
>
> ~ λ guix shell -C --expose=/proc=/test coreutils -- echo Elmo
> world
> Elmo world
> --8<---------------cut here---------------end--------------->8---
>
> …huh.
>
> So, ‘guix shell --container’ apparently takes issue with rbind'ing
> mounts, or something like that.
>
> Maybe that's something Guix can handle by bind-mounting the entire
> subtree itself, or maybe it's a hard permissions error enforced by
> the kernel. I don't know.
>
> Someone with podman/Docker/similar experience might.
>
> Kind regards,
>
> T G-R
>
next prev parent reply other threads:[~2022-11-19 19:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-19 11:15 guix shell: error: mount: Invalid argument bbb ee
2022-11-19 11:23 ` Tobias Geerinckx-Rice
2022-11-19 19:17 ` bbb ee [this message]
2022-11-19 19:21 ` Tobias Geerinckx-Rice
2022-11-19 19:27 ` bbb ee
2022-11-19 19:46 ` Tobias Geerinckx-Rice
2022-11-19 20:18 ` bbb ee
2022-11-19 20:19 ` Tobias Geerinckx-Rice
2022-11-19 20:20 ` bbb ee
2022-11-20 0:29 ` Maxim Cournoyer
2022-11-20 9:32 ` bbb ee
2022-11-21 22:45 ` bbb ee
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='CALNLCmWLDnpJewyZivMhYSKq=eikxy3riHFcRvtoiOE1junT+g@mail.gmail.com' \
--to=blasforr@gmail.com \
--cc=help-guix@gnu.org \
--cc=me@tobias.gr \
/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).