GNU bug report logs -
#59185
Trouble mounting recursive file systems in containers
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 20 Nov 2022 21:35:21 +0100
with message-id <874juts6s8.fsf <at> elephly.net>
and subject line Re: bug#59185: Trouble mounting recursive file systems in containers
has caused the debbugs.gnu.org bug report #59185,
regarding Trouble mounting recursive file systems in containers
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
59185: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59185
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello!
So I was trying to mount /run/user/1000 in a container so it would have
access to all my wayland sockets and such when I got a very cryptic
error message.
I was trying something like this:
guix shell --share=/run/user/1000 -C coreutils
After far too long tracking down the issue, it turns out that the
directory had submounts within it meaning that the MS_REC flag is
required to bind mount it.
My /run/user/1000 only had a submount because xdg-document-portal was
making one. To test this yourself you can run `mount` to find something
with some submounts. I think /sys/fs might fail for me for the same
reason.
Now I have no clue what we should do to enable this use case. Maybe we
should allow users to specify mount options using something like this?
guix shell -C --mount=rbind,ro=/run/user/1000
Maybe we could always bind with the recursive flag?
Thanks,
Morgan
[Message part 3 (message/rfc822, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> yes, mounting with MS_REC seems sensible. Not mounting with MS_REC is
>> also responsible for a couple of errors e.g. when trying to map / inside
>> the container (when / has other bind mounts).
>
> Having reread mount(2), bind-mounting with MS_REC by default seems like
> a reasonable choice, indeed.
Great. I’ve pushed this with commit c585b4bc68813a351d6a87d19b9adf4041506355.
--
Ricardo
This bug report was last modified 2 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.