guix shell --container fails to mount host filesystem

  • Done
  • quality assurance status badge
Details
2 participants
  • bbb ee
  • Ludovic Courtès
Owner
unassigned
Submitted by
bbb ee
Severity
normal
B
B
bbb ee wrote on 21 Nov 2022 00:48
(address . bug-guix@gnu.org)
CALNLCmV0ZZwEHeZRv7O1NCNm+_Vd-BYWnor4R4Rfc_g_LRRLig@mail.gmail.com
## description
guix shell --container can only mount subdir in /tmp, and fail for all
other dir:
```
# success mount in all subdir of /tmp
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

# fail for all other dir
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
```

## environment
```
$ uname -a
Linux dev_1 5.18.18 #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux
$ guix describe
Generation 9 Oct 22 2022 16:05:50 (current)
guix 85aff4d
branch: master
commit: 85aff4de30686359ffb50845eb0930c0a18dc8ba
nonguix 3f00d57
branch: master
commit: 3f00d57adce5d0a185708fd5c7c5ff6f852c2bf7
```

## similar issue:
Attachment: file
B
B
bbb ee wrote on 21 Nov 2022 20:50
only dir which realpath is in /tmp is mountalbe
(address . 59425@debbugs.gnu.org)
CALNLCmV2tkCX=Jyq0pXr586boMkP+0e27kghvho6GHXus-LoSQ@mail.gmail.com
If I access a unmountable dir from /tmp using symlink, I still can't monnt
it:
```
dev_1@dev_1 /tmp$ ln -s ~ .
dev_1@dev_1 /tmp$ cd dev_1
dev_1@dev_1 /tmp/dev_1$ df .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p7 209921236 180796556 19661028 91% /
dev_1@dev_1 /tmp/dev_1$ guix shell --container coreutils -- echo Elmo
guix shell: error: mount: mount "/home/dev_1" on
"/tmp/guix-directory.X9jW4K//home/dev_1": Invalid argument
dev_1@dev_1 /tmp/dev_1$ realpath /tmp/dev_1
/home/dev_1
```
So not all subdir of /tmp is mountable, only dir which realpath is in /tmp
is mountalbe
Attachment: file
B
B
bbb ee wrote on 21 Nov 2022 21:31
guix can't mount mountpoint path, and the home path.
(address . 59425@debbugs.gnu.org)
CALNLCmVr8vZh0+z2SojMX9FqAWyuSScJzu_1sn095Sx96mS_YA@mail.gmail.com
The new tests show guix can mount all path except mountpoint path, and the
home path.
```
dev_1@dev_1 /mnt/recoverData$ mountpoint . ; guix shell --container
coreutils -- echo Elmo
. is a mountpoint
guix shell: error: mount: mount "/mnt/recoverData" on
"/tmp/guix-directory.Fu8aV9//mnt/recoverData": Invalid argument

dev_1@dev_1 /mnt/recoverData/borg_restore$ mountpoint . ; guix shell
--container coreutils -- echo Elmo
. is not a mountpoint
Elmo

dev_1@dev_1 ~$ mountpoint . ; guix shell --container coreutils -- echo Elmo
. is not a mountpoint
guix shell: error: mount: mount "/home/dev_1" on
"/tmp/guix-directory.shXxIg//home/dev_1": Invalid argument

dev_1@dev_1 ~/Downloads$ mountpoint . ; guix shell --container coreutils --
echo Elmo
. is not a mountpoint
Elmo
```
Attachment: file
L
L
Ludovic Courtès wrote on 23 Nov 2022 15:02
Re: bug#59425: guix shell --container fails to mount host filesystem
(name . bbb ee)(address . blasforr@gmail.com)(address . 59425@debbugs.gnu.org)
871qpthipa.fsf@gnu.org
Hi,

bbb ee <blasforr@gmail.com> skribis:

Toggle quote (17 lines)
> 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
> ```
>
> ## environment
> ```
> $ uname -a
> Linux dev_1 5.18.18 #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux
> $ guix describe
> Generation 9 Oct 22 2022 16:05:50 (current)
> guix 85aff4d
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 85aff4de30686359ffb50845eb0930c0a18dc8ba


I believe this was fixed in commit
c585b4bc68813a351d6a87d19b9adf4041506355, see

Could you check something like:

guix time-machine --commit=c585b4bc68813a351d6a87d19b9adf4041506355 -- \
shell -C coreutils

?

Thanks in advance,
Ludo’.
B
B
bbb ee wrote on 23 Nov 2022 15:20
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 59425@debbugs.gnu.org)
CALNLCmWfwBmrEMUv=5-OS1FZMgsmJf9rJP_XNxUhS9UgGQSG1w@mail.gmail.com
Nice! That runs. Thank you. I will upgrade my guix.

Le mer. 23 nov. 2022 à 15:03, Ludovic Courtès <ludo@gnu.org> a écrit :

Toggle quote (36 lines)
> Hi,
>
> bbb ee <blasforr@gmail.com> skribis:
>
> > 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
> > ```
> >
> > ## environment
> > ```
> > $ uname -a
> > Linux dev_1 5.18.18 #1 SMP PREEMPT_DYNAMIC 1 x86_64 GNU/Linux
> > $ guix describe
> > Generation 9 Oct 22 2022 16:05:50 (current)
> > guix 85aff4d
> > repository URL: https://git.savannah.gnu.org/git/guix.git
> > branch: master
> > commit: 85aff4de30686359ffb50845eb0930c0a18dc8ba
>
>
> I believe this was fixed in commit
> c585b4bc68813a351d6a87d19b9adf4041506355, see
> <https://issues.guix.gnu.org/59185>.
>
> Could you check something like:
>
> guix time-machine --commit=c585b4bc68813a351d6a87d19b9adf4041506355 -- \
> shell -C coreutils
>
> ?
>
> Thanks in advance,
> Ludo’.
>
Attachment: file
B
B
bbb ee wrote on 23 Nov 2022 15:21
(address . control@debbugs.gnu.org)
CALNLCmWyA2P3JvER5zoTqUOfs33-+XOA2d3moDMOsw8p_jBDSg@mail.gmail.com
close #59425
Attachment: file
?