'shared mount flag ignored on file-system configuration

  • Open
  • quality assurance status badge
Details
3 participants
  • andy
  • Jelle Licht
  • Wilke Schwiedop
Owner
unassigned
Submitted by
Wilke Schwiedop
Severity
normal
W
W
Wilke Schwiedop wrote on 17 May 2023 11:39
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
DB9P190MB1985175DB3F52EB48BA61EFD9E7E9@DB9P190MB1985.EURP190.PROD.OUTLOOK.COM
Hello,

I'm trying to mount my root partition as "shared" for rootless podman containers, however adding the flag to my system.scm does not seem to have the desired effect:

w@guix ~> grep -B4 shared /run/current-system/configuration.scm
(file-systems (cons* (file-system
(mount-point "/")
(device (file-system-label "GUIX_ROOT"))
(type "ext4")
(flags '(shared))) ;; shared does not work?
w@guix ~> findmnt -o PROPAGATION /
PROPAGATION
private
w@guix ~> sudo mount -o remount,shared /
w@guix ~> findmnt -o PROPAGATION /
PROPAGATION
shared
A
Re: 63554
(name . 63554)(address . 63554@debbugs.gnu.org)
tencent_9913866CE6B0DF2C1E8AC40C1C9C2509C207@qq.com
Also had this exact same problem. Looking at patch #56880, it tried to add the shared option, but found that the `mount(2)` syscall had to be called twice, once to mount it, then once to make the already existing mount shared, so just adding the bit-flag `MS_SHARED` to that syscall didn't work. The patch seems to not include that bitflag until someone needed it enough to implement calling `mount(2)` twice. Pretty sure the option doesn't do anything because it doesn't change the bit-flag in the `mount-flags->bit-mask` procedure at https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/file-systems.scm#n1155br/ br/ So the bug seems to be intentional, and a fix would have to have guix first mount the filesystem normally, then change it to a shared mount.
J
J
Jelle Licht wrote on 4 Sep 11:17 +0200
Re: bug#63554: 63554
87ikvb6an3.fsf@fsfe.org
(I decoded html entities ):
"andy" via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
Toggle quote (13 lines)
> Also had this exact same problem. Looking at patch #56880, it tried
> to add the shared option, but found that the `mount(2)` syscall had
> to be called twice, once to mount it, then once to make the already
> existing mount shared, so just adding the bit-flag `MS_SHARED` to
> that syscall didn't work. The patch seems to not include that bitflag
> until someone needed it enough to implement calling `mount(2)`
> twice. Pretty sure the option doesn't do anything because it doesn't
> change the bit-flag in the `mount-flags->bit-mask` procedure at
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/file-systems.scm#n1155
> So the bug seems to be intentional, and a fix would have to have guix
> first mount the filesystem normally, then change it to a shared
> mount.

Is this something that just needs to be picked up by someone, or would
it be more complicated than that?

- Jelle
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 63554@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63554
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch